diff options
author | George Kadianakis <desnacked@gmail.com> | 2011-11-24 06:40:02 +0100 |
---|---|---|
committer | George Kadianakis <desnacked@gmail.com> | 2011-11-25 18:15:26 +0100 |
commit | e3cee8bc2e8df6b39a4122829649e3f9ab920aa6 (patch) | |
tree | 3c0614eaebce2f2f9f5a63939f1b1b5afac9d45e /src/or/main.c | |
parent | e2a189053dd93ba94d13035fff5008fcdefa8eca (diff) | |
download | tor-e3cee8bc2e8df6b39a4122829649e3f9ab920aa6.tar.gz tor-e3cee8bc2e8df6b39a4122829649e3f9ab920aa6.zip |
Simply initialize TLS context if DynamicDHGroups change.
We used to do init_keys() if DynamicDHGroups changed after a HUP, so
that the dynamic DH modulus was stored on the disk. Since we are now
doing dynamic DH modulus storing in crypto.c, we can simply initialize
the TLS context and be good with it.
Introduce a new function router_initialize_tls_context() which
initializes the TLS context and use it appropriately.
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/or/main.c b/src/or/main.c index 7008d388a1..95f9958aa8 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1161,10 +1161,7 @@ run_scheduled_events(time_t now) last_rotated_x509_certificate = now; if (last_rotated_x509_certificate+MAX_SSL_KEY_LIFETIME_INTERNAL < now) { log_info(LD_GENERAL,"Rotating tls context."); - if (tor_tls_context_init(public_server_mode(options), - get_tlsclient_identity_key(), - is_server ? get_server_identity_key() : NULL, - MAX_SSL_KEY_LIFETIME_ADVERTISED) < 0) { + if (router_initialize_tls_context() < 0) { log_warn(LD_BUG, "Error reinitializing TLS context"); /* XXX is it a bug here, that we just keep going? -RD */ } |