Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Free the previous SSL certificate context before getting a new one.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 16 May 2016 21:05:54 +0000 (22:05 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 16 May 2016 21:05:54 +0000 (22:05 +0100)
source/carddav/carddav.cpp

index 5276cb7..7e73c5f 100644 (file)
@@ -60,9 +60,14 @@ size_t CardDAV::WritebackFunc(char *ptr, size_t size, size_t nmemb, wxString *st
        std::string CertName;\r
 \r
        if (TLSInfo->internals != nullptr && TLSCode == CURLE_OK){\r
+\r
+               // Free the previous certificate data.\r
+\r
+               CertFreeCertificateContext(CertificateData);\r
+\r
                PCtxtHandle SSLHandle = (PCtxtHandle)TLSInfo->internals;\r
                SECURITY_STATUS GetData = QueryContextAttributes(SSLHandle, SECPKG_ATTR_REMOTE_CERT_CONTEXT, &CertificateData);\r
-               //QueryContextAttributesA(TLSInfo->internals, SECPKG_);\r
+\r
        }\r
 \r
 #endif\r
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