diff options
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r-- | src/or/rendcommon.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index e1236bdd0f..d18356e67a 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -477,7 +477,10 @@ rend_encode_v2_descriptors(smartlist_t *descs_out, tor_assert(descriptor_cookie); } /* Obtain service_id from public key. */ - crypto_pk_get_digest(service_key, service_id); + if (crypto_pk_get_digest(service_key, service_id) < 0) { + log_warn(LD_BUG, "Couldn't compute service key digest."); + return -1; + } /* Calculate current time-period. */ time_period = get_time_period(now, period, service_id); /* Determine how many seconds the descriptor will be valid. */ |