#if defined(__APPLE__) || defined(__WIN32__)
SetConnectionObject(conn);
+
+#else
+
+ if (ServerAccount != ""){
+
+ wxString ServerCertFilename = GetAccountDir(ServerAccount, TRUE);
+
+ if (wxFile::Exists(ServerCertFilename) == TRUE){
+
+ curl_easy_setopt(conn, CURLOPT_SSL_VERIFYPEER, 1);
+ curl_easy_setopt(conn, CURLOPT_SSL_VERIFYHOST, 2);
+ curl_easy_setopt(conn, CURLOPT_CAINFO, (const char*)ServerCertFilename.mb_str(wxConvUTF8));
+
+ }
+
+ }
#endif
-
+
conncode = (curl_easy_perform(conn));
// Check if the SSL certificate is valid or self-signed or some other
#if !defined(__APPLE__) && !defined(__WIN32__)
+ VerifyCertCollection = BuildSSLCollection(conn);
- } else if (conncode == CURLE_SSL_CACERT || conncode == CURLE_SSL_CONNECT_ERROR){
+#endif
+
+ } else if (conncode == CURLE_SSL_CACERT ||
+ conncode == CURLE_SSL_CONNECT_ERROR ||
+ conncode == CURLE_PEER_FAILED_VERIFICATION){
connssldata = curl_easy_init();
#if defined(__APPLE__) || defined(__WIN32__)
SetConnectionObject(connssldata);
-
+
#endif
CURLcode certfetchcode;