aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_service.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-03-17 11:45:16 -0400
committerNick Mathewson <nickm@torproject.org>2020-03-17 11:45:16 -0400
commite15a621ac81c472f69a082180fa9b4ed39274e43 (patch)
tree54020a4143660eeab6541cf5a752a380cff836ae /src/feature/hs/hs_service.c
parent9ef8f5d1b8c646d1383327a3d45cddf27ab4b886 (diff)
parent5f4e14b8c8cd4c8907f669144a5a4bb8b8b7a585 (diff)
downloadtor-e15a621ac81c472f69a082180fa9b4ed39274e43.tar.gz
tor-e15a621ac81c472f69a082180fa9b4ed39274e43.zip
Merge branch 'maint-0.4.1' into maint-0.4.2
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 18c38ebc0a..17ac4fa4a9 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -3565,6 +3565,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 "