mirror of
https://github.com/curl/curl.git
synced 2025-01-30 14:22:33 +08:00
vtls: add SSLSUPP_CIPHER_LIST
Added SSLSUPP_CIPHER_LIST so be able to differniate SSL Backends that support CURLOPT_SSL_CIPHER_LIST. Closes #14406
This commit is contained in:
parent
cd4aee156f
commit
5c2ab55abe
20
lib/setopt.c
20
lib/setopt.c
@ -255,15 +255,23 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
||||
/* deprecated */
|
||||
break;
|
||||
case CURLOPT_SSL_CIPHER_LIST:
|
||||
/* set a list of cipher we want to use in the SSL connection */
|
||||
result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST],
|
||||
va_arg(param, char *));
|
||||
if(Curl_ssl_supports(data, SSLSUPP_CIPHER_LIST)) {
|
||||
/* set a list of cipher we want to use in the SSL connection */
|
||||
result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST],
|
||||
va_arg(param, char *));
|
||||
}
|
||||
else
|
||||
return CURLE_NOT_BUILT_IN;
|
||||
break;
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
case CURLOPT_PROXY_SSL_CIPHER_LIST:
|
||||
/* set a list of cipher we want to use in the SSL connection for proxy */
|
||||
result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_PROXY],
|
||||
va_arg(param, char *));
|
||||
if(Curl_ssl_supports(data, SSLSUPP_CIPHER_LIST)) {
|
||||
/* set a list of cipher we want to use in the SSL connection for proxy */
|
||||
result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_PROXY],
|
||||
va_arg(param, char *));
|
||||
}
|
||||
else
|
||||
return CURLE_NOT_BUILT_IN;
|
||||
break;
|
||||
#endif
|
||||
case CURLOPT_TLS13_CIPHERS:
|
||||
|
@ -1113,7 +1113,12 @@ static CURLcode bearssl_sha256sum(const unsigned char *input,
|
||||
|
||||
const struct Curl_ssl Curl_ssl_bearssl = {
|
||||
{ CURLSSLBACKEND_BEARSSL, "bearssl" }, /* info */
|
||||
SSLSUPP_CAINFO_BLOB | SSLSUPP_SSL_CTX | SSLSUPP_HTTPS_PROXY,
|
||||
|
||||
SSLSUPP_CAINFO_BLOB |
|
||||
SSLSUPP_SSL_CTX |
|
||||
SSLSUPP_HTTPS_PROXY |
|
||||
SSLSUPP_CIPHER_LIST,
|
||||
|
||||
sizeof(struct bearssl_ssl_backend_data),
|
||||
|
||||
Curl_none_init, /* init */
|
||||
|
@ -1726,7 +1726,8 @@ const struct Curl_ssl Curl_ssl_mbedtls = {
|
||||
#ifdef TLS13_SUPPORT
|
||||
SSLSUPP_TLS13_CIPHERSUITES |
|
||||
#endif
|
||||
SSLSUPP_HTTPS_PROXY,
|
||||
SSLSUPP_HTTPS_PROXY |
|
||||
SSLSUPP_CIPHER_LIST,
|
||||
|
||||
sizeof(struct mbed_ssl_backend_data),
|
||||
|
||||
|
@ -5212,7 +5212,8 @@ const struct Curl_ssl Curl_ssl_openssl = {
|
||||
SSLSUPP_ECH |
|
||||
#endif
|
||||
SSLSUPP_CA_CACHE |
|
||||
SSLSUPP_HTTPS_PROXY,
|
||||
SSLSUPP_HTTPS_PROXY |
|
||||
SSLSUPP_CIPHER_LIST,
|
||||
|
||||
sizeof(struct ossl_ctx),
|
||||
|
||||
|
@ -2969,7 +2969,8 @@ const struct Curl_ssl Curl_ssl_schannel = {
|
||||
#endif
|
||||
SSLSUPP_TLS13_CIPHERSUITES |
|
||||
SSLSUPP_CA_CACHE |
|
||||
SSLSUPP_HTTPS_PROXY,
|
||||
SSLSUPP_HTTPS_PROXY |
|
||||
SSLSUPP_CIPHER_LIST,
|
||||
|
||||
sizeof(struct schannel_ssl_backend_data),
|
||||
|
||||
|
@ -2888,7 +2888,8 @@ const struct Curl_ssl Curl_ssl_sectransp = {
|
||||
#ifdef SECTRANSP_PINNEDPUBKEY
|
||||
SSLSUPP_PINNEDPUBKEY |
|
||||
#endif /* SECTRANSP_PINNEDPUBKEY */
|
||||
SSLSUPP_HTTPS_PROXY,
|
||||
SSLSUPP_HTTPS_PROXY |
|
||||
SSLSUPP_CIPHER_LIST,
|
||||
|
||||
sizeof(struct st_ssl_backend_data),
|
||||
|
||||
|
@ -39,6 +39,7 @@ struct Curl_ssl_session;
|
||||
#define SSLSUPP_CAINFO_BLOB (1<<6)
|
||||
#define SSLSUPP_ECH (1<<7)
|
||||
#define SSLSUPP_CA_CACHE (1<<8)
|
||||
#define SSLSUPP_CIPHER_LIST (1<<9) /* supports TLS 1.0-1.2 ciphersuites */
|
||||
|
||||
#define ALPN_ACCEPTED "ALPN: server accepted "
|
||||
|
||||
|
@ -1918,7 +1918,8 @@ const struct Curl_ssl Curl_ssl_wolfssl = {
|
||||
#ifdef WOLFSSL_TLS13
|
||||
SSLSUPP_TLS13_CIPHERSUITES |
|
||||
#endif
|
||||
SSLSUPP_CA_CACHE,
|
||||
SSLSUPP_CA_CACHE |
|
||||
SSLSUPP_CIPHER_LIST,
|
||||
|
||||
sizeof(struct wolfssl_ctx),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user