Don't flush the ClientHello if we're going to send early data
authorMatt Caswell <matt@openssl.org>
Mon, 27 Nov 2017 15:20:06 +0000 (15:20 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 28 Dec 2017 17:32:41 +0000 (17:32 +0000)
commit2a8db717132ec8be7dc24ce7083972245b1173ae
tree59f70fabe776929afaf082e632d63988a7214699
parentbfa470a4f64313651a35571883e235d3335054eb
Don't flush the ClientHello if we're going to send early data

We'd like the first bit of early_data and the ClientHello to go in the
same TCP packet if at all possible to enable things like TCP Fast Open.
Also, if you're only going to send one block of early data then you also
don't need to worry about TCP_NODELAY.

Fixes #4783

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4802)
ssl/ssl_lib.c
ssl/ssl_locl.h
ssl/statem/statem.h
ssl/statem/statem_clnt.c
ssl/statem/statem_lib.c
ssl/statem/statem_locl.h
ssl/statem/statem_srvr.c