diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-01 11:25:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-01 11:25:29 -0400 |
commit | 7a61a92870df84c37bacd9d065e0c8df2b938d37 (patch) | |
tree | 444e1a8cf7e9bd1f12685d614459ce1ad122eb42 /src/or/rendclient.c | |
parent | adcd1d8b9ac09f3abc11e2e3187fe363ad3df2fd (diff) | |
download | tor-7a61a92870df84c37bacd9d065e0c8df2b938d37.tar.gz tor-7a61a92870df84c37bacd9d065e0c8df2b938d37.zip |
Combine DH_BYTES and DH_KEY_LEN; put them in a lib/defs header.
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 1da695706c..b714574563 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -258,7 +258,7 @@ rend_client_send_introduction(origin_circuit_t *introcirc, } if (crypto_dh_get_public(cpath->rend_dh_handshake_state, tmp+dh_offset, - DH_KEY_LEN)<0) { + DH1024_KEY_LEN)<0) { log_warn(LD_BUG, "Internal error: couldn't extract g^x."); status = -2; goto perm_err; @@ -269,7 +269,7 @@ rend_client_send_introduction(origin_circuit_t *introcirc, r = crypto_pk_obsolete_public_hybrid_encrypt(intro_key, payload+DIGEST_LEN, sizeof(payload)-DIGEST_LEN, tmp, - (int)(dh_offset+DH_KEY_LEN), + (int)(dh_offset+DH1024_KEY_LEN), PK_PKCS1_OAEP_PADDING, 0); if (r<0) { log_warn(LD_BUG,"Internal error: hybrid pk encrypt failed."); @@ -874,7 +874,7 @@ int rend_client_receive_rendezvous(origin_circuit_t *circ, const uint8_t *request, size_t request_len) { - if (request_len != DH_KEY_LEN+DIGEST_LEN) { + if (request_len != DH1024_KEY_LEN+DIGEST_LEN) { log_warn(LD_PROTOCOL,"Incorrect length (%d) on RENDEZVOUS2 cell.", (int)request_len); goto err; |