summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_service.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-03-17 11:47:35 -0400
committerNick Mathewson <nickm@torproject.org>2020-03-17 11:47:35 -0400
commit270fe01557cd6f0ca3a795e4801de82a46d87e89 (patch)
tree4d39943f8aac2fffbe89ffce49ea3e2642c1a6d4 /src/feature/hs/hs_service.c
parent44f92e8e4278403b9e633668f8be70f197b6e8db (diff)
parentbbc80ea042a124a5935bd4264677180efdcb2da2 (diff)
downloadtor-270fe01557cd6f0ca3a795e4801de82a46d87e89.tar.gz
tor-270fe01557cd6f0ca3a795e4801de82a46d87e89.zip
Merge branch 'maint-0.4.3'
Diffstat (limited to 'src/feature/hs/hs_service.c')
-rw-r--r--src/feature/hs/hs_service.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index d6382ef804..3a2beb766f 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -3661,6 +3661,12 @@ hs_service_add_ephemeral(ed25519_secret_key_t *sk, smartlist_t *ports,
goto err;
}
+ if (ed25519_validate_pubkey(&service->keys.identity_pk) < 0) {
+ log_warn(LD_CONFIG, "Bad ed25519 private key was provided");
+ ret = RSAE_BADPRIVKEY;
+ goto err;
+ }
+
/* Make sure we have at least one port. */
if (smartlist_len(service->config.ports) == 0) {
log_warn(LD_CONFIG, "At least one VIRTPORT/TARGET must be specified "