Enable the server to call SSL_write() without stopping the ability to call SSL_read_early()
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c
index a1807f2..50c4345 100644
--- a/ssl/statem/statem.c
+++ b/ssl/statem/statem.c
@@ -170,9 +170,11 @@
void ossl_statem_check_finish_init(SSL *s, int send)
{
- if ((send && s->statem.hand_state == TLS_ST_CW_PENDING_EARLY_DATA_END)
- || (!send && s->statem.hand_state == TLS_ST_CW_EARLY_DATA))
- ossl_statem_set_in_init(s, 1);
+ if (!s->server) {
+ if ((send && s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END)
+ || (!send && s->statem.hand_state == TLS_ST_EARLY_DATA))
+ ossl_statem_set_in_init(s, 1);
+ }
}
void ossl_statem_set_hello_verify_done(SSL *s)