Print stacktrace when crypto_pk_get_digest() fails in router_build_fresh_descriptor()

This commit is contained in:
rl1987 2018-08-08 18:56:27 +03:00
parent 9c242e950b
commit 7a1007861f

View File

@ -2350,8 +2350,8 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
}
ri->identity_pkey = crypto_pk_dup_key(get_server_identity_key());
if (crypto_pk_get_digest(ri->identity_pkey,
ri->cache_info.identity_digest)<0) {
if (BUG(crypto_pk_get_digest(ri->identity_pkey,
ri->cache_info.identity_digest) < 0)) {
routerinfo_free(ri);
return TOR_ROUTERINFO_ERROR_DIGEST_FAILED;
}