aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-08-11 19:05:53 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-08-11 19:05:53 +0000
commit7cdcc98395c947b839b3bd1e28dbcc516a9e89ad (patch)
tree70152290635e4ba46f0db6a4256f9dafb9725e06 /src/common/linux
parentRemove i386 from the set of architectures that the Mac crash_report tool's (diff)
downloadbreakpad-7cdcc98395c947b839b3bd1e28dbcc516a9e89ad.tar.xz
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
Diffstat (limited to 'src/common/linux')
-rw-r--r--src/common/linux/http_upload.cc4
-rw-r--r--src/common/linux/http_upload.h1
2 files changed, 5 insertions, 0 deletions
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);