diff options
author | Yu Ping <ping.yu@intel.com> | 2020-01-07 04:02:55 +0800 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2020-08-12 14:37:52 +0000 |
commit | da99771dfe04b56ea053178af0d8fec40201c69f (patch) | |
tree | 7a611d4c1e381059694d4c2289b0c1db5b786276 /src | |
parent | 20ebef4714ebbc7d533a0c9c03bb39f8a1014365 (diff) |
tls: Make tls CPS test run for a quite long time
Type: fix
Change-Id: I8cfb48bd7f92689b296861dd368186408918061b
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit a9ed934745403461834b4361f06bd3865682f368)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/tlsopenssl/tls_openssl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/tlsopenssl/tls_openssl.c b/src/plugins/tlsopenssl/tls_openssl.c index e68251c742b..770d2777a1f 100644 --- a/src/plugins/tlsopenssl/tls_openssl.c +++ b/src/plugins/tlsopenssl/tls_openssl.c @@ -423,8 +423,10 @@ openssl_ctx_read (tls_ctx_t * ctx, session_t * tls_session) if (PREDICT_FALSE (SSL_in_init (oc->ssl))) { - openssl_ctx_handshake_rx (ctx, tls_session); - return 0; + if (openssl_ctx_handshake_rx (ctx, tls_session) < 0) + return 0; + else + goto check_app_fifo; } f = tls_session->rx_fifo; @@ -486,7 +488,9 @@ check_app_fifo: svm_fifo_enqueue_nocopy (f, read); } - tls_notify_app_enqueue (ctx, app_session); + /* If handshake just completed, session may still be in accepting state */ + if (app_session->session_state >= SESSION_STATE_READY) + tls_notify_app_enqueue (ctx, app_session); if (SSL_pending (oc->ssl) > 0) tls_add_vpp_q_builtin_rx_evt (tls_session); |