mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r18041@catbus: nickm | 2008-02-11 23:43:18 -0500
Make version negotiation and handshaking messages more useful and accurate. svn:r13477
This commit is contained in:
+4
-1
@@ -921,6 +921,8 @@ tor_tls_handshake(tor_tls_t *tls)
|
||||
" get set. Fixing that.");
|
||||
}
|
||||
tls->wasV2Handshake = 1;
|
||||
log_debug(LD_NET, "Completed V2 TLS handshake with client; waiting "
|
||||
"for renegotiation."));
|
||||
} else {
|
||||
tls->wasV2Handshake = 0;
|
||||
}
|
||||
@@ -934,7 +936,8 @@ tor_tls_handshake(tor_tls_t *tls)
|
||||
if (n_certs > 1 || (n_certs == 1 && cert != sk_X509_value(chain, 0)))
|
||||
tls->wasV2Handshake = 0;
|
||||
else {
|
||||
log_debug(LD_NET, "I think I got a v2 handshake on %p!", tls);
|
||||
log_debug(LD_NET, "Server sent back a single certificate; looks like "
|
||||
"a v2 handshake on %p.", tls);
|
||||
tls->wasV2Handshake = 1;
|
||||
}
|
||||
if (cert)
|
||||
|
||||
+4
-3
@@ -487,7 +487,7 @@ command_process_versions_cell(var_cell_t *cell, or_connection_t *conn)
|
||||
conn->link_proto = highest_supported_version;
|
||||
conn->handshake_state->received_versions = 1;
|
||||
|
||||
log_info(LD_OR, "Negotiated version %d with %s",
|
||||
log_info(LD_OR, "Negotiated version %d with %s; sending NETINFO.",
|
||||
highest_supported_version, safe_str(conn->_base.address));
|
||||
tor_assert(conn->link_proto >= 2);
|
||||
|
||||
@@ -595,8 +595,9 @@ command_process_netinfo_cell(cell_t *cell, or_connection_t *conn)
|
||||
if (connection_or_set_state_open(conn)<0)
|
||||
connection_mark_for_close(TO_CONN(conn));
|
||||
else
|
||||
log_info(LD_OR, "Got good NETINFO cell from %s",
|
||||
safe_str(conn->_base.address));
|
||||
log_info(LD_OR, "Got good NETINFO cell from %s; OR connection is now "
|
||||
"open, using protocol version %d",
|
||||
safe_str(conn->_base.address), (int)conn->link_proto);
|
||||
assert_connection_ok(TO_CONN(conn),time(NULL));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user