Don't acknowledge a servername following warning alert in servername cb
authorMatt Caswell <matt@openssl.org>
Mon, 2 Dec 2019 17:29:21 +0000 (17:29 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 30 Jan 2020 16:01:26 +0000 (16:01 +0000)
If the servername cb decides to send back a warning alert then the
handshake continues, but we should not signal to the client that the
servername has been accepted.

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/10018)

ssl/statem/extensions.c

index d37accac18bdb4f29ecc2d3b3070294586a01511..d4c6c924ebbe470a9c048e360a4f445e2971ec52 100644 (file)
@@ -1009,6 +1009,7 @@ static int final_server_name(SSL *s, unsigned int context, int sent)
         /* TLSv1.3 doesn't have warning alerts so we suppress this */
         if (!SSL_IS_TLS13(s))
             ssl3_send_alert(s, SSL3_AL_WARNING, altmp);
+        s->servername_done = 0;
         return 1;
 
     case SSL_TLSEXT_ERR_NOACK: