GH-1202 rebuild SSL certs on start on OSX - part 3
This commit is contained in:
parent
b7ff8a4c1c
commit
877240524d
@ -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,8 +112,7 @@ 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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user