aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-02-05 21:39:56 +0000
committerNick Mathewson <nickm@torproject.org>2008-02-05 21:39:56 +0000
commit9c7eaa7a9ddde07ce0bdc9d471a3ca3d40e20caa (patch)
treeabf644d4d0a474113786cf9dffa929f1536fc792
parent7dc70c2405e02e121c445e9d9970534e3236562a (diff)
downloadtor-9c7eaa7a9ddde07ce0bdc9d471a3ca3d40e20caa.tar
tor-9c7eaa7a9ddde07ce0bdc9d471a3ca3d40e20caa.tar.gz
r17918@catbus: nickm | 2008-02-05 16:39:17 -0500
Remove a few #if-0d items. svn:r13392
-rw-r--r--src/common/tortls.h9
-rw-r--r--src/or/command.c4
-rw-r--r--src/or/connection.c20
-rw-r--r--src/or/or.h5
-rw-r--r--src/or/routerlist.c15
5 files changed, 0 insertions, 53 deletions
diff --git a/src/common/tortls.h b/src/common/tortls.h
index cc9a7c148..8584eb18e 100644
--- a/src/common/tortls.h
+++ b/src/common/tortls.h
@@ -66,15 +66,6 @@ char *tor_tls_encode_my_certificate(tor_tls_t *tls, size_t *size_out,
crypto_pk_env_t *tor_tls_dup_private_key(tor_tls_t *tls);
int tor_tls_verify_v1(int severity, tor_tls_t *tls,
crypto_pk_env_t **identity);
-#if 0
-int tor_tls_verify_certs_v2(int severity, tor_tls_t *tls,
- const char *cert_str, size_t cert_len,
- const char *id_cert_str, size_t id_cert_len,
- crypto_pk_env_t **cert_key_out,
- char *conn_cert_digest_out,
- crypto_pk_env_t **id_key_out,
- char *id_digest_out);
-#endif
int tor_tls_check_lifetime(tor_tls_t *tls, int tolerance);
int tor_tls_read(tor_tls_t *tls, char *cp, size_t len);
int tor_tls_write(tor_tls_t *tls, const char *cp, size_t n);
diff --git a/src/or/command.c b/src/or/command.c
index 61ff77c80..ea626416b 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -39,10 +39,6 @@ static void command_process_destroy_cell(cell_t *cell, or_connection_t *conn);
static void command_process_versions_cell(var_cell_t *cell,
or_connection_t *conn);
static void command_process_netinfo_cell(cell_t *cell, or_connection_t *conn);
-#if 0
-static void command_process_cert_cell(var_cell_t *cell, or_connection_t *conn);
-static void command_process_link_auth_cell(cell_t *cell,or_connection_t *conn);
-#endif
#ifdef KEEP_TIMING_STATS
/** This is a wrapper function around the actual function that processes the
diff --git a/src/or/connection.c b/src/or/connection.c
index 6564b2d50..845f0ff83 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -2418,26 +2418,6 @@ connection_get_by_type_state(int type, int state)
return NULL;
}
-#if 0
-/** Return the connection of type <b>type</b> that is in state
- * <b>state</b>, that was written to least recently, and that is not
- * marked for close.
- */
-connection_t *
-connection_get_by_type_state_lastwritten(int type, int state)
-{
- connection_t *best = NULL;
- smartlist_t *conns = get_connection_array();
- SMARTLIST_FOREACH(conns, connection_t *, conn,
- {
- if (conn->type == type && conn->state == state && !conn->marked_for_close)
- if (!best || conn->timestamp_lastwritten < best->timestamp_lastwritten)
- best = conn;
- });
- return best;
-}
-#endif
-
/** Return a connection of type <b>type</b> that has rendquery equal
* to <b>rendquery</b>, and that is not marked for close. If state
* is non-zero, conn must be of that state too.
diff --git a/src/or/or.h b/src/or/or.h
index fe1277943..a82c44be4 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -3814,11 +3814,6 @@ typedef struct trusted_dir_server_t {
/** What kind of authority is this? (Bitfield.) */
authority_type_t type;
-#if 0
- smartlist_t *v3_certs; /**< V3 key certificates for this authority */
- download_status_t cert_dl_status; /**< Status of downloading this server's
- * latest certificate. */
-#endif
download_status_t v2_ns_dl_status; /**< Status of downloading this server's
* v2 network status. */
time_t addr_current_at; /**< When was the document that we derived the
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 27c646253..3d5bbe75c 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -143,16 +143,6 @@ trusted_dirs_load_certs_from_string(const char *contents, int from_store)
ds = trusteddirserver_get_by_v3_auth_digest(
cert->cache_info.identity_digest);
-#if 0
- if (drop_unknown && !ds) {
- log_info(LD_DIR, "Found %s certificate whose key didn't match "
- "any v3 authority we recognized; skipping.",
- from_store ? "cached" : "downloaded");
- authority_cert_free(cert);
- continue;
- }
- }
-#endif
cl = get_cert_list(cert->cache_info.identity_digest);
SMARTLIST_FOREACH(cl->certs, authority_cert_t *, c,
@@ -2717,11 +2707,6 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
return -1;
}
-#if 0
- if (routerlist_is_overfull(routerlist))
- routerlist_remove_old_routers();
-#endif
-
if (authdir) {
if (authdir_wants_to_reject_router(router, msg,
!from_cache && !from_fetch)) {