From 76b86b033ecc7cd7b065a7ddf2fc11480ae96205 Mon Sep 17 00:00:00 2001 From: Saravanan Murugesan Date: Fri, 25 Feb 2022 16:43:29 +0530 Subject: [PATCH] tls: Handle transport disconnect during client HS failures Type: fix Signed-off-by: Saravanan Murugesan Change-Id: I5f7f4b925b3d250c5b8616d1fb35edbde50a7a23 --- src/plugins/tlsopenssl/tls_openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/tlsopenssl/tls_openssl.c b/src/plugins/tlsopenssl/tls_openssl.c index 964230f178f..2befac0dc28 100644 --- a/src/plugins/tlsopenssl/tls_openssl.c +++ b/src/plugins/tlsopenssl/tls_openssl.c @@ -266,6 +266,7 @@ openssl_handle_handshake_failure (tls_ctx_t * ctx) * Also handles cleanup of the pre-allocated session */ tls_notify_app_connected (ctx, SESSION_E_TLS_HANDSHAKE); + tls_disconnect_transport (ctx); } } @@ -331,7 +332,7 @@ openssl_ctx_handshake_rx (tls_ctx_t * ctx, session_t * tls_session) */ if (ctx->srv_hostname) { - tls_notify_app_connected (ctx, SESSION_E_TLS_HANDSHAKE); + openssl_handle_handshake_failure (ctx); return -1; } } -- 2.16.6