]> git.kaiwu.me - haproxy.git/commitdiff
BUILD: ssl: disable the TLS1.3 session timeout clamp on wolfSSL
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 18 Aug 2026 12:01:55 +0000 (12:01 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 18 Aug 2026 12:06:17 +0000 (14:06 +0200)
wolfSSL's OpenSSL compat layer declares wolfSSL_get_SSL_CTX() (aka
SSL_get_SSL_CTX()) taking a non-const WOLFSSL*, unlike OpenSSL's
const-correct SSL_get_SSL_CTX(const SSL *ssl). Calling it from
ssl_sock_infocbk(), which only has a const SSL *, fails the build:

  src/ssl_sock.c:1772:60: error: passing 'const SSL *' (aka 'const
  struct WOLFSSL *') to parameter of type 'WOLFSSL *' (aka 'struct
  WOLFSSL *') discards qualifiers
  [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

Beyond the build failure, the clamp itself doesn't appear to behave
correctly against wolfSSL's TLS1.3 session/ticket handling, so skip
the whole thing on wolfSSL builds instead of only working around the
compile error.

Must be backported in every stable branches along with 9f1d590
("BUG/MEDIUM: ssl: enforce tune.ssl.lifetime across TLS1.3 session
renewals")

src/ssl_sock.c

index bfb8ce1b0ef14834648354defbc659bb600776b4..19ad9c52a6ad6656b4cdd10ca122de998eade3e6 100644 (file)
@@ -1753,7 +1753,7 @@ static void ssl_sock_infocbk(const SSL *ssl, int where, int ret)
                        }
                }
 
-#ifdef TLS1_3_VERSION
+#if defined(TLS1_3_VERSION) && !defined(USE_OPENSSL_WOLFSSL)
        /* Reduce TLS1.3 session timeout so it doesn't reset at each new
         * resumed connection */