]> git.feebdaed.xyz Git - 0xmirror/nginx.git/commit
SSL: server name callback changed to return SSL_TLSEXT_ERR_OK.
authorMaxim Dounin <mdounin@mdounin.ru>
Sun, 3 Mar 2019 13:47:44 +0000 (16:47 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Sun, 3 Mar 2019 13:47:44 +0000 (16:47 +0300)
commitfd97b2a80f678b9bf372d9a6537e5d4db51188ae
treec85542d597fa6e84674bb90237a9523ee7ec65cf
parent4e0c46cfe12ad57e312a83b689ef1a7cf94dcd3d
SSL: server name callback changed to return SSL_TLSEXT_ERR_OK.

OpenSSL 1.1.1 does not save server name to the session if server name
callback returns anything but SSL_TLSEXT_ERR_OK, thus breaking
the $ssl_server_name variable in resumed sessions.

Since $ssl_server_name can be used even if we've selected the default
server and there are no other servers, it looks like the only viable
solution is to always return SSL_TLSEXT_ERR_OK regardless of the actual
result.

To fix things in the stream module as well, added a dummy server name
callback which always returns SSL_TLSEXT_ERR_OK.
src/http/ngx_http_request.c
src/stream/ngx_stream_ssl_module.c