summaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-25 11:38:24 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-25 11:38:24 -0400
commit6069c829f90576c04a0802d2a108378a2bbabb7a (patch)
treeaaaf670a9e79384e0d83f5b8a04738636fef9566 /src/or/rendservice.c
parent10b242822490c9873138565bcc8a3565a7dc7014 (diff)
parent418f3d6298beb27e050618e2f59e01d6d3b2f45b (diff)
downloadtor-6069c829f90576c04a0802d2a108378a2bbabb7a.tar.gz
tor-6069c829f90576c04a0802d2a108378a2bbabb7a.zip
Merge branch 'bug19418_029' into maint-0.3.1
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index f3b78c4663..ede887945d 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -2812,7 +2812,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,