diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-04 23:18:47 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-04 23:18:47 -0400 |
commit | 9583a534ac8801211b6c171c399f1ea6bb3cce1c (patch) | |
tree | 6877cafe3c3c46824e01f2698e86c7076b8f0b22 /src/or | |
parent | ab1460f3ae00f6caab9feead455eebfb0d03d5e4 (diff) | |
parent | 66339f74b4affcb02a3160014efe6ce9aca339e1 (diff) | |
download | tor-9583a534ac8801211b6c171c399f1ea6bb3cce1c.tar tor-9583a534ac8801211b6c171c399f1ea6bb3cce1c.tar.gz |
Merge remote-tracking branch 'rransom/bug3106' into maint-0.2.2
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/dirserv.c | 5 | ||||
-rw-r--r-- | src/or/dirvote.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index c8dda665e..860ac1f70 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2705,7 +2705,10 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_env_t *private_key, if (options->V3AuthUseLegacyKey) { authority_cert_t *c = get_my_v3_legacy_cert(); if (c) { - crypto_pk_get_digest(c->identity_key, voter->legacy_id_digest); + if (crypto_pk_get_digest(c->identity_key, voter->legacy_id_digest)) { + log_warn(LD_BUG, "Unable to compute digest of legacy v3 identity key"); + memset(voter->legacy_id_digest, 0, DIGEST_LEN); + } } } diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 9273dbc90..db2eaf0f4 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -3129,8 +3129,12 @@ dirvote_compute_consensuses(void) authority_cert_t *cert = get_my_v3_legacy_cert(); legacy_sign = get_my_v3_legacy_signing_key(); if (cert) { - crypto_pk_get_digest(cert->identity_key, legacy_dbuf); - legacy_id_digest = legacy_dbuf; + if (crypto_pk_get_digest(cert->identity_key, legacy_dbuf)) { + log_warn(LD_BUG, + "Unable to compute digest of legacy v3 identity key"); + } else { + legacy_id_digest = legacy_dbuf; + } } } |