Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Replaced CERT_CONTEXT with PCCERT_CONTEXT for the frmMain::UpdateSSLAccountStatus...
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 16 May 2016 20:20:29 +0000 (21:20 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 16 May 2016 20:20:29 +0000 (21:20 +0100)
source/frmMain.cpp
source/frmMain.h

index 9685929..026b9e9 100644 (file)
@@ -2664,10 +2664,16 @@ void frmMain::ResumeAllTimers(){
 
 #elif defined(__WIN32__)
 
-void frmMain::UpdateSSLAccountStatus(int AccountID, int SSLStatus, CERT_CONTEXT CertificateContext){
+void frmMain::UpdateSSLAccountStatus(int AccountID, int SSLStatus, PCCERT_CONTEXT CertificateContext){
 
        // Delete existing data.
 
+       std::map<int, PCCERT_CONTEXT>::iterator CertificateIter = AccountCertificateData.find(AccountID);
+
+       if (CertificateIter != AccountCertificateData.end()){
+               CertFreeCertificateContext(CertificateIter->second);
+       }
+
        AccountCertificateData.erase(AccountID);
        AccountSSLResult.erase(AccountID);
 
index 1c9cddc..8a5ac21 100644 (file)
@@ -130,7 +130,7 @@ class frmMain : public frmMainADT
 #if defined(__APPLE__)
                std::map<int, SecTrustRef> AccountTrustData;
 #elif defined(__WIN32__)
-               std::map<int, CERT_CONTEXT> AccountCertificateData;
+               std::map<int, PCCERT_CONTEXT> AccountCertificateData;
 #else
                std::map<int, SSLCertCollection> AccountSSLData;
 #endif
@@ -279,7 +279,7 @@ class frmMain : public frmMainADT
 #if defined(__APPLE__)
                void UpdateSSLAccountStatus(int AccountID, int SSLStatus, SecTrustRef SecurityTrustObject);
 #elif defined(__WIN32__)
-               void UpdateSSLAccountStatus(int AccountID, int SSLStatus, CERT_CONTEXT CertificateContext);
+               void UpdateSSLAccountStatus(int AccountID, int SSLStatus, PCCERT_CONTEXT CertificateContext);
 #else
                void UpdateSSLAccountStatus(int AccountID, int SSLStatus, SSLCertCollection SSLCertInc);
 #endif
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