[or-cvs] simplify the tortls api: we only support being a "server", ...
arma at seul.org
arma at seul.org
Wed Jun 7 06:10:56 UTC 2006
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
main.c router.c
Log Message:
simplify the tortls api: we only support being a "server", that
is, even tor clients do the same sort of handshake.
this has been true for years, so it's best to get rid of the
stale code.
Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.646
retrieving revision 1.647
diff -u -p -d -r1.646 -r1.647
--- main.c 4 Jun 2006 22:42:12 -0000 1.646
+++ main.c 7 Jun 2006 06:10:54 -0000 1.647
@@ -757,7 +757,7 @@ run_scheduled_events(time_t now)
last_rotated_certificate = now;
if (last_rotated_certificate+MAX_SSL_KEY_LIFETIME < now) {
log_info(LD_GENERAL,"Rotating tls context.");
- if (tor_tls_context_new(get_identity_key(), 1, options->Nickname,
+ if (tor_tls_context_new(get_identity_key(), options->Nickname,
MAX_SSL_KEY_LIFETIME) < 0) {
log_warn(LD_BUG, "Error reinitializing TLS context");
/* XXX is it a bug here, that we just keep going? */
Index: router.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.264
retrieving revision 1.265
diff -u -p -d -r1.264 -r1.265
--- router.c 4 Jun 2006 22:42:13 -0000 1.264
+++ router.c 7 Jun 2006 06:10:54 -0000 1.265
@@ -260,7 +260,7 @@ init_keys(void)
return -1;
set_identity_key(prkey);
/* Create a TLS context; default the client nickname to "client". */
- if (tor_tls_context_new(get_identity_key(), 1,
+ if (tor_tls_context_new(get_identity_key(),
options->Nickname ? options->Nickname : "client",
MAX_SSL_KEY_LIFETIME) < 0) {
log_err(LD_GENERAL,"Error creating TLS context for OP.");
@@ -302,7 +302,7 @@ init_keys(void)
}
/* 3. Initialize link key and TLS context. */
- if (tor_tls_context_new(get_identity_key(), 1, options->Nickname,
+ if (tor_tls_context_new(get_identity_key(), options->Nickname,
MAX_SSL_KEY_LIFETIME) < 0) {
log_err(LD_GENERAL,"Error initializing TLS context");
return -1;
More information about the tor-commits
mailing list