From 410e440a8d40e556cc445a1ecc6a8ed4109434b6 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 6 Oct 2010 23:17:35 -0400 Subject: Log SSL state changes at LOG_DEBUG, LD_HANDSHAKE. This can be slightly useful for debugging blocking events. Addresses ticket 3116; based on loud_ssl_states branch. --- src/common/tortls.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/tortls.c b/src/common/tortls.c index aaf2fdaac..94ca81ba4 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -899,6 +899,13 @@ tor_tls_client_is_using_v2_ciphers(const SSL *ssl, const char *address) return 1; } +static void +tor_tls_debug_state_callback(const SSL *ssl, int type, int val) +{ + log_debug(LD_HANDSHAKE, "SSL %p is now in state %s [type=%d,val=%d].", + ssl, ssl_state_to_string(ssl->state), type, val); +} + /** Invoked when we're accepting a connection on ssl, and the connection * changes state. We use this: *