mirror of
https://github.com/curl/curl.git
synced 2026-07-16 13:57:18 +03:00
wolfssl: avoid taking cached x509 store ref if sslctx already using it
Closes #14442
This commit is contained in:
parent
3ac1569c16
commit
63e9e06794
1 changed files with 4 additions and 1 deletions
|
|
@ -596,7 +596,10 @@ CURLcode Curl_wssl_setup_x509_store(struct Curl_cfilter *cf,
|
|||
!ssl_config->native_ca_store;
|
||||
|
||||
cached_store = cache_criteria_met ? get_cached_x509_store(cf, data) : NULL;
|
||||
if(cached_store && wolfSSL_X509_STORE_up_ref(cached_store)) {
|
||||
if(cached_store && wolfSSL_CTX_get_cert_store(wssl->ctx) == cached_store) {
|
||||
/* The cached store is already in use, do nothing. */
|
||||
}
|
||||
else if(cached_store && wolfSSL_X509_STORE_up_ref(cached_store)) {
|
||||
wolfSSL_CTX_set_cert_store(wssl->ctx, cached_store);
|
||||
}
|
||||
else if(cache_criteria_met) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue