Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Implemented support using ConnectionObject/CardDAV2 on Win32 systems.
[xestiaab/.git] / source / frmEditAccount.cpp
index faea105..d0f7eff 100644 (file)
@@ -94,6 +94,30 @@ void frmEditAccount::DetectAddressBook( 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 CertificateData = BuildCertificateData(&TestConnection, (HWND)this->GetHandle());
+
+               if (!CryptUIDlgViewCertificate(&CertificateData, &ModifiedCertificateData)) {
+                       wxMessageBox(_("An error occured while trying to open the certificate dialog."), _("Error opening Certificate Information dialog"));
+                       return;
+               }
+
+               if (ModifiedCertificateData == false) {
+                       wxMessageBox(_("An invalid certificate was received from the server."), _("Invalid certificate"));
+                       return;
+               } else {
+                       TestConnection.BypassSSLVerification(true);
+                       COConnectResult TestConnectionResult = TestConnection.Connect(true);
+                       TestConnection.BypassSSLVerification(false);
+               }
+
 #else
        
                // Connect again and fetch SSL certificate information.
@@ -144,9 +168,11 @@ void frmEditAccount::DetectAddressBook( wxCommandEvent& event )
        }
        
        // Get the server prefix if the connection was successful.
-       
+
        if (TestConnectionResult == COCONNECT_OK){
 
+               COConnectResult TestConnectionResult = TestConnection.Connect(true);
+
                if (UsingSSLBypass == true){
                        TestConnection.BypassSSLVerification(true);                     
                }
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