Skip to content

Commit 6e17a74

Browse files
author
Philip Kaufmann
committed
[Qt] paymentserver: better logging of invalid certs
Before and after was tested in Windows: before: GUI: ReportInvalidCertificate : Payment server found an invalid certificate: ("Microsoft Authenticode(tm) Root Authority") GUI: ReportInvalidCertificate : Payment server found an invalid certificate: () GUI: ReportInvalidCertificate : Payment server found an invalid certificate: () GUI: ReportInvalidCertificate : Payment server found an invalid certificate: () after: GUI: ReportInvalidCertificate: Payment server found an invalid certificate: "01" ("Microsoft Authenticode(tm) Root Authority") () () GUI: ReportInvalidCertificate: Payment server found an invalid certificate: "01" () () ("Copyright (c) 1997 Microsoft Corp.", "Microsoft Time Stamping Service Root", "Microsoft Corporation") GUI: ReportInvalidCertificate: Payment server found an invalid certificate: "4a:19:d2:38:8c:82:59:1c:a5:5d:73:5f:15:5d:dc:a3" () () ("NO LIABILITY ACCEPTED, (c)97 VeriSign, Inc.", "VeriSign Time Stamping Service Root", "VeriSign, Inc.") GUI: ReportInvalidCertificate: Payment server found an invalid certificate: "e4:9e:fd:f3:3a:e8:0e:cf:a5:11:3e:19:a4:24:02:32" () () ("Class 3 Public Primary Certification Authority")
1 parent 5a53d7c commit 6e17a74

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/qt/paymentserver.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ static QList<QString> savedPaymentRequests;
9797

9898
static void ReportInvalidCertificate(const QSslCertificate& cert)
9999
{
100-
qDebug() << "ReportInvalidCertificate: Payment server found an invalid certificate: " << cert.subjectInfo(QSslCertificate::CommonName);
100+
#if QT_VERSION < 0x050000
101+
qDebug() << QString("%1: Payment server found an invalid certificate: ").arg(__func__) << cert.serialNumber() << cert.subjectInfo(QSslCertificate::CommonName) << cert.subjectInfo(QSslCertificate::OrganizationalUnitName);
102+
#else
103+
qDebug() << QString("%1: Payment server found an invalid certificate: ").arg(__func__) << cert.serialNumber() << cert.subjectInfo(QSslCertificate::CommonName) << cert.subjectInfo(QSslCertificate::DistinguishedNameQualifier) << cert.subjectInfo(QSslCertificate::OrganizationalUnitName);
104+
#endif
101105
}
102106

103107
//

0 commit comments

Comments
 (0)