diff options
author | Paul Yang <yang.yang@baishancloud.com> | 2017-06-28 15:46:13 +0800 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-07-28 11:51:59 -0400 |
commit | 190b9a03b72a8029c27e4bd0ab000129e240a413 (patch) | |
tree | 9d0c1d44825c86a1ce1b2a7e3008072cdf7617f9 /ssl | |
parent | 3ca1f892a7d94fb1595408f5fe80dee51dceb3b8 (diff) |
Make SSL_set_tlsext_host_name no effect from server side
Documentation and test cases are also updated
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3783)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 74767f6e15..ab8e443bec 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -3315,6 +3315,12 @@ int SSL_do_handshake(SSL *s) s->method->ssl_renegotiate_check(s, 0); + if (SSL_is_server(s)) { + /* clear SNI settings at server-side */ + OPENSSL_free(s->ext.hostname); + s->ext.hostname = NULL; + } + if (SSL_in_init(s) || SSL_in_before(s)) { if ((s->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) { struct ssl_async_args args; |