aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-10-19 14:35:29 -0400
committerNick Mathewson <nickm@torproject.org>2014-10-19 14:35:29 -0400
commit43836f6f0ab7c25b0c8c9fab366ec664ebd0b0ee (patch)
treed47c734edfd322945a2ab61179aab3b996e5d383 /src/or/routerparse.c
parente318ab14b10f353da1ebcece0d6490191517e21a (diff)
parentc1c83eb376a7c89fadb01d1c7082d4aa4125333d (diff)
downloadtor-43836f6f0ab7c25b0c8c9fab366ec664ebd0b0ee.tar.gz
tor-43836f6f0ab7c25b0c8c9fab366ec664ebd0b0ee.zip
Merge remote-tracking branch 'origin/maint-0.2.3' into release-0.2.3release-0.2.3
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 299d07d376..3ff887c3ca 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -3053,6 +3053,14 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
log_warn(LD_DIR,"Mismatch between identities in certificate and vote");
goto err;
}
+ if (ns->type != NS_TYPE_CONSENSUS) {
+ if (authority_cert_is_blacklisted(ns->cert)) {
+ log_warn(LD_DIR, "Rejecting vote signature made with blacklisted "
+ "signing key %s",
+ hex_str(ns->cert->signing_key_digest, DIGEST_LEN));
+ goto err;
+ }
+ }
voter->address = tor_strdup(tok->args[2]);
if (!tor_inet_aton(tok->args[3], &in)) {
log_warn(LD_DIR, "Error decoding IP address %s in network-status.",
@@ -4447,11 +4455,13 @@ microdescs_parse_from_string(const char *s, const char *eos,
microdesc_free(md);
md = NULL;
+ SMARTLIST_FOREACH(tokens, directory_token_t *, t, token_clear(t));
memarea_clear(area);
smartlist_clear(tokens);
s = start_of_next_microdesc;
}
+ SMARTLIST_FOREACH(tokens, directory_token_t *, t, token_clear(t));
memarea_drop_all(area);
smartlist_free(tokens);