diff options
Diffstat (limited to 'src/or/onion_ntor.c')
-rw-r--r-- | src/or/onion_ntor.c | 10 |
1 files changed, 6 insertions, 4 deletions
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); } |