tls: propagate reads to app irrespective of state 28/39628/2
authorFlorin Coras <fcoras@cisco.com>
Sat, 7 Oct 2023 21:27:52 +0000 (14:27 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Sun, 8 Oct 2023 00:16:56 +0000 (00:16 +0000)
Session input node handles rx notifications even if session not fully
accepted/connected

Type: fix

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

src/plugins/tlsopenssl/tls_openssl.c
src/plugins/tlspicotls/tls_picotls.c

index a3e93e1..15bea86 100644 (file)
@@ -560,8 +560,7 @@ openssl_ctx_read_tls (tls_ctx_t *ctx, session_t *tls_session)
       return 0;
     }
 
-  /* If handshake just completed, session may still be in accepting state */
-  if (read && app_session->session_state >= SESSION_STATE_READY)
+  if (read)
     tls_notify_app_enqueue (ctx, app_session);
 
   if ((SSL_pending (oc->ssl) > 0) ||
index 393f2bf..4c19084 100644 (file)
@@ -445,7 +445,7 @@ picotls_ctx_read (tls_ctx_t *ctx, session_t *tcp_session)
   app_session = session_get_from_handle (ctx->app_session_handle);
   wrote = ptls_tcp_to_app_write (ptls_ctx, app_session->rx_fifo, tcp_rx_fifo);
 
-  if (wrote && app_session->session_state >= SESSION_STATE_READY)
+  if (wrote)
     tls_notify_app_enqueue (ctx, app_session);
 
   if (ptls_ctx->read_buffer_offset || svm_fifo_max_dequeue (tcp_rx_fifo))