Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Win32 Support: Implement dialog when an untrusted SSL connection is made.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Fri, 13 May 2016 13:47:56 +0000 (14:47 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Fri, 13 May 2016 13:47:56 +0000 (14:47 +0100)
source/frmEditAccount.cpp
source/frmEditAccount.h

index e9e9def..d850bf8 100644 (file)
@@ -105,7 +105,22 @@ void frmEditAccount::DetectAddressBook( wxCommandEvent& event )
 #if defined(__APPLE__)
        
                        SSLResult = DisplayTrustPanel(&CDavObj);
-                       
+
+#elif defined(__WIN32__)
+
+                       BOOL ModifiedCertificateData;
+                       CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = BuildCertificateData(&CDavObj, (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(_("Unable to get server prefix without a valid SSL certificate."), _("Error getting server prefix"));
+                               return;
+                       }
+
 #else
                        
                        frmInvalidSSLCertificate *frmICPtr = new frmInvalidSSLCertificate(this);
index 5c37bba..754e2c7 100644 (file)
@@ -30,6 +30,10 @@ Subclass of frmEditAccountADT, which is generated by wxFormBuilder.
 #include "common/svrblist.h"
 #include "carddav/carddav.h"
 
+#if defined(__WIN32__)
+#include "common/win32ssl.h"
+#endif
+
 //// end generated include
 
 /** Implementing frmEditAccountADT */
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