diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2010-10-03 18:14:08 -0700 |
---|---|---|
committer | Robert Ransom <rransom.8774@gmail.com> | 2010-10-04 21:51:47 -0700 |
commit | 17efbe031d4b96d872b2e0bdf3785b232f49bf44 (patch) | |
tree | 05ccd03ad8e8ad788bec0304f6d3be902f196e76 /src/or/router.c | |
parent | d3879dbd16ccc7b6bc8393f92343f8669f8e0dc4 (diff) | |
download | tor-17efbe031d4b96d872b2e0bdf3785b232f49bf44.tar.gz tor-17efbe031d4b96d872b2e0bdf3785b232f49bf44.zip |
Maintain separate server and client TLS contexts.
Fixes bug #988.
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c index bde6e25a77..c59e4b2ca0 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -471,8 +471,11 @@ init_keys(void) return -1; } set_identity_key(prkey); - /* Create a TLS context; default the client nickname to "client". */ - if (tor_tls_context_init(get_identity_key(), MAX_SSL_KEY_LIFETIME) < 0) { + /* Create a TLS context. */ + if (tor_tls_context_init(0, + get_identity_key(), + NULL, + MAX_SSL_KEY_LIFETIME) < 0) { log_err(LD_GENERAL,"Error creating TLS context for Tor client."); return -1; } @@ -550,7 +553,10 @@ init_keys(void) tor_free(keydir); /* 3. Initialize link key and TLS context. */ - if (tor_tls_context_init(get_identity_key(), MAX_SSL_KEY_LIFETIME) < 0) { + if (tor_tls_context_init(public_server_mode(options), + get_identity_key(), + get_identity_key(), + MAX_SSL_KEY_LIFETIME) < 0) { log_err(LD_GENERAL,"Error initializing TLS context"); return -1; } |