From 9d5f5058a1e5e34b0f67c4a54a785975780119dd Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 6 Sep 2015 23:11:58 -0500 Subject: Fix issues with X509 certificate list usage --- tdecore/tdehw/tdecryptographiccarddevice.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tdecore/tdehw/tdecryptographiccarddevice.cpp') diff --git a/tdecore/tdehw/tdecryptographiccarddevice.cpp b/tdecore/tdehw/tdecryptographiccarddevice.cpp index 5686fa8c3..8cf8092d9 100644 --- a/tdecore/tdehw/tdecryptographiccarddevice.cpp +++ b/tdecore/tdehw/tdecryptographiccarddevice.cpp @@ -16,6 +16,8 @@ Boston, MA 02110-1301, USA. */ +#define _TDECRYPTOGRAPHICCARDDEVICE_INTERNAL 1 + #include "tdecryptographiccarddevice_private.h" #include "tdecryptographiccarddevice.h" @@ -343,9 +345,11 @@ int CryptoCardDeviceWatcher::retrieveCardCertificates(TQString readerName) { } void CryptoCardDeviceWatcher::deleteAllCertificatesFromCache() { - X509CertificatePtrListIterator it(cardDevice->m_cardCertificates); X509 *x509_cert; - while ((x509_cert = it.current()) != 0) { + + X509CertificatePtrListIterator it; + for (it = cardDevice->m_cardCertificates.begin(); it != cardDevice->m_cardCertificates.end(); ++it) { + x509_cert = *it; X509_free(x509_cert); } @@ -356,7 +360,6 @@ TDECryptographicCardDevice::TDECryptographicCardDevice(TDEGenericDeviceType::TDE m_watcherThread(NULL), m_watcherObject(NULL), m_cardPresent(false) { - m_cardCertificates.setAutoDelete(false); } TDECryptographicCardDevice::~TDECryptographicCardDevice() { -- cgit v1.2.1