diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2011-05-04 20:06:24 -0700 |
---|---|---|
committer | Robert Ransom <rransom.8774@gmail.com> | 2011-05-04 20:06:24 -0700 |
commit | 66339f74b4affcb02a3160014efe6ce9aca339e1 (patch) | |
tree | e1d9b352a4d6286fd4620d027b42e143da1de8fa /src/or/dirvote.c | |
parent | 4126de6888de54b5fc825d209ff1bfbe73cd9514 (diff) | |
download | tor-66339f74b4affcb02a3160014efe6ce9aca339e1.tar.gz tor-66339f74b4affcb02a3160014efe6ce9aca339e1.zip |
Handle crypto_pk_get_digest failures semi-sensibly
Fixes bug 3106.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r-- | src/or/dirvote.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 9273dbc90d..db2eaf0f4f 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; + } } } |