GH-1202 rebuild SSL certs on start on OSX - part 3

This commit is contained in:
Petr Mrázek 2015-09-29 01:21:04 +02:00
parent b7ff8a4c1c
commit 877240524d

View File

@ -3,6 +3,7 @@
#include <QByteArray> #include <QByteArray>
#include <QSslSocket> #include <QSslSocket>
#include <QDebug>
#include <Security/Security.h> #include <Security/Security.h>
@ -75,8 +76,7 @@ LoadCertificatesFromKeyChain(const std::string &keyChainPath = std::string())
qDebug() << "COMMON NAME: " qDebug() << "COMMON NAME: "
<< qtCert.issuerInfo(QSslCertificate::CommonName).join('\n') << qtCert.issuerInfo(QSslCertificate::CommonName).join('\n')
<< " ORG NAME: " << " ORG NAME: "
<< qtCert.issuerInfo(QSslCertificate::Organization).join('\n') << qtCert.issuerInfo(QSslCertificate::Organization).join('\n');
<< std::endl;
qtCerts << qtCert; qtCerts << qtCert;
} }
@ -112,10 +112,9 @@ void RebuildQtCertificates()
qDebug() << "COMMON NAME: " qDebug() << "COMMON NAME: "
<< qtCert.issuerInfo(QSslCertificate::CommonName).join('\n') << qtCert.issuerInfo(QSslCertificate::CommonName).join('\n')
<< " ORG NAME: " << " ORG NAME: "
<< qtCert.issuerInfo(QSslCertificate::Organization).join('\n') << qtCert.issuerInfo(QSslCertificate::Organization).join('\n');
<< std::endl;
QSslSocket::addDefaultCaCertificate(qtCert); QSslSocket::addDefaultCaCertificate(qtCert);
} }
} }
} }