We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 039d953 commit 5e1562fCopy full SHA for 5e1562f
src/utils/https_client.cc
@@ -20,10 +20,14 @@
20
#include <curl/curl.h>
21
#endif
22
23
+#ifndef WIN32
24
#include <sys/socket.h>
25
#include <sys/types.h>
26
#include <netinet/in.h>
27
#include <arpa/inet.h>
28
+#else
29
+#include <winsock2.h>
30
+#endif
31
#include <string>
32
33
#include <fstream>
@@ -94,6 +98,11 @@ bool HttpsClient::download(const std::string &uri) {
94
98
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);
95
99
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
96
100
101
+#ifdef WIN32
102
+ /* use the operating system's native CA store for certificate verification.*/
103
+ curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_NATIVE_CA);
104
105
+
97
106
/* send all data to this function */
107
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &HttpsClient::handle);
108
0 commit comments