Browse Source

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
Viktor Szakats 6 months ago
parent
commit
58a95b6a49
4 changed files with 1 additions and 10 deletions
  1. 0 2
      CMakeLists.txt
  2. 1 1
      lib/vtls/schannel.h
  3. 0 4
      m4/curl-openssl.m4
  4. 0 3
      winbuild/MakefileBuild.vc

+ 0 - 2
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

+ 1 - 1
lib/vtls/schannel.h

@@ -68,7 +68,7 @@
  * BoringSSL's <openssl/x509.h>: 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

+ 0 - 4
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])

+ 0 - 3
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