summaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-23 00:08:26 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-23 00:08:26 +0000
commitcd702643770fb17c00a67f8f5154e6852acb5e1c (patch)
tree234e4dad86a8c9e60d82479dbd815187f9eaaa0b /src/common/tortls.c
parent6fc834ab16936530166aa087d9469048c65b1697 (diff)
downloadtor-cd702643770fb17c00a67f8f5154e6852acb5e1c.tar.gz
tor-cd702643770fb17c00a67f8f5154e6852acb5e1c.zip
Clean up some logging and interfaces
svn:r2945
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 578c093ebe..d930f46422 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -441,12 +441,13 @@ tor_tls_read(tor_tls *tls, char *cp, size_t len)
if (r > 0)
return r;
err = tor_tls_get_error(tls, r, CATCH_ZERO, "reading", LOG_INFO);
- log_fn(LOG_DEBUG,"returned r=%d, err=%d",r,err);
if (err == _TOR_TLS_ZERORETURN) {
+ log_fn(LOG_DEBUG,"read returned r=%d; TLS is closed",r);
tls->state = TOR_TLS_ST_CLOSED;
return TOR_TLS_CLOSE;
} else {
tor_assert(err != TOR_TLS_DONE);
+ log_fn(LOG_DEBUG,"read returned r=%d, err=%d",r,err);
return err;
}
}
@@ -479,7 +480,6 @@ tor_tls_write(tor_tls *tls, char *cp, size_t n)
return r;
}
if (err == TOR_TLS_WANTWRITE || err == TOR_TLS_WANTREAD) {
-// log_fn(LOG_INFO,"wantwrite or wantread. remembering the number %d.",n);
tls->wantwrite_n = n;
}
return err;
@@ -685,7 +685,6 @@ tor_tls_verify(tor_tls *tls, crypto_pk_env_t **identity_key)
if (!(chain = SSL_get_peer_cert_chain(tls->ssl)))
goto done;
num_in_chain = sk_X509_num(chain);
- log_fn(LOG_DEBUG,"Number of certs in chain: %d", num_in_chain);
/* 1 means we're receiving (server-side), and it's just the id_cert.
* 2 means we're connecting (client-side), and it's both the link
* cert and the id_cert.