From: William Lallemand Date: Mon, 29 Jan 2024 17:26:19 +0000 (+0100) Subject: MINOR: ssl: rename HA_OPENSSL_HAVE_0RTT_SUPPORT constant to HAVE_SSL_0RTT_QUIC X-Git-Tag: v3.0-dev3~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=025f5105ee317f47fff8506bfca632bc4fd6cc51;p=thirdparty%2Fhaproxy.git MINOR: ssl: rename HA_OPENSSL_HAVE_0RTT_SUPPORT constant to HAVE_SSL_0RTT_QUIC Rename the constant to be me more comprehensive. --- diff --git a/include/haproxy/openssl-compat.h b/include/haproxy/openssl-compat.h index b072517588..37dfa3b246 100644 --- a/include/haproxy/openssl-compat.h +++ b/include/haproxy/openssl-compat.h @@ -115,7 +115,7 @@ /* 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 +#define HAVE_SSL_0RTT_QUIC #endif #if (HA_OPENSSL_VERSION_NUMBER >= 0x3000000fL) diff --git a/src/quic_ssl.c b/src/quic_ssl.c index d4726079db..485499a099 100644 --- a/src/quic_ssl.c +++ b/src/quic_ssl.c @@ -735,7 +735,7 @@ static int qc_ssl_sess_init(struct quic_conn *qc, SSL_CTX *ssl_ctx, SSL **ssl) return ret; } -#ifdef HA_OPENSSL_HAVE_0RTT_SUPPORT +#ifdef HAVE_SSL_0RTT_QUIC /* Enable early data for QUIC TLS session. * Return 1 if succeeded, 0 if not. @@ -770,7 +770,7 @@ static int qc_set_quic_early_data_enabled(struct quic_conn *qc, SSL *ssl) return 1; } -#endif // HA_OPENSSL_HAVE_0RTT_SUPPORT +#endif // HAVE_SSL_0RTT_QUIC /* Allocate the ssl_sock_ctx from connection . This creates the tasklet * used to process received packets. The allocated context is stored in @@ -807,7 +807,7 @@ int qc_alloc_ssl_sock_ctx(struct quic_conn *qc) if (qc_is_listener(qc)) { if (qc_ssl_sess_init(qc, bc->initial_ctx, &ctx->ssl) == -1) goto err; -#if (HA_OPENSSL_VERSION_NUMBER >= 0x10101000L) && defined(HA_OPENSSL_HAVE_0RTT_SUPPORT) +#if (HA_OPENSSL_VERSION_NUMBER >= 0x10101000L) && defined(HAVE_SSL_0RTT_QUIC) /* Enabling 0-RTT */ if (bc->ssl_conf.early_data && !qc_set_quic_early_data_enabled(qc, ctx->ssl)) goto err;