summaryrefslogtreecommitdiffstats
path: root/ssl/statem/statem.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-02-25 15:59:44 +0000
committerMatt Caswell <matt@openssl.org>2017-03-02 17:44:16 +0000
commitd7f8783ff9e88ad34e010564d721a55a48c6d674 (patch)
tree42f45aced29f5db352b88a6f27a75567af7cd3ea /ssl/statem/statem.c
parent564547e482406c2d4c56a59e288b3a479dac2d74 (diff)
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)
Diffstat (limited to 'ssl/statem/statem.c')
-rw-r--r--ssl/statem/statem.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c
index a1807f2a40..50c4345971 100644
--- a/ssl/statem/statem.c
+++ b/ssl/statem/statem.c
@@ -170,9 +170,11 @@ int ossl_statem_skip_early_data(SSL *s)
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)