summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-02-02 14:37:02 -0500
committerNick Mathewson <nickm@torproject.org>2015-02-02 14:42:33 -0500
commit41ba4f5627326e1745f0eea143f038677170c596 (patch)
treed331f778b91491b9c2d1b40371a1155975c0f544 /src
parentfb91d647acdf0560fc7479d72eeea52e4e6ff41d (diff)
downloadtor-41ba4f5627326e1745f0eea143f038677170c596.tar.gz
tor-41ba4f5627326e1745f0eea143f038677170c596.zip
tweak based on comments from dgoulet
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitbuild.c1
-rw-r--r--src/or/onion_ntor.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 873eba1668..676e69cc70 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1289,7 +1289,6 @@ circuit_finish_handshake(origin_circuit_t *circ,
onion_handshake_state_release(&hop->handshake_state);
if (circuit_init_cpath_crypto(hop, keys, 0)<0) {
- log_warn(LD_BUG, "Couldn't initialize cpath crypto");
return -END_CIRC_REASON_TORPROTOCOL;
}
diff --git a/src/or/onion_ntor.c b/src/or/onion_ntor.c
index 32d5344520..a7c0545dc7 100644
--- a/src/or/onion_ntor.c
+++ b/src/or/onion_ntor.c
@@ -292,15 +292,17 @@ onion_skin_ntor_client_handshake(
memwipe(&s, 0, sizeof(s));
- if (bad && msg_out) {
+ if (bad) {
if (bad & 4) {
- *msg_out = NULL; /* Don't report this one; we probably just had the
- * wrong onion key.*/
+ if (msg_out)
+ *msg_out = NULL; /* Don't report this one; we probably just had the
+ * wrong onion key.*/
log_fn(LOG_INFO, LD_PROTOCOL,
"Invalid result from curve25519 handshake: %d", bad);
}
if (bad & 3) {
- *msg_out = "Zero output from curve25519 handshake";
+ if (msg_out)
+ *msg_out = "Zero output from curve25519 handshake";
log_fn(LOG_WARN, LD_PROTOCOL,
"Invalid result from curve25519 handshake: %d", bad);
}