diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-03-17 11:45:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-03-17 11:45:16 -0400 |
commit | 5f4e14b8c8cd4c8907f669144a5a4bb8b8b7a585 (patch) | |
tree | e145f4cebaf39aa772da8d8f81aa3540fb44cfcb /src/feature/hs/hs_service.c | |
parent | c22696e3606f9873ddbf02b11dc91214853b8317 (diff) | |
parent | 089e57d22f7c5e755a2d88d0b102207f7207ee27 (diff) | |
download | tor-5f4e14b8c8cd4c8907f669144a5a4bb8b8b7a585.tar.gz tor-5f4e14b8c8cd4c8907f669144a5a4bb8b8b7a585.zip |
Merge branch 'maint-0.3.5' into maint-0.4.1
Diffstat (limited to 'src/feature/hs/hs_service.c')
-rw-r--r-- | src/feature/hs/hs_service.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c index d1ca33b12e..a88d1c4a63 100644 --- a/src/feature/hs/hs_service.c +++ b/src/feature/hs/hs_service.c @@ -3517,6 +3517,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 " |