summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-30 17:46:14 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-30 17:46:14 +0000
commit34a3a5e2f4a1eb0c3256cccd22e1efae8584e946 (patch)
tree848f32355f754698583663e31ce4b22561cd6923 /src/or/routerlist.c
parent23a345b3c2e7877d3cc4821ec1764f885fa01b2f (diff)
downloadtor-34a3a5e2f4a1eb0c3256cccd22e1efae8584e946.tar.gz
tor-34a3a5e2f4a1eb0c3256cccd22e1efae8584e946.zip
r14016@catbus: nickm | 2007-07-30 13:45:55 -0400
More documentation svn:r10992
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index f25be67935..0cff1709fd 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -65,7 +65,7 @@ static routerlist_t *routerlist = NULL;
* about. This list is kept sorted by published_on. */
static smartlist_t *networkstatus_list = NULL;
-/** DOCDOC */
+/** Most recently received v3 consensus network status. */
static networkstatus_vote_t *current_consensus = NULL;
/** Global list of local_routerstatus_t for each router, known or unknown.
@@ -284,12 +284,13 @@ trusted_dirs_flush_certs_to_disk(void)
trusted_dir_servers_certs_changed = 0;
}
-/** DOCDOC */
+/** Remove all v3 authority certificates that have been superseded for more
+ * than 48 hours. (If the most recent cert was published more than 48 hours
+ * ago, then we aren't going to get any consensuses signed with older
+ * keys.) */
static void
trusted_dirs_remove_old_certs(void)
{
- /* Any certificate that has been superseded for more than 48 hours is
- * irrelevant. */
#define OLD_CERT_LIFETIME (48*60*60)
SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, ds,
{
@@ -313,7 +314,9 @@ trusted_dirs_remove_old_certs(void)
trusted_dirs_flush_certs_to_disk();
}
-/** DOCDOC */
+/** Return the v3 authority certificate with signing key matching
+ * <b>sk_digest</b>, for the authority with identity digest <b>id_digest</b>.
+ * Return NULL if no such authority is known. */
authority_cert_t *
authority_cert_get_by_digests(const char *id_digest,
const char *sk_digest)
@@ -3816,14 +3819,16 @@ networkstatus_get_by_digest(const char *digest)
return NULL;
}
-/** DOCDOC */
+/** Return the most recent consensus that we have downloaded, or NULL if we
+ * don't have one. */
networkstatus_vote_t *
networkstatus_get_latest_consensus(void)
{
return current_consensus;
}
-/** DOCDOC */
+/** Return the most recent consensus that we have downloaded, or NULL if it is
+ * no longer live. */
networkstatus_vote_t *
networkstatus_get_live_consensus(time_t now)
{