diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-11-12 08:47:05 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-11-12 08:47:05 -0500 |
commit | 7d8290f0ac99eda30926edcfce2a8652b26fd743 (patch) | |
tree | 7fa8f6f5ed3b448eaac22d5b15f7cc1b52ea41e8 /src | |
parent | dde6b8906f9b26f594e24a4ebe75d38893a4fd76 (diff) | |
parent | 0c79cddc6b9f8f62eef0ebf0d6aa05563061954f (diff) | |
download | tor-7d8290f0ac99eda30926edcfce2a8652b26fd743.tar.gz tor-7d8290f0ac99eda30926edcfce2a8652b26fd743.zip |
Merge remote-tracking branch 'tor-gitlab/mr/183' into master
Diffstat (limited to 'src')
-rw-r--r-- | src/feature/relay/router.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 5ca21964b6..29103ed6c6 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -386,7 +386,8 @@ MOCK_IMPL(crypto_pk_t *, get_server_identity_key,(void)) { tor_assert(server_identitykey); - tor_assert(server_mode(get_options())); + tor_assert(server_mode(get_options()) || + get_options()->command == CMD_KEY_EXPIRATION); assert_identity_keys_ok(); return server_identitykey; } @@ -398,7 +399,9 @@ get_server_identity_key,(void)) int server_identity_key_is_set(void) { - return server_mode(get_options()) && server_identitykey != NULL; + return (server_mode(get_options()) || + get_options()->command == CMD_KEY_EXPIRATION) && + server_identitykey != NULL; } /** Set the current client identity key to <b>k</b>. @@ -941,7 +944,7 @@ init_keys(void) /* OP's don't need persistent keys; just make up an identity and * initialize the TLS context. */ - if (!server_mode(options)) { + if (!server_mode(options) && !(options->command == CMD_KEY_EXPIRATION)) { return init_keys_client(); } if (init_keys_common() < 0) |