Skip to content

Commit

Permalink
Merge pull request #5666
Browse files Browse the repository at this point in the history
0c03a93 [Qt] add debug logging for -rootcertificates option (Philip Kaufmann)
  • Loading branch information
laanwj committed Jan 16, 2015
2 parents 9ca6e04 + 0c03a93 commit c29568a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/qt/paymentserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,22 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
// and get 'I don't like X.509 certificates, don't trust anybody' behavior:
QString certFile = QString::fromStdString(GetArg("-rootcertificates", "-system-"));

if (certFile.isEmpty())
return; // Empty store
// Empty store
if (certFile.isEmpty()) {
qDebug() << QString("PaymentServer::%1: Payment request authentication via X.509 certificates disabled.").arg(__func__);
return;
}

QList<QSslCertificate> certList;

if (certFile != "-system-")
{
if (certFile != "-system-") {
qDebug() << QString("PaymentServer::%1: Using \"%2\" as trusted root certificate.").arg(__func__).arg(certFile);

certList = QSslCertificate::fromPath(certFile);
// Use those certificates when fetching payment requests, too:
QSslSocket::setDefaultCaCertificates(certList);
}
else
certList = QSslSocket::systemCaCertificates ();
} else
certList = QSslSocket::systemCaCertificates();

int nRootCerts = 0;
const QDateTime currentTime = QDateTime::currentDateTime();
Expand Down

0 comments on commit c29568a

Please sign in to comment.