mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
tweak based on comments from dgoulet
This commit is contained in:
parent
fb91d647ac
commit
41ba4f5627
@ -1289,7 +1289,6 @@ circuit_finish_handshake(origin_circuit_t *circ,
|
|||||||
onion_handshake_state_release(&hop->handshake_state);
|
onion_handshake_state_release(&hop->handshake_state);
|
||||||
|
|
||||||
if (circuit_init_cpath_crypto(hop, keys, 0)<0) {
|
if (circuit_init_cpath_crypto(hop, keys, 0)<0) {
|
||||||
log_warn(LD_BUG, "Couldn't initialize cpath crypto");
|
|
||||||
return -END_CIRC_REASON_TORPROTOCOL;
|
return -END_CIRC_REASON_TORPROTOCOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,14 +292,16 @@ onion_skin_ntor_client_handshake(
|
|||||||
|
|
||||||
memwipe(&s, 0, sizeof(s));
|
memwipe(&s, 0, sizeof(s));
|
||||||
|
|
||||||
if (bad && msg_out) {
|
if (bad) {
|
||||||
if (bad & 4) {
|
if (bad & 4) {
|
||||||
|
if (msg_out)
|
||||||
*msg_out = NULL; /* Don't report this one; we probably just had the
|
*msg_out = NULL; /* Don't report this one; we probably just had the
|
||||||
* wrong onion key.*/
|
* wrong onion key.*/
|
||||||
log_fn(LOG_INFO, LD_PROTOCOL,
|
log_fn(LOG_INFO, LD_PROTOCOL,
|
||||||
"Invalid result from curve25519 handshake: %d", bad);
|
"Invalid result from curve25519 handshake: %d", bad);
|
||||||
}
|
}
|
||||||
if (bad & 3) {
|
if (bad & 3) {
|
||||||
|
if (msg_out)
|
||||||
*msg_out = "Zero output from curve25519 handshake";
|
*msg_out = "Zero output from curve25519 handshake";
|
||||||
log_fn(LOG_WARN, LD_PROTOCOL,
|
log_fn(LOG_WARN, LD_PROTOCOL,
|
||||||
"Invalid result from curve25519 handshake: %d", bad);
|
"Invalid result from curve25519 handshake: %d", bad);
|
||||||
|
Loading…
Reference in New Issue
Block a user