From 4eb55ac1563765a40c22820b7a9fc4ac66c1a194 Mon Sep 17 00:00:00 2001 From: Sam Parkinson Date: Sat, 28 Nov 2015 10:56:23 +1100 Subject: [PATCH] [Linux] Use system ca certs bundle Curl automatically has a certs bundle on GNU/Linux, so providing our own is not needed. --- src/network/http.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/network/http.cpp b/src/network/http.cpp index 411d0f0c33..29392b73d6 100644 --- a/src/network/http.cpp +++ b/src/network/http.cpp @@ -116,7 +116,10 @@ http_json_response *http_request_json(const http_json_request *request) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, true); +#ifndef __linux__ + // On GNU/Linux, curl will use the system certs by default curl_easy_setopt(curl, CURLOPT_CAINFO, "curl-ca-bundle.crt"); +#endif curl_easy_setopt(curl, CURLOPT_URL, request->url); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &writeBuffer); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, http_request_write_func);