Skip to content

Commit 5a53d7c

Browse files
author
Philip Kaufmann
committed
[Qt] paymentserver: do not log NULL certificates
- also add a few more comments in PaymentServer::LoadRootCAs
1 parent ea2b425 commit 5a53d7c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/qt/paymentserver.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,20 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
143143

144144
int nRootCerts = 0;
145145
const QDateTime currentTime = QDateTime::currentDateTime();
146-
foreach (const QSslCertificate& cert, certList)
147-
{
146+
147+
foreach (const QSslCertificate& cert, certList) {
148+
// Don't log NULL certificates
149+
if (cert.isNull())
150+
continue;
151+
152+
// Not yet active/valid, or expired certificate
148153
if (currentTime < cert.effectiveDate() || currentTime > cert.expiryDate()) {
149154
ReportInvalidCertificate(cert);
150155
continue;
151156
}
157+
152158
#if QT_VERSION >= 0x050000
159+
// Blacklisted certificate
153160
if (cert.isBlacklisted()) {
154161
ReportInvalidCertificate(cert);
155162
continue;

0 commit comments

Comments
 (0)