Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Implemented macOS (OSX) support for ConnectionObject/CardDAV2 and updated files neede...
[xestiaab/.git] / source / frmNewAccount-CardDAV2.cpp
index 8e5fe3c..214e84f 100644 (file)
@@ -48,6 +48,51 @@ void frmNewAccount::RunCardDAV2Test( wxCommandEvent& event ){
        
        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){
+                       
+                       lblServerConnResult->SetLabel(_("Failed"));
+                       lblServerResponse->SetLabel(_("Not applicable"));
+                       lblServerSSLResult->SetLabel(_("Used"));
+                       lblServerSSLValid->SetLabel(_("No"));
+                       lblConnectionResultText->SetLabel(_("An error occured whilst connnecting: ") + TestConnection.GetErrorMessage());
+                       btnPrevious->Enable(true);
+                       return;
+                       
+               } else {
+                       
+                       // Evalulate the trust object.
+                       
+                       SecTrustResultType EvalResult = ProcessResultType(&TestConnection);
+                       
+                       switch(EvalResult){
+                               case kSecTrustResultProceed:
+                                       lblServerSSLValid->SetLabel(_("Verified"));
+                                       break;
+                               case kSecTrustResultConfirm:
+                                       lblServerSSLValid->SetLabel(_("Verified (user)"));
+                                       break;
+                               default:
+                                       lblServerSSLValid->SetLabel(_("Unable to verify"));
+                       }
+                       
+                       lblServerResponse->SetLabel(_("Not applicable"));
+                       lblServerSSLResult->SetLabel(_("Used"));
+                       
+                       if (EvalResult != kSecTrustResultProceed){
+                               return;
+                       }
+                       
+               }
+               
 #elif defined(__WIN32__)
 
                TestConnection.BypassSSLVerification(true);
@@ -160,4 +205,4 @@ void frmNewAccount::RunCardDAV2Test( wxCommandEvent& event ){
        ResultsEvent.SetClientData(ResultData);
        wxPostEvent(this, ResultsEvent);
        
-}
\ No newline at end of file
+}
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy