aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2011-09-13 18:24:45 -0400
committerRoger Dingledine <arma@torproject.org>2011-09-13 18:24:45 -0400
commit62ec584a3014b9b9333dcc6feb4989d1592d6d26 (patch)
treeabba517b55ab5990fc0b05ff2fb76d5e9bc85f87 /src/or/router.c
parentc75ee94ab41e3a76e8159366defe3159614b497c (diff)
downloadtor-62ec584a3014b9b9333dcc6feb4989d1592d6d26.tar
tor-62ec584a3014b9b9333dcc6feb4989d1592d6d26.tar.gz
Generate our ssl session certs with a plausible lifetime
Nobody but Tor uses certs on the wire with 2 hour lifetimes, and it makes us stand out. Resolves ticket 4014.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index cc600415f..2afde746d 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -458,7 +458,8 @@ init_keys(void)
}
set_identity_key(prkey);
/* Create a TLS context; default the client nickname to "client". */
- if (tor_tls_context_new(get_identity_key(), MAX_SSL_KEY_LIFETIME) < 0) {
+ if (tor_tls_context_new(get_identity_key(),
+ MAX_SSL_KEY_LIFETIME_ADVERTISED) < 0) {
log_err(LD_GENERAL,"Error creating TLS context for Tor client.");
return -1;
}
@@ -536,7 +537,8 @@ init_keys(void)
tor_free(keydir);
/* 3. Initialize link key and TLS context. */
- if (tor_tls_context_new(get_identity_key(), MAX_SSL_KEY_LIFETIME) < 0) {
+ if (tor_tls_context_new(get_identity_key(),
+ MAX_SSL_KEY_LIFETIME_ADVERTISED) < 0) {
log_err(LD_GENERAL,"Error initializing TLS context");
return -1;
}