diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-01-15 12:02:55 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-01-15 12:02:55 -0500 |
commit | ed87738ede789fb9eccfd2e5a34bd8c484dfe44e (patch) | |
tree | 27eb5efade75d368692a80d258615415deb8a7dc /src/or/rendservice.c | |
parent | b27f5cc50d4a66bff31e43a596eb296a1b5a11dc (diff) | |
parent | 50b06a2b76190170e9f80739f022696755b54b99 (diff) | |
download | tor-ed87738ede789fb9eccfd2e5a34bd8c484dfe44e.tar.gz tor-ed87738ede789fb9eccfd2e5a34bd8c484dfe44e.zip |
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
Conflicts:
src/or/config.c
src/or/networkstatus.c
src/or/rendcommon.c
src/or/routerparse.c
src/or/test.c
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 44b5a4b4c0..1d64cf41e3 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -928,7 +928,8 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request, /* Next N bytes is encrypted with service key */ note_crypto_pk_op(REND_SERVER); r = crypto_pk_private_hybrid_decrypt( - intro_key,buf,(char*)(request+DIGEST_LEN),request_len-DIGEST_LEN, + intro_key,buf,sizeof(buf), + (char*)(request+DIGEST_LEN),request_len-DIGEST_LEN, PK_PKCS1_OAEP_PADDING,1); if (r<0) { log_warn(LD_PROTOCOL, "Couldn't decrypt INTRODUCE2 cell."); @@ -1365,7 +1366,8 @@ rend_service_intro_has_opened(origin_circuit_t *circuit) goto err; len += 20; note_crypto_pk_op(REND_SERVER); - r = crypto_pk_private_sign_digest(intro_key, buf+len, buf, len); + r = crypto_pk_private_sign_digest(intro_key, buf+len, sizeof(buf)-len, + buf, len); if (r<0) { log_warn(LD_BUG, "Internal error: couldn't sign introduction request."); reason = END_CIRC_REASON_INTERNAL; |