]> git.kaiwu.me - haproxy.git/commitdiff
DOC: config: ssl_c_err, ssl_c_ca_err and ssl_c_ca_err_depth on resumed sessions
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 1 Dec 2026 16:59:52 +0000 (16:59 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 1 Dec 2026 17:02:05 +0000 (17:02 +0000)
The ssl_c_err, ssl_c_ca_err and ssl_c_ca_err_depth fetches are only filled
by ssl_sock_bind_verifycbk(), which only runs during a full handshake: on
a resumed session they read 0 (X509_V_OK), even when the session was
established with a client certificate whose verification reported an
error, ignored or not. ssl_c_verify reads the verify result stored in the
session and is not affected.

Document this limitation for each of the three fetches, and mention that
access decisions should rather be taken on ssl_c_verify, which stays
correct on resumed sessions.

This must be backported to all stable branches.

doc/configuration.txt

index a99a78631aa980e79601fa95803d9f44966dac91..d3f7e717dfe42541dc464d959e3434249a9787a3 100644 (file)
@@ -28016,12 +28016,21 @@ ssl_c_ca_err : integer
   verification process. Please refer to your SSL library's documentation to
   find the exhaustive list of error codes.
 
+  Not usable on resumed sessions (TLS ticket or session ID): the verification
+  only runs during a full handshake, so the fetch returns 0 (X509_V_OK) there,
+  even if the original verification reported an error, ignored or not. Use
+  "ssl_c_verify" instead, which stays correct on resumed sessions.
+
 ssl_c_ca_err_depth : integer
   When the incoming connection was made over an SSL/TLS transport layer,
   returns the depth in the CA chain of the first error detected during the
   verification of the client certificate. If no error is encountered, 0 is
   returned.
 
+  Not usable on resumed sessions (TLS ticket or session ID): the verification
+  only runs during a full handshake, so the fetch returns 0 there. Use
+  "ssl_c_verify" instead, which stays correct on resumed sessions.
+
 ssl_c_chain_der : binary
   Returns the DER formatted chain certificate presented by the client when the
   incoming connection was made over an SSL/TLS transport layer. When used for
@@ -28041,6 +28050,11 @@ ssl_c_err : integer
   to your SSL library's documentation to find the exhaustive list of error
   codes.
 
+  Not usable on resumed sessions (TLS ticket or session ID): the verification
+  only runs during a full handshake, so the fetch returns 0 (X509_V_OK) there,
+  even if the original verification reported an error, ignored or not. Use
+  "ssl_c_verify" instead, which stays correct on resumed sessions.
+
 ssl_c_i_dn([<entry>[,<occ>[,<format>]]]) : string
   When the incoming connection was made over an SSL/TLS transport layer,
   returns the full distinguished name of the issuer of the certificate