BUG/MEDIUM: ssl: Don't set the max early data we can receive too early.
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 17 Dec 2019 14:39:54 +0000 (15:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Dec 2019 08:17:31 +0000 (09:17 +0100)
commita0a513399a7ed0b6b4a4cca5d5cb2a2b90674d46
treef6fe9d1a5134e9b471af0cd96513b5412140d8d0
parentd4286388c0b4ea6b8c719bc0b9c68ccf7dc4c227
BUG/MEDIUM: ssl: Don't set the max early data we can receive too early.

When accepting the max early data, don't set it on the SSL_CTX while parsing
the configuration, as at this point global.tune.maxrewrite may still be -1,
either because it was not set, or because it hasn't been set yet. Instead,
set it for each connection, just after we created the new SSL.
Not doing so meant that we could pretend to accept early data bigger than one
of our buffer.

This should be backported to 2.1, 2.0, 1.9 and 1.8.

(cherry picked from commit 545989f37f56b47a52af410e5c41aa0531dd1ef3)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/ssl_sock.c