diff options
author | Roger Dingledine <arma@torproject.org> | 2004-11-02 02:28:51 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-11-02 02:28:51 +0000 |
commit | 85c79ffbc7b965355c3b51cc81000d517089e74e (patch) | |
tree | eafeb903a90d64be26fb900f567528caa1916b5b /src/or/rendclient.c | |
parent | 1433a0b26fcc1e48ac8001c5438e00d140dbf2a9 (diff) | |
download | tor-85c79ffbc7b965355c3b51cc81000d517089e74e.tar.gz tor-85c79ffbc7b965355c3b51cc81000d517089e74e.zip |
canonicalize "src" and "dest" arg order in crypto.c (and others)
svn:r2644
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 553506a5a7..cd4c346dee 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -31,7 +31,7 @@ rend_client_send_establish_rendezvous(circuit_t *circ) tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_ESTABLISH_REND); log_fn(LOG_INFO, "Sending an ESTABLISH_RENDEZVOUS cell"); - if (crypto_rand(REND_COOKIE_LEN, circ->rend_cookie)<0) { + if (crypto_rand(circ->rend_cookie, REND_COOKIE_LEN) < 0) { log_fn(LOG_WARN, "Couldn't get random cookie"); circuit_mark_for_close(circ); return -1; @@ -113,13 +113,12 @@ rend_client_send_introduction(circuit_t *introcirc, circuit_t *rendcirc) { /*XXX maybe give crypto_pk_public_hybrid_encrypt a max_len arg, * to avoid buffer overflows? */ - r = crypto_pk_public_hybrid_encrypt(entry->parsed->pk, tmp, + r = crypto_pk_public_hybrid_encrypt(entry->parsed->pk, payload+DIGEST_LEN, tmp, #if 0 1+MAX_HEX_NICKNAME_LEN+1+REND_COOKIE_LEN+DH_KEY_LEN, #else MAX_NICKNAME_LEN+1+REND_COOKIE_LEN+DH_KEY_LEN, #endif - payload+DIGEST_LEN, PK_PKCS1_OAEP_PADDING, 0); if (r<0) { log_fn(LOG_WARN,"hybrid pk encrypt failed."); |