BUG/MEDIUM: ssl: Revamp the way early data are handled.

Instead of attempting to read the early data only when the upper layer asks
for data, allocate a temporary buffer, stored in the ssl_sock_ctx, and put
all the early data in there. Requiring that the upper layer takes care of it
means that if for some reason the upper layer wants to emit data before it
has totally read the early data, we will be stuck forever.

This should be backported to 2.1 and 2.0.
This may fix github issue #411.

(cherry picked from commit 54907bb848962cc89d18fffb40af32010e4090b0)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 5cd8de406cc8537c9c487d31e95f5907b696ede3)
Signed-off-by: Willy Tarreau <w@1wt.eu>
1 file changed