]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: add HAVE_SSL_0RTT constant
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 29 Jan 2024 17:17:04 +0000 (18:17 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 31 Jan 2024 10:57:54 +0000 (11:57 +0100)
Add the HAVE_SSL_0RTT constant which define if the SSL library supports
0RTT. Which is different from HA_OPENSSL_HAVE_0RTT_SUPPORT which was
used only in the context of QUIC

include/haproxy/openssl-compat.h

index 430b22311dabb07b1444a0f819d2e156706523f0..b07251758895eac710d37e9b79e310d46a039fdd 100644 (file)
 #include <haproxy/quic_openssl_compat.h>
 #endif
 
-/* At this time, wolfssl, libressl and the openssl QUIC compatibility do not support 0-RTT */
-#if !defined(USE_QUIC_OPENSSL_COMPAT) && !defined(LIBRESSL_VERSION_NUMBER) && !defined(USE_OPENSSL_WOLFSSL)
-#define HA_OPENSSL_HAVE_0RTT_SUPPORT
-#endif
 
 #if defined(LIBRESSL_VERSION_NUMBER)
 /* LibreSSL is a fork of OpenSSL 1.0.1g but pretends to be 2.0.0, thus
 #define HAVE_SSL_get0_verified_chain
 #endif
 
+#if defined(SSL_OP_NO_ANTI_REPLAY)
+#define HAVE_SSL_0RTTT
+#endif
+
+/* At this time, wolfssl, libressl and the openssl QUIC compatibility do not support 0-RTT */
+#if defined(HAVE_SSL_0RTT) && !defined(USE_QUIC_OPENSSL_COMPAT) && !defined(LIBRESSL_VERSION_NUMBER) && !defined(USE_OPENSSL_WOLFSSL)
+#define HA_OPENSSL_HAVE_0RTT_SUPPORT
+#endif
 
 #if (HA_OPENSSL_VERSION_NUMBER >= 0x3000000fL)
 #define HAVE_OSSL_PARAM