diff --git a/changes/bug3264 b/changes/bug3264 new file mode 100644 index 0000000000..dcd0a842f6 --- /dev/null +++ b/changes/bug3264 @@ -0,0 +1,4 @@ + o Minor features: + - Log SSL state transitions at log level DEBUG, log domain + HANDSHAKE. This can be useful for debugging censorship events. + Implements ticket 3264. diff --git a/src/common/tortls.c b/src/common/tortls.c index aaf2fdaacb..94ca81ba49 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: *