[tor-commits] [tor/master] Print stacktrace when crypto_pk_get_digest() fails in router_build_fresh_descriptor()

nickm at torproject.org nickm at torproject.org
Sat Aug 11 14:04:09 UTC 2018


commit 7a1007861f978abe0703a8fe062ed3c983bccd49
Author: rl1987 <rl1987 at sdf.lonestar.org>
Date:   Wed Aug 8 18:56:27 2018 +0300

    Print stacktrace when crypto_pk_get_digest() fails in router_build_fresh_descriptor()
---
 src/feature/relay/router.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 40839f260..e4ec01af2 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -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;
   }





More information about the tor-commits mailing list