diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-08-03 16:00:18 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-08 20:29:34 -0400 |
commit | f106af3c41dffdc8576c52399a61d34116b78f38 (patch) | |
tree | 42e5dbbf88c551ce0462111f15da3248ca6da726 /src/or/hs_service.c | |
parent | d88984a137b9f06fd72f57636b6ec321044c8908 (diff) | |
download | tor-f106af3c41dffdc8576c52399a61d34116b78f38.tar.gz tor-f106af3c41dffdc8576c52399a61d34116b78f38.zip |
Make ed25519 id keys optional for IPs and RPs.
Diffstat (limited to 'src/or/hs_service.c')
-rw-r--r-- | src/or/hs_service.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c index 86e7d40cb7..a6f548d319 100644 --- a/src/or/hs_service.c +++ b/src/or/hs_service.c @@ -394,6 +394,7 @@ service_intro_point_new(const extend_info_t *ei, unsigned int is_legacy) goto err; } smartlist_add(ip->base.link_specifiers, ls); + ls = hs_desc_link_specifier_new(ei, LS_LEGACY_ID); /* It is impossible to have an extend info object without an identity * digest. */ @@ -401,11 +402,13 @@ service_intro_point_new(const extend_info_t *ei, unsigned int is_legacy) goto err; } smartlist_add(ip->base.link_specifiers, ls); + + /* ed25519 identity key is optional */ ls = hs_desc_link_specifier_new(ei, LS_ED25519_ID); - /* It is impossible to have an extend info object without an ed25519 - * identity key. */ - tor_assert(ls); - smartlist_add(ip->base.link_specifiers, ls); + if (ls) { + smartlist_add(ip->base.link_specifiers, ls); + } + /* IPv6 is optional. */ ls = hs_desc_link_specifier_new(ei, LS_IPV6); if (ls) { |