aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2013-03-09 16:42:35 -0500
committerRoger Dingledine <arma@torproject.org>2013-03-10 23:38:18 -0400
commit599aeef9bc9e707ec7146da79b2018bf2f2924b3 (patch)
tree423e03ae6c7e8cafb03da8f69f91e6f6ba72d20f /src/or/router.c
parente270a066a6262784be317f003f6102430db24880 (diff)
downloadtor-599aeef9bc9e707ec7146da79b2018bf2f2924b3.tar
tor-599aeef9bc9e707ec7146da79b2018bf2f2924b3.tar.gz
parameterize SSLKeyLifetime
no actual changes in behavior yet
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 95aa70a9c..c9c35f613 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -650,6 +650,7 @@ router_initialize_tls_context(void)
{
unsigned int flags = 0;
const or_options_t *options = get_options();
+ int lifetime = options->SSLKeyLifetime;
if (public_server_mode(options))
flags |= TOR_TLS_CTX_IS_PUBLIC_SERVER;
if (options->TLSECGroup) {
@@ -659,11 +660,13 @@ router_initialize_tls_context(void)
flags |= TOR_TLS_CTX_USE_ECDHE_P224;
}
+ /* It's ok to pass lifetime in as an unsigned int, since
+ * config_parse_interval() checked it. */
return tor_tls_context_init(flags,
get_tlsclient_identity_key(),
- server_mode(get_options()) ?
+ server_mode(options) ?
get_server_identity_key() : NULL,
- MAX_SSL_KEY_LIFETIME_ADVERTISED);
+ (unsigned int)lifetime);
}
/** Initialize all OR private keys, and the TLS context, as necessary.