aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-02-13 09:37:53 +0000
committerRoger Dingledine <arma@torproject.org>2006-02-13 09:37:53 +0000
commitaa63a84fe10a32c33dac183517e8c41b7494a128 (patch)
tree1f65795d6dbe4cdf5657c9669e328e6db11b5791 /src/or/onion.c
parentd113b75da675e1805548e75ba62f32d77b3861ae (diff)
downloadtor-aa63a84fe10a32c33dac183517e8c41b7494a128.tar
tor-aa63a84fe10a32c33dac183517e8c41b7494a128.tar.gz
the things we do for our windows users.
i hope they appreciate it. svn:r6004
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index ecf0bcc24..315c5f12d 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -57,11 +57,11 @@ onion_pending_add(circuit_t *circ)
tor_assert(!ol_tail->next);
if (ol_length >= get_options()->MaxOnionsPending) {
- warn(LD_GENERAL,
- "Your computer is too slow to handle this many circuit "
- "creation requests! Please consider using the "
- "MaxAdvertisedBandwidth config option or choosing a more "
- "restricted exit policy.");
+ log_warn(LD_GENERAL,
+ "Your computer is too slow to handle this many circuit "
+ "creation requests! Please consider using the "
+ "MaxAdvertisedBandwidth config option or choosing a more "
+ "restricted exit policy.");
tor_free(tmp);
return -1;
}
@@ -73,8 +73,8 @@ onion_pending_add(circuit_t *circ)
/* cull elderly requests. */
circ = ol_list->circ;
onion_pending_remove(ol_list->circ);
- info(LD_CIRC,
- "Circuit create request is too old; cancelling due to overload.");
+ log_info(LD_CIRC,
+ "Circuit create request is too old; cancelling due to overload.");
circuit_mark_for_close(circ, END_CIRC_REASON_RESOURCELIMIT);
}
return 0;
@@ -122,9 +122,9 @@ onion_pending_remove(circuit_t *circ)
} else { /* we need to hunt through the rest of the list */
for ( ;tmpo->next && tmpo->next->circ != circ; tmpo=tmpo->next) ;
if (!tmpo->next) {
- debug(LD_GENERAL,
- "circ (p_circ_id %d) not in list, probably at cpuworker.",
- circ->p_circ_id);
+ log_debug(LD_GENERAL,
+ "circ (p_circ_id %d) not in list, probably at cpuworker.",
+ circ->p_circ_id);
return;
}
/* now we know tmpo->next->circ == circ */
@@ -244,18 +244,18 @@ onion_skin_server_handshake(const char *onion_skin, /*ONIONSKIN_CHALLENGE_LEN*/
break;
}
if (len<0) {
- info(LD_PROTOCOL,
- "Couldn't decrypt onionskin: client may be using old onion key");
+ log_info(LD_PROTOCOL,
+ "Couldn't decrypt onionskin: client may be using old onion key");
goto err;
} else if (len != DH_KEY_LEN) {
- warn(LD_PROTOCOL, "Unexpected onionskin length after decryption: %d",
- len);
+ log_warn(LD_PROTOCOL, "Unexpected onionskin length after decryption: %d",
+ len);
goto err;
}
dh = crypto_dh_new();
if (crypto_dh_get_public(dh, handshake_reply_out, DH_KEY_LEN)) {
- info(LD_GENERAL, "crypto_dh_get_public failed.");
+ log_info(LD_GENERAL, "crypto_dh_get_public failed.");
goto err;
}
@@ -271,7 +271,7 @@ onion_skin_server_handshake(const char *onion_skin, /*ONIONSKIN_CHALLENGE_LEN*/
len = crypto_dh_compute_secret(dh, challenge, DH_KEY_LEN,
key_material, DIGEST_LEN+key_out_len);
if (len < 0) {
- info(LD_GENERAL, "crypto_dh_compute_secret failed.");
+ log_info(LD_GENERAL, "crypto_dh_compute_secret failed.");
goto err;
}
@@ -336,8 +336,8 @@ onion_skin_client_handshake(crypto_dh_env_t *handshake_state,
if (memcmp(key_material, handshake_reply+DH_KEY_LEN, 20)) {
/* H(K) does *not* match. Something fishy. */
tor_free(key_material);
- warn(LD_PROTOCOL,"Digest DOES NOT MATCH on onion handshake. "
- "Bug or attack.");
+ log_warn(LD_PROTOCOL,"Digest DOES NOT MATCH on onion handshake. "
+ "Bug or attack.");
return -1;
}
@@ -422,8 +422,8 @@ fast_client_handshake(const char *handshake_state, /* DIGEST_LEN bytes */
}
if (memcmp(out, handshake_reply_out+DIGEST_LEN, DIGEST_LEN)) {
/* H(K) does *not* match. Something fishy. */
- warn(LD_PROTOCOL,"Digest DOES NOT MATCH on fast handshake. "
- "Bug or attack.");
+ log_warn(LD_PROTOCOL,"Digest DOES NOT MATCH on fast handshake. "
+ "Bug or attack.");
return -1;
}
memcpy(key_out, out+DIGEST_LEN, key_out_len);