summaryrefslogtreecommitdiffstats
path: root/src/plugins/tlsopenssl
diff options
context:
space:
mode:
authorSivaprasad Tummala <Sivaprasad.Tummala@intel.com>2021-03-22 21:21:56 +0530
committerSivaprasad Tummala <Sivaprasad.Tummala@intel.com>2021-03-22 21:24:48 +0530
commit04161c8f201f95c8354fc583d67e808440d33b9d (patch)
treebba998e554ac8a6eed9b6e3ff1f4d2ce3c9cd110 /src/plugins/tlsopenssl
parent8919fec5acb14d176b992b71108f9a912d98161e (diff)
tls: fix tlsopenssl for remaining buffer
Type: fix 1. added additional checks for pending data in openssl_ctx_read_tls(). 2. fixed read/write typo issues. Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com> Change-Id: Id018c62bb9e02bf0d5f9abf929b6030b965a5d61
Diffstat (limited to 'src/plugins/tlsopenssl')
-rw-r--r--src/plugins/tlsopenssl/tls_openssl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/tlsopenssl/tls_openssl.c b/src/plugins/tlsopenssl/tls_openssl.c
index c906d0e294a..a10372d1c9c 100644
--- a/src/plugins/tlsopenssl/tls_openssl.c
+++ b/src/plugins/tlsopenssl/tls_openssl.c
@@ -475,7 +475,7 @@ openssl_ctx_read_tls (tls_ctx_t *ctx, session_t *tls_session)
{
openssl_ctx_t *oc = (openssl_ctx_t *) ctx;
session_t *app_session;
- int read, wrote = 0;
+ int read;
svm_fifo_t *f;
if (PREDICT_FALSE (SSL_in_init (oc->ssl)))
@@ -493,10 +493,11 @@ openssl_ctx_read_tls (tls_ctx_t *ctx, session_t *tls_session)
if (read && app_session->session_state >= SESSION_STATE_READY)
tls_notify_app_enqueue (ctx, app_session);
- if (SSL_pending (oc->ssl) > 0)
+ if ((SSL_pending (oc->ssl) > 0) ||
+ svm_fifo_max_dequeue_cons (tls_session->rx_fifo))
tls_add_vpp_q_builtin_rx_evt (tls_session);
- return wrote;
+ return read;
}
static inline int