]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: session/ssl: return the SSL error string during a SSL handshake error
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 12 May 2023 15:13:46 +0000 (17:13 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 12 May 2023 15:43:58 +0000 (17:43 +0200)
commit4adb4b99032b8f1a593cd48e856c0930f8523496
tree69d2704704e4b78cf47761f12fe59dd2e73b0677
parentee65efbfaea35df4038ec9a9a0fb8c63ad0eb0cc
MEDIUM: session/ssl: return the SSL error string during a SSL handshake error

SSL hanshake error were unable to dump the OpenSSL error string by
default, to do so it was mandatory to configure a error-log-format with
the ssl_fc_err fetch.

This patch implements the session_build_err_string() function which creates
the error log to send during session_kill_embryonic(), a special case is
made with CO_ER_SSL_HANDSHAKE which is able to dump the error string
with ERR_error_string().

Before:
    <134>May 12 17:14:04 haproxy[183151]: 127.0.0.1:49346 [12/May/2023:17:14:04.571] frt2/1: SSL handshake failure

After:
    <134>May 12 17:14:04 haproxy[183151]: 127.0.0.1:49346 [12/May/2023:17:14:04.571] frt2/1: SSL handshake failure (error:0A000418:SSL routines::tlsv1 alert unknown ca)
src/session.c