BUG/MEDIUM: ssl: switchctx should not return SSL_TLSEXT_ERR_ALERT_WARNING
authorEmmanuel Hocdet <manu@gandi.net>
Fri, 3 Mar 2017 14:21:26 +0000 (15:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Mar 2017 09:10:49 +0000 (10:10 +0100)
commitd3850603933c9319528375088a9b28b9b345246b
tree1c478e4db3c30776398058e49ebfe4582f31b4da
parent530141f7479704be9d8f6c8f18fc9f71a6da2b3c
BUG/MEDIUM: ssl: switchctx should not return SSL_TLSEXT_ERR_ALERT_WARNING

Extract from RFC 6066:
"If the server understood the ClientHello extension but does not recognize
the server name, the server SHOULD take one of two actions: either abort the
handshake by sending a fatal-level unrecognized_name(112) alert or continue the
handshake. It is NOT RECOMMENDED to send a warning-level unrecognized_name(112)
alert, because the client's behavior in response to warning-level alerts is
unpredictable. If there is a mismatch between the server name used by the
client application and the server name of the credential chosen by the server,
this mismatch will become apparent when the client application performs the
server endpoint identification, at which point the client application will have
to decide whether to proceed with the communication."

Thanks Roberto Guimaraes for the bug repport, spotted with openssl-1.1.0.
This fix must be backported.
src/ssl_sock.c