#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);
#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
#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