aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-25 11:39:38 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-25 11:39:38 -0400
commitb91dce9454c3db669a07968b25a4fa03d8526917 (patch)
treed1e4aa46835978b63628a1dbd3e5782140cb72fa /src/or/router.c
parent0de3147bf1b7a76b99ced69bde6e2169bb9a0caa (diff)
parent6069c829f90576c04a0802d2a108378a2bbabb7a (diff)
downloadtor-b91dce9454c3db669a07968b25a4fa03d8526917.tar.gz
tor-b91dce9454c3db669a07968b25a4fa03d8526917.zip
Merge branch 'maint-0.3.1'
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 7fad572657..c8e78659c0 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -257,7 +257,11 @@ set_server_identity_key(crypto_pk_t *k)
{
crypto_pk_free(server_identitykey);
server_identitykey = k;
- crypto_pk_get_digest(server_identitykey, server_identitykey_digest);
+ if (crypto_pk_get_digest(server_identitykey,
+ server_identitykey_digest) < 0) {
+ log_err(LD_BUG, "Couldn't compute our own identity key digest.");
+ tor_assert(0);
+ }
}
/** Make sure that we have set up our identity keys to match or not match as
@@ -956,8 +960,12 @@ init_keys(void)
}
cert = get_my_v3_authority_cert();
if (cert) {
- crypto_pk_get_digest(get_my_v3_authority_cert()->identity_key,
- v3_digest);
+ if (crypto_pk_get_digest(get_my_v3_authority_cert()->identity_key,
+ v3_digest) < 0) {
+ log_err(LD_BUG, "Couldn't compute my v3 authority identity key "
+ "digest.");
+ return -1;
+ }
v3_digest_set = 1;
}
}