diff options
| author | Dmitry Volyntsev <xeioex@nginx.com> | 2016-10-21 16:28:39 +0300 |
|---|---|---|
| committer | Dmitry Volyntsev <xeioex@nginx.com> | 2016-10-21 16:28:39 +0300 |
| commit | 71c93a8e09b2dc911005e254f1b9c16a9ac49fad (patch) | |
| tree | 0226c0266716ba80d054882c0fde26938970f630 /src/http/modules/ngx_http_ssl_module.c | |
| parent | 9ec0b1fe12f0df121ccea2097c27f66997110ac2 (diff) | |
| download | nginx-71c93a8e09b2dc911005e254f1b9c16a9ac49fad.tar.gz nginx-71c93a8e09b2dc911005e254f1b9c16a9ac49fad.tar.bz2 | |
SSL: RFC2253 compliant $ssl_client_s_dn and $ssl_client_i_dn.
Originally, the variables kept a result of X509_NAME_oneline(),
which is, according to the official documentation, a legacy
function. It produces a non standard output form and has
various quirks and inconsistencies.
The RFC2253 compliant behavior is introduced for these variables.
The original variables are available through $ssl_client_s_dn_legacy
and $ssl_client_i_dn_legacy.
Diffstat (limited to 'src/http/modules/ngx_http_ssl_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_ssl_module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c index d685ae9b9..e75f5d8a3 100644 --- a/src/http/modules/ngx_http_ssl_module.c +++ b/src/http/modules/ngx_http_ssl_module.c @@ -298,6 +298,12 @@ static ngx_http_variable_t ngx_http_ssl_vars[] = { { ngx_string("ssl_client_i_dn"), NULL, ngx_http_ssl_variable, (uintptr_t) ngx_ssl_get_issuer_dn, NGX_HTTP_VAR_CHANGEABLE, 0 }, + { ngx_string("ssl_client_s_dn_legacy"), NULL, ngx_http_ssl_variable, + (uintptr_t) ngx_ssl_get_subject_dn_legacy, NGX_HTTP_VAR_CHANGEABLE, 0 }, + + { ngx_string("ssl_client_i_dn_legacy"), NULL, ngx_http_ssl_variable, + (uintptr_t) ngx_ssl_get_issuer_dn_legacy, NGX_HTTP_VAR_CHANGEABLE, 0 }, + { ngx_string("ssl_client_serial"), NULL, ngx_http_ssl_variable, (uintptr_t) ngx_ssl_get_serial_number, NGX_HTTP_VAR_CHANGEABLE, 0 }, |
