From: Viktor Szakats Date: Sun, 8 Oct 2023 15:37:41 +0000 (+0000) Subject: build: do not publish `HAVE_BORINGSSL`, `HAVE_AWSLC` macros X-Git-Tag: curl-8_4_0~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=58a95b6a49ab79a7764736cca3cb229620722a58;p=thirdparty%2Fcurl.git build: do not publish `HAVE_BORINGSSL`, `HAVE_AWSLC` macros Syncing this up with CMake. Source code uses the built-in `OPENSSL_IS_AWSLC` and `OPENSSL_IS_BORINSSL` macros to detect BoringSSL and AWS-LC. No help is necessary from the build tools. The one use of `HAVE_BORINGSSL` in the source turned out to be no longer necessary for warning-free BoringSSL + Schannel builds. Ref: #1610 #2634 autotools detects this anyway for display purposes. CMake detects this to decide whether to use the BoringSSL-specific crypto lib with ngtcp2. It detects AWS-LC, but doesn't use the detection result just yet (planned in #12066). Ref: #11964 Reviewed-by: Daniel Stenberg Reviewed-by: Jay Satiro Closes #12065 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 863d126ac8..458b25550e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,6 @@ # HAVE_SSL_SET0_WBIO: `SSL_set0_wbio` present in OpenSSL/wolfSSL # HAVE_OPENSSL_SRP: `SSL_CTX_set_srp_username` present in OpenSSL/wolfSSL # HAVE_GNUTLS_SRP: `gnutls_srp_verifier` present in GnuTLS -# HAVE_AWSLC: OpenSSL is AWS-LC -# HAVE_BORINGSSL: OpenSSL is BoringSSL # HAVE_SSL_CTX_SET_QUIC_METHOD: `SSL_CTX_set_quic_method` present in OpenSSL/wolfSSL # HAVE_QUICHE_CONN_SET_QLOG_FD: `quiche_conn_set_qlog_fd` present in QUICHE # HAVE_ZSTD_CREATEDSTREAM: `ZSTD_createDStream` present in Zstd diff --git a/lib/vtls/schannel.h b/lib/vtls/schannel.h index be23567302..b26334bcf8 100644 --- a/lib/vtls/schannel.h +++ b/lib/vtls/schannel.h @@ -68,7 +68,7 @@ * BoringSSL's : So just undefine those defines here * (and only here). */ -#if defined(HAVE_BORINGSSL) || defined(OPENSSL_IS_BORINGSSL) +#if defined(OPENSSL_IS_BORINGSSL) # undef X509_NAME # undef X509_CERT_PAIR # undef X509_EXTENSIONS diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4 index 83fcb1428a..a4811d2a36 100644 --- a/m4/curl-openssl.m4 +++ b/m4/curl-openssl.m4 @@ -270,8 +270,6 @@ if test "x$OPT_OPENSSL" != xno; then ]]) ],[ AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1, - [Define to 1 if using BoringSSL.]) ssl_msg="BoringSSL" ],[ AC_MSG_RESULT([no]) @@ -288,8 +286,6 @@ if test "x$OPT_OPENSSL" != xno; then ]]) ],[ AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_AWSLC, 1, - [Define to 1 if using AWS-LC.]) ssl_msg="AWS-LC" ],[ AC_MSG_RESULT([no]) diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc index b6049e832f..9b165537a4 100644 --- a/winbuild/MakefileBuild.vc +++ b/winbuild/MakefileBuild.vc @@ -136,9 +136,6 @@ WIN_LIBS = $(WIN_LIBS) gdi32.lib user32.lib crypt32.lib !IFDEF USE_SSL SSL_CFLAGS = /DUSE_OPENSSL /I"$(SSL_INC_DIR)" -!IF EXISTS("$(SSL_INC_DIR)\is_boringssl.h") -SSL_CFLAGS = $(SSL_CFLAGS) /DHAVE_BORINGSSL -!ENDIF !IF "$(ENABLE_OPENSSL_AUTO_LOAD_CONFIG)"=="false" SSL_CFLAGS = $(SSL_CFLAGS) /DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG !ENDIF