summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-10 12:55:42 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-08 16:47:59 -0500
commite0ab293837c76ee95b8b94f461aefe0f1ac6eff0 (patch)
treefb754e375c22bef624b032075d8bbde8515ea720
parent3d7e485402752d21d01cdf36ae1102d4b013fe85 (diff)
downloadtor-e0ab293837c76ee95b8b94f461aefe0f1ac6eff0.tar.gz
tor-e0ab293837c76ee95b8b94f461aefe0f1ac6eff0.zip
Add a few more debug/info-level logs for ed25519 link handshake stuff
-rw-r--r--src/or/channeltls.c14
-rw-r--r--src/or/connection_or.c8
2 files changed, 20 insertions, 2 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index fafa08cf5d..aef0143c9d 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -1993,12 +1993,15 @@ channel_tls_process_certs_cell(var_cell_t *cell, channel_tls_t *chan)
checked_ed_id, sizeof(ed25519_public_key_t));
}
+ log_debug(LD_HANDSHAKE, "calling client_learned_peer_id from "
+ "process_certs_cell");
+
if (connection_or_client_learned_peer_id(chan->conn,
chan->conn->handshake_state->authenticated_rsa_peer_id,
checked_ed_id) < 0)
ERR("Problem setting or checking peer id");
- log_info(LD_OR,
+ log_info(LD_HANDSHAKE,
"Got some good certificates from %s:%d: Authenticated it with "
"RSA%s",
safe_str(chan->conn->base_.address), chan->conn->base_.port,
@@ -2334,6 +2337,13 @@ channel_tls_process_authenticate_cell(var_cell_t *cell, channel_tls_t *chan)
chan->conn->link_proto < MIN_LINK_PROTO_FOR_WIDE_CIRC_IDS);
crypto_pk_free(identity_rcvd);
+ log_debug(LD_HANDSHAKE,
+ "Calling connection_or_init_conn_from_address for %s "
+ " from %s, with%s ed25519 id.",
+ safe_str(chan->conn->base_.address),
+ __func__,
+ ed_identity_received ? "" : "out");
+
connection_or_init_conn_from_address(chan->conn,
&(chan->conn->base_.addr),
chan->conn->base_.port,
@@ -2342,7 +2352,7 @@ channel_tls_process_authenticate_cell(var_cell_t *cell, channel_tls_t *chan)
ed_identity_received,
0);
- log_info(LD_OR,
+ log_debug(LD_HANDSHAKE,
"Got an AUTHENTICATE cell from %s:%d, type %d: Looks good.",
safe_str(chan->conn->base_.address),
chan->conn->base_.port,
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 0caf8a97fd..e10eaaf35c 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -831,6 +831,12 @@ connection_or_init_conn_from_address(or_connection_t *conn,
const ed25519_public_key_t *ed_id,
int started_here)
{
+ log_debug(LD_HANDSHAKE, "init conn from address %s: %s, %s (%d)",
+ fmt_addr(addr),
+ hex_str((const char*)id_digest, DIGEST_LEN),
+ ed25519_fmt(ed_id),
+ started_here);
+
const node_t *r = node_get_by_id(id_digest);
connection_or_set_identity_digest(conn, id_digest, ed_id);
connection_or_update_token_buckets_helper(conn, 1, get_options());
@@ -1510,6 +1516,8 @@ connection_or_check_valid_tls_handshake(or_connection_t *conn,
if (started_here) {
/* A TLS handshake can't teach us an Ed25519 ID, so we set it to NULL
* here. */
+ log_debug(LD_HANDSHAKE, "Calling client_learned_peer_id from "
+ "check_valid_tls_handshake");
return connection_or_client_learned_peer_id(conn,
(const uint8_t*)digest_rcvd_out,
NULL);