# HG changeset patch # User Yaroslav Zhuravlev # Date 1482264138 -10800 # Node ID e1d0b56c0310c240e17b80239e18a377be88c872 # Parent c6b5826b64f7e201693791cf55cf3ab2ad22f1ab Documented support for client certificate verification in stream. diff -r c6b5826b64f7 -r e1d0b56c0310 xml/en/docs/stream/ngx_stream_ssl_module.xml --- a/xml/en/docs/stream/ngx_stream_ssl_module.xml Tue Dec 20 22:53:03 2016 +0300 +++ b/xml/en/docs/stream/ngx_stream_ssl_module.xml Tue Dec 20 23:02:18 2016 +0300 @@ -9,7 +9,7 @@ + rev="13">
@@ -163,6 +163,43 @@ + +file + +stream +server +1.11.8 + + +Specifies a file with trusted CA certificates in the PEM format +used to verify client certificates. + + + +The list of certificates will be sent to clients. +If this is not desired, the +directive can be used. + + + + + + +file + +stream +server +1.11.8 + + +Specifies a file with revoked certificates (CRL) +in the PEM format used to verify +client certificates. + + + + + file @@ -419,6 +456,73 @@ + + +file + +stream +server +1.11.8 + + +Specifies a file with trusted CA certificates in the PEM format +used to verify client certificates. + + + +In contrast to the certificate set by , +the list of these certificates will not be sent to clients. + + + + + + + + on | off | + optional | optional_no_ca +off +stream +server +1.11.8 + + +Enables verification of client certificates. +The verification result is stored in the +$ssl_client_verify variable. + + + +The optional parameter requests the client +certificate and verifies it if the certificate is present. + + + +The optional_no_ca parameter +requests the client +certificate but does not require it to be signed by a trusted CA certificate. +This is intended for the use in cases when a service that is external to nginx +performs the actual certificate verification. +The contents of the certificate is accessible through the +$ssl_client_cert variable. + + + + + + +number +1 +stream +server +1.11.8 + + +Sets the verification depth in the client certificates chain. + + + +
@@ -450,6 +554,69 @@ +$ssl_client_cert + +returns the client certificate in the PEM format +for an established SSL connection, with each line except the first +prepended with the tab character (1.11.8); + + +$ssl_client_fingerprint + +returns the SHA1 fingerprint of the client certificate +for an established SSL connection (1.11.8); + + +$ssl_client_i_dn + +returns the “issuer DN” string of the client certificate +for an established SSL connection according to +RFC 2253 (1.11.8); + + +$ssl_client_raw_cert + + +returns the client certificate in the PEM format +for an established SSL connection (1.11.8); + + +$ssl_client_s_dn + +returns the “subject DN” string of the client certificate +for an established SSL connection according to +RFC 2253 (1.11.8); + + +$ssl_client_serial + +returns the serial number of the client certificate +for an established SSL connection (1.11.8); + + +$ssl_client_v_end + +returns the end date of the client certificate (1.11.8); + + +$ssl_client_v_remain + +returns the number of days +until the client certificate expires (1.11.8); + + +$ssl_client_v_start + +returns the start date of the client certificate (1.11.8); + + +$ssl_client_verify + +returns the result of client certificate verification (1.11.8): +“SUCCESS”, “FAILED:reason”, +and “NONE” if a certificate was not present; + + $ssl_curves returns the list of curves supported by the client (1.11.7). diff -r c6b5826b64f7 -r e1d0b56c0310 xml/ru/docs/stream/ngx_stream_ssl_module.xml --- a/xml/ru/docs/stream/ngx_stream_ssl_module.xml Tue Dec 20 22:53:03 2016 +0300 +++ b/xml/ru/docs/stream/ngx_stream_ssl_module.xml Tue Dec 20 23:02:18 2016 +0300 @@ -9,7 +9,7 @@ + rev="13">
@@ -162,6 +162,44 @@ + +файл + +stream +server +1.11.8 + + +Указывает файл с доверенными сертификатами CA в формате +PEM, которые используются для +проверки клиентских сертификатов. + + + +Список сертификатов будет отправляться клиентам. +Если это нежелательно, можно воспользоваться директивой +. + + + + + + +файл + +stream +server +1.11.8 + + +Указывает файл с отозванными сертификатами (CRL) +в формате PEM, используемыми для +проверки клиентских сертификатов. + + + + + файл @@ -418,6 +456,75 @@ + + +файл + +stream +server +1.11.8 + + +Задаёт файл с доверенными сертификатами CA в формате PEM, +которые используются для проверки +клиентских сертификатов. + + + +В отличие от , список этих сертификатов +не будет отправляться клиентам. + + + + + + + + on | off | + optional | optional_no_ca +off +stream +server +1.11.8 + + + +Разрешает проверку клиентских сертификатов. +Результат проверки доступен через переменную +$ssl_client_verify. + + + +Параметр optional запрашивает клиентский +сертификат, и если сертификат был предоставлен, проверяет его. + + + +Параметр optional_no_ca +запрашивает сертификат +клиента, но не требует, чтобы он был подписан доверенным сертификатом CA. +Это предназначено для случаев, когда фактическая проверка сертификата +осуществляется внешним по отношению к nginx’у сервисом. +Содержимое сертификата доступно через переменную +$ssl_client_cert. + + + + + + +число +1 +stream +server +1.11.8 + + +Устанавливает глубину проверки в цепочке клиентских сертификатов. + + + +
@@ -449,6 +556,69 @@
+$ssl_client_cert + +возвращает клиентский сертификат +для установленного SSL-соединения в формате PEM +перед каждой строкой которого, кроме первой, вставляется символ табуляции(1.11.8); + + +$ssl_client_fingerprint + +возвращает SHA1-отпечаток клиентского сертификата +для установленного SSL-соединения (1.11.8); + + +$ssl_client_i_dn + +возвращает строку “issuer DN” клиентского сертификата +для установленного SSL-соединения согласно +RFC 2253 (1.11.8); + + +$ssl_client_raw_cert + + +возвращает клиентский сертификат +для установленного SSL-соединения в формате PEM (1.11.8); + + +$ssl_client_s_dn + +возвращает строку “subject DN” клиентского сертификата +для установленного SSL-соединения согласно +RFC 2253 (1.11.8); + + +$ssl_client_serial + +возвращает серийный номер клиентского сертификата +для установленного SSL-соединения (1.11.8); + + +$ssl_client_v_end + +возвращает дату окончания срока действия клиентского сертификата (1.11.8); + + +$ssl_client_v_remain + +возвращает число дней, +оставшихся до истечения срока действия клиентского сертификата (1.11.8); + + +$ssl_client_v_start + +возвращает дату начала срока действия клиентского сертификата (1.11.8); + + +$ssl_client_verify + +возвращает результат проверки клиентского сертификата (1.11.8): +“SUCCESS”, “FAILED:reason” +и, если сертификат не был предоставлен, “NONE”; + + $ssl_curves возвращает список кривых, поддерживаемых клиентом (1.11.7).