mirror of
https://github.com/curl/curl.git
synced 2026-08-25 05:13:31 +03:00
ssl native_ca_store: always reinit
Add bit `native_ca_store_opt` to keep the setting of CURLOPT_(PROXY_)SSL_OPTIONS and use that to calculate every easy transfer if a native CA store shall be used or not. This avoids `native_ca_store` getting stuck on TRUE after being set once. Closes #21902
This commit is contained in:
parent
435fb96dcf
commit
d69bfad3fa
3 changed files with 28 additions and 19 deletions
20
lib/setopt.c
20
lib/setopt.c
|
|
@ -399,22 +399,6 @@ static CURLcode setopt_RTSP_REQUEST(struct Curl_easy *data, long arg)
|
|||
}
|
||||
#endif /* !CURL_DISABLE_RTSP */
|
||||
|
||||
#ifdef USE_SSL
|
||||
static void set_ssl_options(struct ssl_config_data *ssl,
|
||||
struct ssl_primary_config *config,
|
||||
long arg)
|
||||
{
|
||||
config->ssl_options = (unsigned char)(arg & 0xff);
|
||||
ssl->enable_beast = !!(arg & CURLSSLOPT_ALLOW_BEAST);
|
||||
ssl->no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE);
|
||||
ssl->no_partialchain = !!(arg & CURLSSLOPT_NO_PARTIALCHAIN);
|
||||
ssl->revoke_best_effort = !!(arg & CURLSSLOPT_REVOKE_BEST_EFFORT);
|
||||
ssl->native_ca_store = !!(arg & CURLSSLOPT_NATIVE_CA);
|
||||
ssl->auto_client_cert = !!(arg & CURLSSLOPT_AUTO_CLIENT_CERT);
|
||||
ssl->earlydata = !!(arg & CURLSSLOPT_EARLYDATA);
|
||||
}
|
||||
#endif
|
||||
|
||||
static CURLcode setopt_long_bool(struct Curl_easy *data, CURLoption option,
|
||||
long arg)
|
||||
{
|
||||
|
|
@ -994,11 +978,11 @@ static CURLcode setopt_long_ssl(struct Curl_easy *data, CURLoption option,
|
|||
s->use_ssl = (unsigned char)arg;
|
||||
break;
|
||||
case CURLOPT_SSL_OPTIONS:
|
||||
set_ssl_options(&s->ssl, &s->ssl.primary, arg);
|
||||
s->ssl.primary.ssl_options = (unsigned char)(arg & 0xff);
|
||||
break;
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
case CURLOPT_PROXY_SSL_OPTIONS:
|
||||
set_ssl_options(&s->proxy_ssl, &s->proxy_ssl.primary, arg);
|
||||
s->proxy_ssl.primary.ssl_options = (unsigned char)(arg & 0xff);
|
||||
break;
|
||||
#endif
|
||||
case CURLOPT_SSL_ENABLE_NPN:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue