aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extension/curlmanager.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/extension/curlmanager.cpp b/extension/curlmanager.cpp
index 6a64c10..3cf127b 100644
--- a/extension/curlmanager.cpp
+++ b/extension/curlmanager.cpp
@@ -714,6 +714,23 @@ void cURLManager::LoadcURLOption(cURLHandle *handle)
handle->opt_loaded = true;
+ static bool curlSetSSL = false;
+ if (!curlSetSSL)
+ {
+ // use the system ssl certs
+ CURLsslset sslset = curl_global_sslset(CURLSSLBACKEND_OPENSSL, NULL, NULL);
+ if (sslset != CURLSSLSET_OK)
+ {
+ printf("curl_global_sslset failed: %i\n", sslset);
+ return;
+ }
+ curlSetSSL = true;
+ }
+
+
+ curl_easy_setopt(handle->curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA);
+ curl_easy_setopt(handle->curl, CURLOPT_ACCEPT_ENCODING, "");
+
curl_easy_setopt(handle->curl, CURLOPT_ERRORBUFFER, handle->errorBuffer);
curl_easy_setopt(handle->curl, CURLOPT_OPENSOCKETFUNCTION, curl_opensocket_function);