diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-08-25 11:39:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-25 11:39:38 -0400 |
commit | b91dce9454c3db669a07968b25a4fa03d8526917 (patch) | |
tree | d1e4aa46835978b63628a1dbd3e5782140cb72fa /src/or/rendservice.c | |
parent | 0de3147bf1b7a76b99ced69bde6e2169bb9a0caa (diff) | |
parent | 6069c829f90576c04a0802d2a108378a2bbabb7a (diff) | |
download | tor-b91dce9454c3db669a07968b25a4fa03d8526917.tar.gz tor-b91dce9454c3db669a07968b25a4fa03d8526917.zip |
Merge branch 'maint-0.3.1'
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 8dbab2e2a7..99ba9b3d83 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -2666,7 +2666,14 @@ rend_service_decrypt_intro( /* Check that this cell actually matches this service key */ /* first DIGEST_LEN bytes of request is intro or service pk digest */ - crypto_pk_get_digest(key, (char *)key_digest); + if (crypto_pk_get_digest(key, (char *)key_digest) < 0) { + if (err_msg_out) + *err_msg_out = tor_strdup("Couldn't compute RSA digest."); + log_warn(LD_BUG, "Couldn't compute key digest."); + status = -7; + goto err; + } + if (tor_memneq(key_digest, intro->pk, DIGEST_LEN)) { if (err_msg_out) { base32_encode(service_id, REND_SERVICE_ID_LEN_BASE32 + 1, |