]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: backend: simplify the complex ifdef related to 0RTT in connect_server()
authorWilly Tarreau <w@1wt.eu>
Thu, 7 Aug 2025 15:06:45 +0000 (17:06 +0200)
committerOlivier Houchard <cognet@ci0.org>
Tue, 9 Sep 2025 17:01:24 +0000 (19:01 +0200)
Since 3.0 we have HAVE_SSL_0RTT precisely to avoid checking horribly
complicated and unmaintainable conditions to detect support for 0RTT.
Let's just drop the complex condition and use the macro instead.

src/backend.c

index 5e757ae761fcbdda508b02720e411c176e869c46..1605e766a644ba29b8a6c1a9ce1eaffc186c4ed2 100644 (file)
@@ -2164,8 +2164,7 @@ int connect_server(struct stream *s)
                }
        }
 
-#if defined(USE_OPENSSL) && (defined(OPENSSL_IS_BORINGSSL) || (HA_OPENSSL_VERSION_NUMBER >= 0x10101000L))
-
+#if defined(HAVE_SSL_0RTT)
        if (!reuse && cli_conn && srv && srv_conn->mux &&
            (srv->ssl_ctx.options & SRV_SSL_O_EARLY_DATA) &&
            /* Only attempt to use early data if either the client sent