diff --git a/src/common/linux/http_upload.cc b/src/common/linux/http_upload.cc index 1ab4b12b..f971651e 100644 --- a/src/common/linux/http_upload.cc +++ b/src/common/linux/http_upload.cc @@ -62,6 +62,7 @@ bool HTTPUpload::SendRequest(const string &url, const string &file_part_name, const string &proxy, const string &proxy_user_pwd, + const string &ca_certificate_file, string *response_body, string *error_description) { if (!CheckParameters(parameters)) @@ -107,6 +108,9 @@ bool HTTPUpload::SendRequest(const string &url, if (!proxy_user_pwd.empty()) (*curl_easy_setopt)(curl, CURLOPT_PROXYUSERPWD, proxy_user_pwd.c_str()); + if (!ca_certificate_file.empty()) + (*curl_easy_setopt)(curl, CURLOPT_CAINFO, ca_certificate_file.c_str()); + struct curl_httppost *formpost = NULL; struct curl_httppost *lastptr = NULL; // Add form data. diff --git a/src/common/linux/http_upload.h b/src/common/linux/http_upload.h index fa6ad12c..e98b25de 100644 --- a/src/common/linux/http_upload.h +++ b/src/common/linux/http_upload.h @@ -61,6 +61,7 @@ class HTTPUpload { const string &file_part_name, const string &proxy, const string &proxy_user_pwd, + const string &ca_certificate_file, string *response_body, string *error_description);