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
# 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
* 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
]])
],[
AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
- [Define to 1 if using BoringSSL.])
ssl_msg="BoringSSL"
],[
AC_MSG_RESULT([no])
]])
],[
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])
\r
!IFDEF USE_SSL\r
SSL_CFLAGS = /DUSE_OPENSSL /I"$(SSL_INC_DIR)"\r
-!IF EXISTS("$(SSL_INC_DIR)\is_boringssl.h")\r
-SSL_CFLAGS = $(SSL_CFLAGS) /DHAVE_BORINGSSL\r
-!ENDIF\r
!IF "$(ENABLE_OPENSSL_AUTO_LOAD_CONFIG)"=="false"\r
SSL_CFLAGS = $(SSL_CFLAGS) /DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG\r
!ENDIF\r