diff options
-rw-r--r-- | src/common/tortls.c | 4 | ||||
-rw-r--r-- | src/test/test_tortls.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index a62efb5575..23889be259 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -1489,6 +1489,10 @@ tor_tls_server_info_callback(const SSL *ssl, int type, int val) tor_tls_t *tls; (void) val; + IF_BUG_ONCE(ssl == NULL) { + return; // LCOV_EXCL_LINE + } + tor_tls_debug_state_callback(ssl, type, val); if (type != SSL_CB_ACCEPT_LOOP) diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c index 3a048fb1f0..9115823f31 100644 --- a/src/test/test_tortls.c +++ b/src/test/test_tortls.c @@ -1831,8 +1831,6 @@ test_tortls_server_info_callback(void *ignored) tls->magic = TOR_TLS_MAGIC; tls->ssl = ssl; - tor_tls_server_info_callback(NULL, 0, 0); - SSL_set_state(ssl, SSL3_ST_SW_SRVR_HELLO_A); mock_clean_saved_logs(); tor_tls_server_info_callback(ssl, SSL_CB_ACCEPT_LOOP, 0); |