wxString ServerAddressNormal;
conn = curl_easy_init();
+
+#if defined(__APPLE__)
+
+ SetConnectionObject(conn);
+
+#endif
struct CardDAVCURLPasser {
wxString Data1;
wxString Data2;
- ServerAddressURL = ServerAddress + wxT(":") + wxString::Format(wxT("%i"), ServerPort) + wxT("/") + ServerPrefix + wxT("/");
+ ServerAddressURL = ServerAddress + wxT(":") + wxString::Format(wxT("%i"), ServerPort) + ServerPrefix;
ServerAddressSSL = wxT("https://") + ServerAddressURL;
ServerAddressNormal = wxT("http://") + ServerAddressURL;
curl_easy_setopt(conn, CURLOPT_HTTPHEADER, slist);
curl_easy_setopt(conn, CURLOPT_CERTINFO, 1);
+#if defined(__APPLE__)
+
+#else
+
ServerCertFilename = GetAccountDir(ServerAccount, TRUE);
if (wxFile::Exists(ServerCertFilename) == TRUE){
}
+#endif
+
curl_easy_setopt(conn, CURLOPT_POSTFIELDS, query);
curl_easy_setopt(conn, CURLOPT_POSTFIELDSIZE, strlen(query));
// Check if it fails with a CURLE_SSL_CACERT then compare
// the certificates as PEM files.
+#if defined(__APPLE__)
+
+#else
+
if (claconncode == CURLE_SSL_CACERT && wxFile::Exists(ServerCertFilename) == TRUE){
CURL *sslerrconn;
curl_easy_cleanup(sslerrconn);
}
+
+#endif
// Sort out SSL error.
curl_easy_setopt(sslerrconn, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(sslerrconn, CURLOPT_CERTINFO, 1);
+#if defined(__APPLE__)
+
+ SetConnectionObject(sslerrconn);
+
+#endif
+
sslerrconncode = (curl_easy_perform(sslerrconn));
SSLCertCol = BuildSSLCollection(sslerrconn);