From 7cdcc98395c947b839b3bd1e28dbcc516a9e89ad Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Wed, 11 Aug 2010 19:05:53 +0000 Subject: [PATCH] Allow passing certificate path to HTTPUpload::SendRequest R=nealsid at http://breakpad.appspot.com/121002/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@640 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/linux/http_upload.cc | 4 ++++ src/common/linux/http_upload.h | 1 + 2 files changed, 5 insertions(+) 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);