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/dirserv.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/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index c8dda665e4..860ac1f700 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); + } } } |