aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-12-12 10:15:34 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2015-04-15 14:31:48 +0200
commit5a53d7cda37677f393cddcc483523eb2cbfaf88d (patch)
tree6bacb0735ac849ebeca2f6a6047d716fb3976938 /src/qt
parentea2b425b00b01b5b6670fa39488caf146dac4642 (diff)
downloadbitcoin-5a53d7cda37677f393cddcc483523eb2cbfaf88d.tar.xz
[Qt] paymentserver: do not log NULL certificates
- also add a few more comments in PaymentServer::LoadRootCAs
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/paymentserver.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index ad489de343..f05bfc059f 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -143,13 +143,20 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
int nRootCerts = 0;
const QDateTime currentTime = QDateTime::currentDateTime();
- foreach (const QSslCertificate& cert, certList)
- {
+
+ foreach (const QSslCertificate& cert, certList) {
+ // Don't log NULL certificates
+ if (cert.isNull())
+ continue;
+
+ // Not yet active/valid, or expired certificate
if (currentTime < cert.effectiveDate() || currentTime > cert.expiryDate()) {
ReportInvalidCertificate(cert);
continue;
}
+
#if QT_VERSION >= 0x050000
+ // Blacklisted certificate
if (cert.isBlacklisted()) {
ReportInvalidCertificate(cert);
continue;