Very blunt debugging code: log pending errors at start and end of tor_tls_verify

svn:r1707
This commit is contained in:
Nick Mathewson 2004-04-26 02:33:12 +00:00
parent 10f3b74cb9
commit cb465160da

View File

@ -434,7 +434,7 @@ tor_tls_handshake(tor_tls *tls)
r = tor_tls_get_error(tls,r,0, "handshaking", LOG_INFO);
if (r == TOR_TLS_DONE) {
tls->state = TOR_TLS_ST_OPEN;
}
}
return r;
}
@ -558,6 +558,9 @@ tor_tls_verify(tor_tls *tls, crypto_pk_env_t *identity_key)
time_t now, t;
int r = -1;
/* XXXX */
tls_log_errors(LOG_WARN, "preparing to verify");
if (!(cert = SSL_get_peer_certificate(tls->ssl)))
return -1;
@ -587,6 +590,10 @@ tor_tls_verify(tor_tls *tls, crypto_pk_env_t *identity_key)
X509_free(cert);
if (id_pkey)
EVP_PKEY_free(id_pkey);
/* XXXX */
tls_log_errors(LOG_WARN, "finishing tor_tls_verify");
return r;
}