]> git.stg.codes - ssmd.git/blobdiff - src/syncer.cpp
Disabled verifying cert host.
[ssmd.git] / src / syncer.cpp
index 9d5d7a5a559593a58f44b3723f88438a572e07a4..fefd843259cd7f1ce55a43dba4c67ecd169df60c 100644 (file)
@@ -1,7 +1,6 @@
 #include <sys/select.h>
 
 #include <curl/curl.h>
-#include <curl/types.h>
 #include <curl/easy.h>
 
 #include <cassert>
 #include "datatypes.h"
 #include "logger.h"
 
-using GTS::Syncer;
-using GTS::Timer;
-using GTS::Switch;
-using GTS::Subscriber;
-using GTS::Lines;
+using SSMD::Syncer;
+using SSMD::Timer;
+using SSMD::Switch;
+using SSMD::Subscriber;
+using SSMD::Lines;
 
 Timer::Timer(boost::function<void ()> callback, time_t interval)
     : _interval(interval),
@@ -167,6 +166,7 @@ bool Syncer::getDBData(std::string & data) const
     if (handle) {
         char errorBuffer[CURL_ERROR_SIZE];
         curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0); // Accept self-signed certs
+        curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0); // Accept certs for wrong hosts
         curl_easy_setopt(handle, CURLOPT_LOW_SPEED_LIMIT, 1); // Less than 1 bps
         curl_easy_setopt(handle, CURLOPT_LOW_SPEED_TIME, 60); // During 60 secs
         curl_easy_setopt(handle, CURLOPT_URL, _settingsParser.settings().dataURL().c_str()); // Our URL