summaryrefslogtreecommitdiff
path: root/src/or/rendmid.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-04-05 17:20:57 +0000
committerNick Mathewson <nickm@torproject.org>2004-04-05 17:20:57 +0000
commit1e2b008700e7e2a8e95a3c43a33cb3eef9fab3c6 (patch)
tree49900d85bec8cda18ba390400e95abd4088c2e4f /src/or/rendmid.c
parent84b9e90d5f17252e6c919a10482063ffd8c8e41c (diff)
downloadtor-1e2b008700e7e2a8e95a3c43a33cb3eef9fab3c6.tar.gz
tor-1e2b008700e7e2a8e95a3c43a33cb3eef9fab3c6.zip
Add some temporary log calls to try to debug the "Hash of session info was not as expected" problem
svn:r1479
Diffstat (limited to 'src/or/rendmid.c')
-rw-r--r--src/or/rendmid.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/rendmid.c b/src/or/rendmid.c
index fd3ee54b0a..aea65f47f2 100644
--- a/src/or/rendmid.c
+++ b/src/or/rendmid.c
@@ -17,6 +17,7 @@ rend_mid_establish_intro(circuit_t *circ, const char *request, int request_len)
int asn1len;
circuit_t *c;
char hexid[9];
+ char hexdigest[20*2+1];
log_fn(LOG_INFO,
"Received an ESTABLISH_INTRO request on circuit %d", circ->p_circ_id);
@@ -39,6 +40,10 @@ rend_mid_establish_intro(circuit_t *circ, const char *request, int request_len)
goto err;
}
+ /* XXX remove after debuggin */
+ hex_encode(circ->handshake_digest, 20, hexdigest);
+ log_fn(LOG_INFO, "Handshake information is: %s", hexdigest);
+
/* Next 20 bytes: Hash of handshake_digest | "INTRODUCE" */
memcpy(buf, circ->handshake_digest, 20);
memcpy(buf+20, "INTRODUCE", 9);
@@ -46,6 +51,10 @@ rend_mid_establish_intro(circuit_t *circ, const char *request, int request_len)
log_fn(LOG_WARN, "Error computing digest");
goto err;
}
+ hex_encode(expected_digest, 20, hexdigest);
+ log_fn(LOG_INFO, "Expected digest is: %s", hexdigest);
+ hex_encode(buf+2+asn1len, 20, hexdigest);
+ log_fn(LOG_INFO, "Received digest is: %s", hexdigest);
if (memcmp(expected_digest, buf+2+asn1len, 20)) {
log_fn(LOG_WARN, "Hash of session info was not as expected");
goto err;