summaryrefslogtreecommitdiffstats
path: root/src/plugins/tlsopenssl/tls_openssl.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-01-10 09:15:41 -0800
committerDave Barach <openvpp@barachs.net>2022-01-11 17:05:18 +0000
commit0cef5f5d7171e05389beee0e6b4250b366b2b28e (patch)
treee030ab6bbb5438bb6c84b6b7d3712fe3219256aa /src/plugins/tlsopenssl/tls_openssl.c
parent30d46e7455b20c46d97ad04f72afce3995e4a2c4 (diff)
tls: ssl close only after all data drained
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia77b26db61b6f58b4ff659f09192b4ea93ed50b4
Diffstat (limited to 'src/plugins/tlsopenssl/tls_openssl.c')
-rw-r--r--src/plugins/tlsopenssl/tls_openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/tlsopenssl/tls_openssl.c b/src/plugins/tlsopenssl/tls_openssl.c
index add6d7e0850..ac8529926bd 100644
--- a/src/plugins/tlsopenssl/tls_openssl.c
+++ b/src/plugins/tlsopenssl/tls_openssl.c
@@ -363,6 +363,8 @@ openssl_ctx_handshake_rx (tls_ctx_t * ctx, session_t * tls_session)
static void
openssl_confirm_app_close (tls_ctx_t * ctx)
{
+ openssl_ctx_t *oc = (openssl_ctx_t *) ctx;
+ SSL_shutdown (oc->ssl);
tls_disconnect_transport (ctx);
session_transport_closed_notify (&ctx->connection);
}
@@ -931,8 +933,6 @@ openssl_app_close (tls_ctx_t * ctx)
openssl_ctx_t *oc = (openssl_ctx_t *) ctx;
session_t *app_session;
- SSL_shutdown (oc->ssl);
-
/* Wait for all data to be written to tcp */
app_session = session_get_from_handle (ctx->app_session_handle);
if (BIO_ctrl_pending (oc->rbio) <= 0