diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-17 19:47:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-17 19:47:48 -0400 |
commit | e0e8424f1eaf88f1c03a0acbfe09d368d3cbb1be (patch) | |
tree | 1bb633f98ef832cf555386118d4115de9fd24ffc /src | |
parent | 4082d67b03075712707d76b960c6525d00c1c0c0 (diff) | |
parent | 21ed575826e701437f7893536ffc5c8d2a71532f (diff) | |
download | tor-e0e8424f1eaf88f1c03a0acbfe09d368d3cbb1be.tar.gz tor-e0e8424f1eaf88f1c03a0acbfe09d368d3cbb1be.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuitbuild.c | 2 | ||||
-rw-r--r-- | src/or/routerparse.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 3337d64987..c91e2f32f1 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -4556,7 +4556,7 @@ get_configured_bridge_by_addr_port_digest(const tor_addr_t *addr, !tor_addr_compare(&bridge->addr, addr, CMP_EXACT) && bridge->port == port) return bridge; - if (tor_memeq(bridge->identity, digest, DIGEST_LEN)) + if (digest && tor_memeq(bridge->identity, digest, DIGEST_LEN)) return bridge; } SMARTLIST_FOREACH_END(bridge); diff --git a/src/or/routerparse.c b/src/or/routerparse.c index dcfb6f86b2..295b74dc2d 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -4345,6 +4345,11 @@ microdescs_parse_from_string(const char *s, const char *eos, } tok = find_by_keyword(tokens, K_ONION_KEY); + if (!crypto_pk_public_exponent_ok(tok->key)) { + log_warn(LD_DIR, + "Relay's onion key had invalid exponent."); + goto next; + } md->onion_pkey = tok->key; tok->key = NULL; |