aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/clearcut_uploader/clearcut_uploader.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/clearcut_uploader/clearcut_uploader.cc b/plugins/clearcut_uploader/clearcut_uploader.cc
index 158ffbb8..83d66fff 100644
--- a/plugins/clearcut_uploader/clearcut_uploader.cc
+++ b/plugins/clearcut_uploader/clearcut_uploader.cc
@@ -18,6 +18,7 @@ struct Clearcut_System_Key {
struct Clearcut_Uploader_Data {
std::vector<Clearcut_System_Key> keys;
std::string clearcut_server;
+ bool ssl_verify_disable;
};
class Clearcut_Uploader : public Plugin_Api {
@@ -195,6 +196,11 @@ public:
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response_buffer);
+ if (this->data.ssl_verify_disable) {
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ }
+
curl_multi_add_handle(multi_handle, curl);
curl_multi_perform(multi_handle, &still_running);
@@ -312,6 +318,12 @@ public:
BOOST_LOG_TRIVIAL(error) << "Unable to parse Server URL\n";
return 1;
}
+
+ this->data.ssl_verify_disable = cfg.get<bool>("clearcutSslVerifyDisable", false);
+ if (this->data.ssl_verify_disable) {
+ BOOST_LOG_TRIVIAL(info) << "ClearCut SSL Verify Disabled";
+ }
+
// Gets the API key for each system, if defined
BOOST_FOREACH (boost::property_tree::ptree::value_type &node, cfg.get_child("systems")) {
boost::optional<boost::property_tree::ptree &> clearcut_exists = node.second.get_child_optional("clearcutApiKey");