[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 7a1007861f978abe0703a8fe062ed3c983bccd49
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
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;
   }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits