diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-30 04:16:49 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-30 04:16:49 +0000 |
commit | 52932d6f1a72b9cd3a0bd9571016fa763662d3d6 (patch) | |
tree | 29b3db3881b4bfb2bde2f1e79c6d9848088aaf5f /src/or/onion.c | |
parent | ffe22fab9b81f4b0dea35bc2fb756d4a60cf3ed3 (diff) | |
download | tor-52932d6f1a72b9cd3a0bd9571016fa763662d3d6.tar.gz tor-52932d6f1a72b9cd3a0bd9571016fa763662d3d6.zip |
Remove some code that is #ifdefed out, and that we no longer seem to use, if we ever did.
svn:r17827
Diffstat (limited to 'src/or/onion.c')
-rw-r--r-- | src/or/onion.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/or/onion.c b/src/or/onion.c index a51dc3e7ac..b73e174298 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -187,21 +187,6 @@ onion_skin_create(crypto_pk_env_t *dest_router_key, if (crypto_dh_get_public(dh, challenge, dhbytes)) goto err; -#ifdef DEBUG_ONION_SKINS -#define PA(a,n) \ - { int _i; for (_i = 0; _i<n; ++_i) printf("%02x ",((int)(a)[_i])&0xFF); } - - printf("Client: client g^x:"); - PA(challenge+16,3); - printf("..."); - PA(challenge+141,3); - puts(""); - - printf("Client: client symkey:"); - PA(challenge+0,16); - puts(""); -#endif - note_crypto_pk_op(ENC_ONIONSKIN); /* set meeting point, meeting cookie, etc here. Leave zero for now. */ @@ -269,14 +254,6 @@ onion_skin_server_handshake(const char *onion_skin, /*ONIONSKIN_CHALLENGE_LEN*/ goto err; } -#ifdef DEBUG_ONION_SKINS - printf("Server: server g^y:"); - PA(handshake_reply_out+0,3); - printf("..."); - PA(handshake_reply_out+125,3); - puts(""); -#endif - key_material_len = DIGEST_LEN+key_out_len; key_material = tor_malloc(key_material_len); len = crypto_dh_compute_secret(dh, challenge, DH_KEY_LEN, @@ -292,15 +269,6 @@ onion_skin_server_handshake(const char *onion_skin, /*ONIONSKIN_CHALLENGE_LEN*/ /* use the rest of the key material for our shared keys, digests, etc */ memcpy(key_out, key_material+DIGEST_LEN, key_out_len); -#ifdef DEBUG_ONION_SKINS - printf("Server: key material:"); - PA(key_material, DH_KEY_LEN); - puts(""); - printf("Server: keys out:"); - PA(key_out, key_out_len); - puts(""); -#endif - memset(challenge, 0, sizeof(challenge)); memset(key_material, 0, key_material_len); tor_free(key_material); @@ -337,14 +305,6 @@ onion_skin_client_handshake(crypto_dh_env_t *handshake_state, size_t key_material_len; tor_assert(crypto_dh_get_bytes(handshake_state) == DH_KEY_LEN); -#ifdef DEBUG_ONION_SKINS - printf("Client: server g^y:"); - PA(handshake_reply+0,3); - printf("..."); - PA(handshake_reply+125,3); - puts(""); -#endif - key_material_len = DIGEST_LEN + key_out_len; key_material = tor_malloc(key_material_len); len = crypto_dh_compute_secret(handshake_state, handshake_reply, DH_KEY_LEN, @@ -362,12 +322,6 @@ onion_skin_client_handshake(crypto_dh_env_t *handshake_state, /* use the rest of the key material for our shared keys, digests, etc */ memcpy(key_out, key_material+DIGEST_LEN, key_out_len); -#ifdef DEBUG_ONION_SKINS - printf("Client: keys out:"); - PA(key_out, key_out_len); - puts(""); -#endif - memset(key_material, 0, key_material_len); tor_free(key_material); return 0; |