aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2005-10-17 16:21:42 +0000
committerPeter Palfrader <peter@palfrader.org>2005-10-17 16:21:42 +0000
commit0d9aedfcea6d9b9f2e36bcc6176da8ac0f31a9b0 (patch)
treeb4e573d9050e828ba4bc6659f3db42f31a4667e7 /src/or/onion.c
parentbec2271029463b426a9c87330ff392b9807d62ec (diff)
downloadtor-0d9aedfcea6d9b9f2e36bcc6176da8ac0f31a9b0.tar.gz
tor-0d9aedfcea6d9b9f2e36bcc6176da8ac0f31a9b0.zip
Downgrade a few INFO level logs to DEBUG again. Also add two or three new
logs in cases where a calling function's log was downgraded and we wouldn't get any log message otherwise. svn:r5263
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index c33f5e1aa4..c6a5909646 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -245,8 +245,10 @@ onion_skin_server_handshake(const char *onion_skin, /* ONIONSKIN_CHALLENGE_LEN b
}
dh = crypto_dh_new();
- if (crypto_dh_get_public(dh, handshake_reply_out, DH_KEY_LEN))
+ if (crypto_dh_get_public(dh, handshake_reply_out, DH_KEY_LEN)) {
+ log_fn(LOG_INFO, "crypto_dh_get_public failed.");
goto err;
+ }
#ifdef DEBUG_ONION_SKINS
printf("Server: server g^y:");
@@ -259,8 +261,10 @@ onion_skin_server_handshake(const char *onion_skin, /* ONIONSKIN_CHALLENGE_LEN b
key_material = tor_malloc(DIGEST_LEN+key_out_len);
len = crypto_dh_compute_secret(dh, challenge, DH_KEY_LEN,
key_material, DIGEST_LEN+key_out_len);
- if (len < 0)
+ if (len < 0) {
+ log_fn(LOG_INFO, "crypto_dh_compute_secret failed.");
goto err;
+ }
/* send back H(K|0) as proof that we learned K. */
memcpy(handshake_reply_out+DH_KEY_LEN, key_material, DIGEST_LEN);