mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
[Qt] add debug logging for -rootcertificates option
- now logs if -rootcertificates="" was used to disable payment request authentication via X.509 certificates - also logs which file is used as trusted root cert, if -rootcertificates is set
This commit is contained in:
parent
e0cd2f5523
commit
0c03a93e70
@ -124,19 +124,22 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
|
|||||||
// and get 'I don't like X.509 certificates, don't trust anybody' behavior:
|
// and get 'I don't like X.509 certificates, don't trust anybody' behavior:
|
||||||
QString certFile = QString::fromStdString(GetArg("-rootcertificates", "-system-"));
|
QString certFile = QString::fromStdString(GetArg("-rootcertificates", "-system-"));
|
||||||
|
|
||||||
if (certFile.isEmpty())
|
// Empty store
|
||||||
return; // Empty store
|
if (certFile.isEmpty()) {
|
||||||
|
qDebug() << QString("PaymentServer::%1: Payment request authentication via X.509 certificates disabled.").arg(__func__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QList<QSslCertificate> certList;
|
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);
|
certList = QSslCertificate::fromPath(certFile);
|
||||||
// Use those certificates when fetching payment requests, too:
|
// Use those certificates when fetching payment requests, too:
|
||||||
QSslSocket::setDefaultCaCertificates(certList);
|
QSslSocket::setDefaultCaCertificates(certList);
|
||||||
}
|
} else
|
||||||
else
|
certList = QSslSocket::systemCaCertificates();
|
||||||
certList = QSslSocket::systemCaCertificates ();
|
|
||||||
|
|
||||||
int nRootCerts = 0;
|
int nRootCerts = 0;
|
||||||
const QDateTime currentTime = QDateTime::currentDateTime();
|
const QDateTime currentTime = QDateTime::currentDateTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user