Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Implemented support using ConnectionObject/CardDAV2 on Win32 systems.
[xestiaab/.git] / source / frmNewAccount-CardDAV2.cpp
index d8bd4fb..8e5fe3c 100644 (file)
@@ -49,6 +49,33 @@ void frmNewAccount::RunCardDAV2Test( wxCommandEvent& event ){
        if (TestConnection.SSLVerify() == COSSL_UNABLETOVERIFY){
 #if defined(__APPLE__)
 #elif defined(__WIN32__)
+
+               TestConnection.BypassSSLVerification(true);
+
+               COConnectResult TestConnectionResult = TestConnection.Connect(false);
+
+               TestConnection.BypassSSLVerification(false);
+
+               BOOL ModifiedCertificateData = false;
+
+               CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateDialogData = BuildCertificateData(&TestConnection, (HWND)this->GetHandle());
+
+               if (!CryptUIDlgViewCertificate(&CertificateDialogData, &ModifiedCertificateData)){
+                       wxMessageBox(_("An error occured while trying to open the certificate dialog."), _("Error opening Certificate Information dialog"));
+               }
+
+               if (ModifiedCertificateData == false){
+
+                       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
        
                // Connect again and fetch SSL certificate information.
@@ -98,6 +125,8 @@ void frmNewAccount::RunCardDAV2Test( wxCommandEvent& event ){
 #endif
        }
        
+       TestConnectionResult = TestConnection.Connect(true);
+
        // Get the server prefix if the connection was successful.
        
        if (TestConnectionResult == COCONNECT_OK){
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