Mercurial > hg > nginx
diff src/http/modules/ngx_http_ssl_module.c @ 7935:eb6c77e6d55d
SSL: added $ssl_alpn_protocol variable.
The variable contains protocol selected by ALPN during handshake and
is empty otherwise.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Thu, 14 Oct 2021 11:46:23 +0300 |
parents | 61abb35bb8cf |
children | db6b630e6086 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_ssl_module.c +++ b/src/http/modules/ngx_http_ssl_module.c @@ -358,6 +358,9 @@ static ngx_http_variable_t ngx_http_ssl { ngx_string("ssl_server_name"), NULL, ngx_http_ssl_variable, (uintptr_t) ngx_ssl_get_server_name, NGX_HTTP_VAR_CHANGEABLE, 0 }, + { ngx_string("ssl_alpn_protocol"), NULL, ngx_http_ssl_variable, + (uintptr_t) ngx_ssl_get_alpn_protocol, NGX_HTTP_VAR_CHANGEABLE, 0 }, + { ngx_string("ssl_client_cert"), NULL, ngx_http_ssl_variable, (uintptr_t) ngx_ssl_get_certificate, NGX_HTTP_VAR_CHANGEABLE, 0 },