save/restore in the OpenSSL 1.0.2 codepath too

This commit is contained in:
Viktor Szakats 2025-08-11 11:26:40 +02:00
parent dd44c207f1
commit c22aae9cc8
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -3691,9 +3691,17 @@ CURLcode Curl_ssl_setup_x509_store(struct Curl_cfilter *cf,
struct Curl_easy *data,
SSL_CTX *ssl_ctx)
{
X509_STORE *store = SSL_CTX_get_cert_store(ssl_ctx);
CURLcode result;
X509_STORE *store;
return ossl_populate_x509_store(cf, data, store);
ERR_set_mark();
store = SSL_CTX_get_cert_store(ssl_ctx);
result = ossl_populate_x509_store(cf, data, store);
ERR_pop_to_mark();
return result;
}
#endif /* HAVE_SSL_X509_STORE_SHARE */