mirror of
https://github.com/curl/curl.git
synced 2026-08-24 18:33:34 +03:00
tidy-up: sort TLS backends, distros, alphabetically
Also: - replace stray [Rr]ustls-ffi with Rustls for consistency. - add AWS-LC to a couple of lists where missing. Closes #21481
This commit is contained in:
parent
ed3cd8b046
commit
4815070794
21 changed files with 345 additions and 345 deletions
|
|
@ -31,7 +31,7 @@
|
|||
#if defined(_WIN32) && !defined(CURL_STATICLIB)
|
||||
|
||||
#if defined(USE_OPENSSL) && \
|
||||
!defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_IS_AWSLC) && \
|
||||
!defined(OPENSSL_IS_AWSLC) && !defined(OPENSSL_IS_BORINGSSL) && \
|
||||
!defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define PREVENT_OPENSSL_MEMLEAK
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
#ifdef USE_WIN32_LDAP /* Use Windows LDAP implementation. */
|
||||
# include <winldap.h>
|
||||
/* Undefine indirect <wincrypt.h> symbols conflicting with BoringSSL/AWS-LC. */
|
||||
/* Undefine indirect <wincrypt.h> symbols conflicting with AWS-LC/BoringSSL. */
|
||||
# undef X509_NAME
|
||||
# undef X509_EXTENSIONS
|
||||
# undef PKCS7_ISSUER_AND_SERIAL
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#ifdef USE_OPENSSL
|
||||
#include <openssl/err.h>
|
||||
#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC)
|
||||
#if defined(OPENSSL_IS_AWSLC) || defined(OPENSSL_IS_BORINGSSL)
|
||||
#include <ngtcp2/ngtcp2_crypto_boringssl.h>
|
||||
#elif defined(OPENSSL_QUIC_API2)
|
||||
#include <ngtcp2/ngtcp2_crypto_ossl.h>
|
||||
|
|
@ -2484,7 +2484,7 @@ static CURLcode cf_ngtcp2_tls_ctx_setup(struct Curl_cfilter *cf,
|
|||
struct curl_tls_ctx *ctx = user_data;
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC)
|
||||
#if defined(OPENSSL_IS_AWSLC) || defined(OPENSSL_IS_BORINGSSL)
|
||||
if(ngtcp2_crypto_boringssl_configure_client_context(ctx->ossl.ssl_ctx)
|
||||
!= 0) {
|
||||
failf(data, "ngtcp2_crypto_boringssl_configure_client_context failed");
|
||||
|
|
@ -2497,7 +2497,7 @@ static CURLcode cf_ngtcp2_tls_ctx_setup(struct Curl_cfilter *cf,
|
|||
failf(data, "ngtcp2_crypto_quictls_configure_client_context failed");
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
#endif /* !OPENSSL_IS_BORINGSSL && !OPENSSL_IS_AWSLC */
|
||||
#endif /* !OPENSSL_IS_AWSLC && !OPENSSL_IS_BORINGSSL */
|
||||
if(Curl_ssl_scache_use(cf, data)) {
|
||||
/* Enable the session cache because it is a prerequisite for the
|
||||
* "new session" callback. Use the "external storage" mode to prevent
|
||||
|
|
|
|||
|
|
@ -127,9 +127,9 @@
|
|||
#endif
|
||||
|
||||
/* Whether SSL_CTX_set_ciphersuites is available.
|
||||
* OpenSSL: supported since 1.1.1 (commit a53b5be6a05)
|
||||
* BoringSSL: no
|
||||
* LibreSSL: supported since 3.4.1 (released 2021-10-14)
|
||||
* OpenSSL: supported since 1.1.1 (commit a53b5be6a05)
|
||||
*/
|
||||
#if (!defined(LIBRESSL_VERSION_NUMBER) || \
|
||||
(defined(LIBRESSL_VERSION_NUMBER) && \
|
||||
|
|
@ -142,9 +142,9 @@
|
|||
#endif
|
||||
|
||||
/* Whether SSL_CTX_set1_sigalgs_list is available
|
||||
* OpenSSL: supported since 1.0.2 (commit 0b362de5f575)
|
||||
* BoringSSL: supported since 0.20240913.0 (commit 826ce15)
|
||||
* LibreSSL: no
|
||||
* OpenSSL: supported since 1.0.2 (commit 0b362de5f575)
|
||||
*/
|
||||
#ifndef LIBRESSL_VERSION_NUMBER
|
||||
#define HAVE_SSL_CTX_SET1_SIGALGS
|
||||
|
|
@ -152,10 +152,10 @@
|
|||
|
||||
#ifdef LIBRESSL_VERSION_NUMBER
|
||||
#define OSSL_PACKAGE "LibreSSL"
|
||||
#elif defined(OPENSSL_IS_BORINGSSL)
|
||||
#define OSSL_PACKAGE "BoringSSL"
|
||||
#elif defined(OPENSSL_IS_AWSLC)
|
||||
#define OSSL_PACKAGE "AWS-LC"
|
||||
#elif defined(OPENSSL_IS_BORINGSSL)
|
||||
#define OSSL_PACKAGE "BoringSSL"
|
||||
#elif defined(USE_NGTCP2) && defined(USE_NGHTTP3) && \
|
||||
!defined(OPENSSL_QUIC_API2)
|
||||
#define OSSL_PACKAGE "quictls"
|
||||
|
|
@ -4219,7 +4219,7 @@ static CURLcode ossl_connect_step2(struct Curl_cfilter *cf,
|
|||
}
|
||||
#ifdef SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED
|
||||
/* SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED is only available on
|
||||
OpenSSL version above v1.1.1, not LibreSSL, BoringSSL, or AWS-LC */
|
||||
OpenSSL version above v1.1.1, not AWS-LC, BoringSSL, or LibreSSL */
|
||||
else if((lib == ERR_LIB_SSL) &&
|
||||
(reason == SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED)) {
|
||||
/* If client certificate is required, communicate the
|
||||
|
|
@ -5408,6 +5408,9 @@ size_t Curl_ossl_version(char *buffer, size_t size)
|
|||
*p = '_';
|
||||
}
|
||||
return count;
|
||||
#elif defined(OPENSSL_IS_AWSLC)
|
||||
return curl_msnprintf(buffer, size, "%s/%s",
|
||||
OSSL_PACKAGE, AWSLC_VERSION_NUMBER_STRING);
|
||||
#elif defined(OPENSSL_IS_BORINGSSL)
|
||||
#ifdef CURL_BORINGSSL_VERSION
|
||||
return curl_msnprintf(buffer, size, "%s/%s",
|
||||
|
|
@ -5415,9 +5418,6 @@ size_t Curl_ossl_version(char *buffer, size_t size)
|
|||
#else
|
||||
return curl_msnprintf(buffer, size, OSSL_PACKAGE);
|
||||
#endif
|
||||
#elif defined(OPENSSL_IS_AWSLC)
|
||||
return curl_msnprintf(buffer, size, "%s/%s",
|
||||
OSSL_PACKAGE, AWSLC_VERSION_NUMBER_STRING);
|
||||
#else /* OpenSSL 3+ */
|
||||
return curl_msnprintf(buffer, size, "%s/%s",
|
||||
OSSL_PACKAGE, OpenSSL_version(OPENSSL_VERSION_STRING));
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
* <winldap.h>, <iphlpapi.h>, or something else, <wincrypt.h> does this:
|
||||
* #define X509_NAME ((LPCSTR)7)
|
||||
*
|
||||
* In BoringSSL/AWC-LC's <openssl/base.h> there is:
|
||||
* In AWC-LC/BoringSSL's <openssl/base.h> there is:
|
||||
* typedef struct X509_name_st X509_NAME;
|
||||
* etc.
|
||||
*
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
#define HAVE_OPENSSL3 /* non-fork OpenSSL 3.x or later */
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC)
|
||||
#if defined(OPENSSL_IS_AWSLC) || defined(OPENSSL_IS_BORINGSSL)
|
||||
#define HAVE_BORINGSSL_LIKE
|
||||
#endif
|
||||
|
||||
|
|
@ -86,9 +86,9 @@
|
|||
|
||||
/*
|
||||
* Whether SSL_CTX_set_keylog_callback is available.
|
||||
* OpenSSL: supported since 1.1.1 https://github.com/openssl/openssl/pull/2287
|
||||
* BoringSSL: supported since d28f59c27bac (committed 2015-11-19)
|
||||
* LibreSSL: not supported. 3.5.0+ has a stub function that does nothing.
|
||||
* OpenSSL: supported since 1.1.1 https://github.com/openssl/openssl/pull/2287
|
||||
*/
|
||||
#ifndef LIBRESSL_VERSION_NUMBER
|
||||
#define HAVE_KEYLOG_CALLBACK
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue