diff options
author | Roger Dingledine <arma@torproject.org> | 2005-01-13 20:22:38 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-01-13 20:22:38 +0000 |
commit | 0aff4ff4cbce21c5d85a0a0a75aea86b4c9842df (patch) | |
tree | 6b52a7dd140da5503c17656c36821ca401a1ff40 /src | |
parent | 22f7934718f505cc04bbb4b1ee3a09e38e10d272 (diff) | |
download | tor-0aff4ff4cbce21c5d85a0a0a75aea86b4c9842df.tar.gz tor-0aff4ff4cbce21c5d85a0a0a75aea86b4c9842df.zip |
get rid of 0.0.8 backwards compatibility
svn:r3353
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuituse.c | 3 | ||||
-rw-r--r-- | src/or/config.c | 3 | ||||
-rw-r--r-- | src/or/connection_edge.c | 6 | ||||
-rw-r--r-- | src/or/connection_or.c | 12 | ||||
-rw-r--r-- | src/or/or.h | 1 | ||||
-rw-r--r-- | src/or/routerlist.c | 3 |
6 files changed, 6 insertions, 22 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 89d4a58477..35a83fd459 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -85,9 +85,6 @@ static int circuit_is_acceptable(circuit_t *circ, if (conn->socks_request && conn->socks_request->command == SOCKS_COMMAND_RESOLVE) { - /* 0.0.8 servers have buggy resolve support. */ - if (!tor_version_as_new_as(exitrouter->platform, "0.0.9pre1")) - return 0; } else if (purpose == CIRCUIT_PURPOSE_C_GENERAL) { if (!connection_ap_can_use_exit(conn, exitrouter)) { /* can't exit from this router */ diff --git a/src/or/config.c b/src/or/config.c index 84d8200097..63e586c3e3 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1332,8 +1332,7 @@ options_validate(or_options_t *options) #define MIN_REND_POST_PERIOD 300 #define MIN_STATUS_FETCH_PERIOD 60 - /* After 0.0.8 is dead, change this to MIN_ONION_KEY_LIFETIME. */ -#define MAX_DIR_PERIOD (OLD_MIN_ONION_KEY_LIFETIME/2) +#define MAX_DIR_PERIOD (MIN_ONION_KEY_LIFETIME/2) #define MAX_CACHE_DIR_FETCH_PERIOD 3600 #define MAX_CACHE_STATUS_FETCH_PERIOD 900 diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 5cbb312d21..65aaefb8bc 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1016,11 +1016,7 @@ int connection_ap_can_use_exit(connection_t *conn, routerinfo_t *exit) } } - if (conn->socks_request->command == SOCKS_COMMAND_RESOLVE) { - /* 0.0.8 servers have buggy resolve support. */ - if (!tor_version_as_new_as(exit->platform, "0.0.9pre1")) - return 0; - } else { + if (conn->socks_request->command != SOCKS_COMMAND_RESOLVE) { addr = client_dns_lookup_entry(conn->socks_request->address); if (router_compare_addr_to_addr_policy(addr, conn->socks_request->port, exit->exit_policy) == ADDR_POLICY_REJECTED) diff --git a/src/or/connection_or.c b/src/or/connection_or.c index f1ec0fcf95..35b19c5d77 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -344,16 +344,10 @@ connection_tls_finish_handshake(connection_t *conn) { conn->state = OR_CONN_STATE_OPEN; connection_watch_events(conn, EV_READ); log_fn(LOG_DEBUG,"tls handshake done. verifying."); - if (! tor_tls_peer_has_cert(conn->tls)) { /* It's an old OP. */ - if (server_mode(options)) { /* I'm an OR; good. */ - conn->receiver_bucket = conn->bandwidth = DEFAULT_BANDWIDTH_OP; - return 0; - } else { /* Neither side sent a certificate: ouch. */ - log_fn(LOG_WARN,"Neither peer sent a cert! Closing."); - return -1; - } + if (! tor_tls_peer_has_cert(conn->tls)) { + log_fn(LOG_WARN,"Peer didn't send a cert! Closing."); + return -1; } - /* Okay; the other side is an OR or a post-0.0.8 OP (with a cert). */ if (tor_tls_get_peer_cert_nickname(conn->tls, nickname, sizeof(nickname))) { log_fn(LOG_WARN,"Other side (%s:%d) has a cert without a valid nickname. Closing.", conn->address, conn->port); diff --git a/src/or/or.h b/src/or/or.h index 319e4f2968..2479df9844 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -145,7 +145,6 @@ #endif /** How often do we rotate onion keys? */ -#define OLD_MIN_ONION_KEY_LIFETIME (12*60*60) /* twice a day */ #define MIN_ONION_KEY_LIFETIME (7*24*60*60) /* once a week */ /** How often do we rotate TLS contexts? */ #define MAX_SSL_KEY_LIFETIME (120*60) diff --git a/src/or/routerlist.c b/src/or/routerlist.c index b78828bc4d..c4411fdcdc 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -64,9 +64,8 @@ int router_reload_router_list(void) log_fn(LOG_WARN, "Cached directory at '%s' was unparseable; ignoring.", filename); } if (routerlist && - ((routerlist->published_on > time(NULL) - OLD_MIN_ONION_KEY_LIFETIME/2) + ((routerlist->published_on > time(NULL) - MIN_ONION_KEY_LIFETIME/2) || is_recent)) { - /* XXX use new onion key lifetime when 0.0.8 servers are obsolete */ directory_has_arrived(st.st_mtime); /* do things we've been waiting to do */ } tor_free(s); |