- // Verify SSL trust first before doing anything.
-
- if (UseSSL == TRUE){
-
- CURLcode sslcode = CDavObj.SSLVerifyTest();
-
- if (sslcode == CURLE_OK){
-
- // Certificate is okay. Do nothing.
-
- } else if (sslcode == CURLE_SSL_CACERT || sslcode == CURLE_SSL_CONNECT_ERROR){
-
- // Certificate is more than likely a self-signed or
- // expired certificate so display the invalid
- // SSL certificate message.
+ if (TestConnection.SSLVerify() == COSSL_UNABLETOVERIFY){
+#if defined(__APPLE__)
+
+ TestConnection.BypassSSLVerification(true);
+
+ COConnectResult TestConnectionResult = TestConnection.Connect(false);
+
+ TestConnection.BypassSSLVerification(false);
+
+ int SSLResult = DisplayTrustPanel(&TestConnection);
+
+ if (SSLResult != NSOKButton){
+
+ wxMessageBox(_("An error occured whilst connnecting: ") + TestConnection.GetErrorMessage(), _("Failed"), wxOK+wxICON_ERROR);
+ return;
+
+ }
+
+#elif defined(__WIN32__)