aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-02-22 19:09:45 +0000
committerNick Mathewson <nickm@torproject.org>2008-02-22 19:09:45 +0000
commite7db789e82a7a2edc5c7e8230265f8ec83021f69 (patch)
treec8af0a1fe11383d565d916634a7c0d4c963ce4ec /src/or/onion.c
parenta20eda5669cc5ce8b8c02d16ea80f642b7de64f9 (diff)
downloadtor-e7db789e82a7a2edc5c7e8230265f8ec83021f69.tar.gz
tor-e7db789e82a7a2edc5c7e8230265f8ec83021f69.zip
r14399@tombo: nickm | 2008-02-22 14:09:38 -0500
More 64-to-32 fixes. Partial backport candidate. still not done. svn:r13680
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index c798a8d20e..a51dc3e7ac 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -180,7 +180,7 @@ onion_skin_create(crypto_pk_env_t *dest_router_key,
goto err;
dhbytes = crypto_dh_get_bytes(dh);
- pkbytes = crypto_pk_keysize(dest_router_key);
+ pkbytes = (int) crypto_pk_keysize(dest_router_key);
tor_assert(dhbytes == 128);
tor_assert(pkbytes == 128);
@@ -235,7 +235,7 @@ onion_skin_server_handshake(const char *onion_skin, /*ONIONSKIN_CHALLENGE_LEN*/
{
char challenge[ONIONSKIN_CHALLENGE_LEN];
crypto_dh_env_t *dh = NULL;
- int len;
+ ssize_t len;
char *key_material=NULL;
size_t key_material_len=0;
int i;
@@ -258,8 +258,8 @@ onion_skin_server_handshake(const char *onion_skin, /*ONIONSKIN_CHALLENGE_LEN*/
"Couldn't decrypt onionskin: client may be using old onion key");
goto err;
} else if (len != DH_KEY_LEN) {
- log_warn(LD_PROTOCOL, "Unexpected onionskin length after decryption: %d",
- len);
+ log_warn(LD_PROTOCOL, "Unexpected onionskin length after decryption: %ld",
+ (long)len);
goto err;
}
@@ -332,7 +332,7 @@ onion_skin_client_handshake(crypto_dh_env_t *handshake_state,
char *key_out,
size_t key_out_len)
{
- int len;
+ ssize_t len;
char *key_material=NULL;
size_t key_material_len;
tor_assert(crypto_dh_get_bytes(handshake_state) == DH_KEY_LEN);