Do not reset SNI data in SSL_do_handshake()
authorMatt Caswell <matt@openssl.org>
Fri, 7 Sep 2018 14:17:34 +0000 (15:17 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 7 Sep 2018 17:24:59 +0000 (18:24 +0100)
commitf01344cb5c6239af0d406f48d65362d0df9627b5
tree54f51286ca17243df77c04cc82cb3ad5222a0228
parent328a0547ad61d9e260fca73a280d2288714f2b92
Do not reset SNI data in SSL_do_handshake()

PR #3783 introduce coded to reset the server side SNI state in
SSL_do_handshake() to ensure any erroneous config time SNI changes are
cleared. Unfortunately SSL_do_handshake() can be called mid-handshake
multiple times so this is the wrong place to do this and can mean that
any SNI data is cleared later on in the handshake too.

Therefore move the code to a more appropriate place.

Fixes #7014

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/7149)
ssl/ssl_lib.c
ssl/statem/extensions.c
test/build.info
test/recipes/70-test_servername.t
test/servername_test.c