X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;ds=sidebyside;f=source%2FfrmNewAccount-CardDAV2.cpp;h=214e84ff294dd1d16a2bc6cd18f702c52aa4326c;hb=5b9dfdbcb6c0ab7be6988b58da32e60d7cee3ec0;hp=8e5fe3c701db9d80bf1b89fa487972fb83dd8e83;hpb=547ab1fe605cdb4884179ab011dabba4d0bd7bc2;p=xestiaab%2F.git diff --git a/source/frmNewAccount-CardDAV2.cpp b/source/frmNewAccount-CardDAV2.cpp index 8e5fe3c..214e84f 100644 --- a/source/frmNewAccount-CardDAV2.cpp +++ b/source/frmNewAccount-CardDAV2.cpp @@ -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 +}