X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2FfrmEditAccount.cpp;h=920f5267a9708e7807ad573dce953f67f23eacb6;hp=d0f7effc0f17700c0d4de5c48bb9a454cb504f3d;hb=ce32889b3a42670bfbc3bbb87a689ae79e889e68;hpb=547ab1fe605cdb4884179ab011dabba4d0bd7bc2 diff --git a/source/frmEditAccount.cpp b/source/frmEditAccount.cpp index d0f7eff..920f526 100644 --- a/source/frmEditAccount.cpp +++ b/source/frmEditAccount.cpp @@ -17,6 +17,7 @@ // with Xestia Address Book. If not, see #include "frmEditAccount.h" +#include "common/svrdlist.h" frmEditAccount::frmEditAccount( wxWindow* parent ) : @@ -93,6 +94,22 @@ void frmEditAccount::DetectAddressBook( 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){ + + wxMessageBox(_("An error occured whilst connnecting: ") + TestConnection.GetErrorMessage(), _("Failed"), wxOK+wxICON_ERROR); + return; + + } + #elif defined(__WIN32__) TestConnection.BypassSSLVerification(true); @@ -151,8 +168,6 @@ void frmEditAccount::DetectAddressBook( wxCommandEvent& event ) TestConnection.BypassSSLVerification(true); COConnectResult TestConnectionResult = TestConnection.Connect(true); - - TestConnection.BypassSSLVerification(false); } else if (SSLResult == 2){ @@ -260,10 +275,10 @@ void frmEditAccount::LoadSettings( wxString AccNameIn ){ void frmEditAccount::UpdateSettings( wxCommandEvent& event ) { - // Check if server address matches against the blacklist. + // Check if server address matches against the dangerous list. // Bring up warning message if it does. - if (CheckBlacklist(txtAddress->GetValue())){ + if (CheckDangerousList(txtAddress->GetValue())){ int MessageBoxResult = wxMessageBox(_("The server with the address given does not support the CardDAV protocol properly and shouldn't be used.\n\nData loss is very likely.\n\nDo you still want to continue using this server?"), _("Server warning"), wxYES_NO, this); @@ -354,4 +369,4 @@ bool frmEditAccount::GetDialogResult(){ return DialogResult; -} \ No newline at end of file +}