From: Steve Brokenshire Date: Fri, 13 May 2016 13:47:56 +0000 (+0100) Subject: Win32 Support: Implement dialog when an untrusted SSL connection is made. X-Git-Tag: release-0.13~32 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=79662266e34aa7b9221a0ac2efaa0fd9d40af9fa;p=xestiaab%2F.git Win32 Support: Implement dialog when an untrusted SSL connection is made. --- diff --git a/source/frmEditAccount.cpp b/source/frmEditAccount.cpp index e9e9def..d850bf8 100644 --- a/source/frmEditAccount.cpp +++ b/source/frmEditAccount.cpp @@ -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); diff --git a/source/frmEditAccount.h b/source/frmEditAccount.h index 5c37bba..754e2c7 100644 --- a/source/frmEditAccount.h +++ b/source/frmEditAccount.h @@ -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 */