aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_ssl_module.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2017-08-22 15:18:10 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2017-08-22 15:18:10 +0300
commit50a0f25c60bcc0fb46efcab00985c200c08c2b2f (patch)
tree5ccbff269a05fbc723224fde3c5f98e1114b9050 /src/stream/ngx_stream_ssl_module.c
parent008e9caa2a5b784d337422f1dc4290edfb9cc640 (diff)
downloadnginx-50a0f25c60bcc0fb46efcab00985c200c08c2b2f.tar.gz
nginx-50a0f25c60bcc0fb46efcab00985c200c08c2b2f.zip
SSL: the $ssl_client_escaped_cert variable (ticket #857).
This variable contains URL-encoded client SSL certificate. In contrast to $ssl_client_cert, it doesn't depend on deprecated header continuation. The NGX_ESCAPE_URI_COMPONENT variant of encoding is used, so the resulting variable can be safely used not only in headers, but also as a request argument. The $ssl_client_cert variable should be considered deprecated now. The $ssl_client_raw_cert variable will be eventually renambed back to $ssl_client_cert.
Diffstat (limited to 'src/stream/ngx_stream_ssl_module.c')
-rw-r--r--src/stream/ngx_stream_ssl_module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_ssl_module.c b/src/stream/ngx_stream_ssl_module.c
index 010b98b30..1e9973fee 100644
--- a/src/stream/ngx_stream_ssl_module.c
+++ b/src/stream/ngx_stream_ssl_module.c
@@ -249,6 +249,10 @@ static ngx_stream_variable_t ngx_stream_ssl_vars[] = {
(uintptr_t) ngx_ssl_get_raw_certificate,
NGX_STREAM_VAR_CHANGEABLE, 0 },
+ { ngx_string("ssl_client_escaped_cert"), NULL, ngx_stream_ssl_variable,
+ (uintptr_t) ngx_ssl_get_escaped_certificate,
+ NGX_STREAM_VAR_CHANGEABLE, 0 },
+
{ ngx_string("ssl_client_s_dn"), NULL, ngx_stream_ssl_variable,
(uintptr_t) ngx_ssl_get_subject_dn, NGX_STREAM_VAR_CHANGEABLE, 0 },