tls: flag no app session on handshake failure 15/38815/3
authorFlorin Coras <fcoras@cisco.com>
Fri, 12 May 2023 00:40:26 +0000 (17:40 -0700)
committerDave Wallace <dwallacelf@gmail.com>
Fri, 19 May 2023 20:46:06 +0000 (20:46 +0000)
If openssl tls server handshake fails, track the fact that the context
does not have an app session.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5f493059a3610067b59caffbbe441ce9e0868252

src/plugins/tlsopenssl/tls_openssl.c

index 426bf2f..97b32bd 100644 (file)
@@ -273,10 +273,10 @@ openssl_handle_handshake_failure (tls_ctx_t * ctx)
       if (app_session)
        {
          session_free (app_session);
-         ctx->no_app_session = 1;
          ctx->c_s_index = SESSION_INVALID_INDEX;
          tls_disconnect_transport (ctx);
        }
+      ctx->no_app_session = 1;
     }
   else
     {