This commit is contained in:
yhirose committed 2025-08-29 15:01:59 -04:00
1 parent 7a3b92bbd9
commit eb5a65e0df
2 files changed
+44 -1

No files matched your search

+4 -1
View File
@@ -8984,7 +8984,9 @@ inline bool ClientImpl::create_redirect_client(
}
// Handle CA certificate store and paths if available
if (ca_cert_store_) { redirect_client.set_ca_cert_store(ca_cert_store_); }
if (ca_cert_store_ && X509_STORE_up_ref(ca_cert_store_)) {
redirect_client.set_ca_cert_store(ca_cert_store_);
}
if (!ca_cert_file_path_.empty()) {
redirect_client.set_ca_cert_path(ca_cert_file_path_, ca_cert_dir_path_);
}
@@ -10878,6 +10880,7 @@ inline void SSLClient::set_ca_cert_store(X509_STORE *ca_cert_store) {
if (SSL_CTX_get_cert_store(ctx_) != ca_cert_store) {
// Free memory allocated for old cert and use new store `ca_cert_store`
SSL_CTX_set_cert_store(ctx_, ca_cert_store);
ca_cert_store_ = ca_cert_store;
}
} else {
X509_STORE_free(ca_cert_store);