diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-30 12:07:59 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-30 12:07:59 -0500 |
commit | ba4a9cf0c094b7a19e1bf44264b1244a23a4b38e (patch) | |
tree | bab81ffaf9bf664f4d699db1c99a67636c445032 /src/or/rendservice.c | |
parent | 3030741b5d24e9ae36e6d72c6a8c7d035fde9d2a (diff) | |
parent | f49876d66efbc5679ba7d9d9c6538c763b8e06b5 (diff) | |
download | tor-ba4a9cf0c094b7a19e1bf44264b1244a23a4b38e.tar.gz tor-ba4a9cf0c094b7a19e1bf44264b1244a23a4b38e.zip |
Merge branch 'maint-0.2.5' into maint-0.2.8
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index cbf9981360..829a1b7aea 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -1469,6 +1469,7 @@ rend_service_receive_introduction(origin_circuit_t *circuit, time_t now = time(NULL); time_t elapsed; int replay; + size_t keylen; /* Do some initial validation and logging before we parse the cell */ if (circuit->base_.purpose != CIRCUIT_PURPOSE_S_INTRO) { @@ -1544,9 +1545,10 @@ rend_service_receive_introduction(origin_circuit_t *circuit, } /* check for replay of PK-encrypted portion. */ + keylen = crypto_pk_keysize(intro_key); replay = replaycache_add_test_and_elapsed( intro_point->accepted_intro_rsa_parts, - parsed_req->ciphertext, parsed_req->ciphertext_len, + parsed_req->ciphertext, MIN(parsed_req->ciphertext_len, keylen), &elapsed); if (replay) { |