mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 06:45:49 +03:00
[SSL] Properly restore user accepted certificats
This commit is contained in:
parent
c8dd333e31
commit
ba87fc9e78
2 changed files with 4 additions and 1 deletions
|
@ -332,7 +332,9 @@ AccountPtr AccountManager::loadAccountHelper(QSettings &settings)
|
|||
|
||||
// now the server cert, it is in the general group
|
||||
settings.beginGroup(QLatin1String("General"));
|
||||
acc->setApprovedCerts(QSslCertificate::fromData(settings.value(caCertsKeyC).toByteArray()));
|
||||
const auto certs = QSslCertificate::fromData(settings.value(caCertsKeyC).toByteArray());
|
||||
qCInfo(lcAccountManager) << "Restored: " << certs.count() << " unknown certs.";
|
||||
acc->setApprovedCerts(certs);
|
||||
settings.endGroup();
|
||||
|
||||
return acc;
|
||||
|
|
|
@ -327,6 +327,7 @@ QSslConfiguration Account::getOrCreateSslConfig()
|
|||
void Account::setApprovedCerts(const QList<QSslCertificate> certs)
|
||||
{
|
||||
_approvedCerts = certs;
|
||||
QSslSocket::addDefaultCaCertificates(certs);
|
||||
}
|
||||
|
||||
void Account::addApprovedCerts(const QList<QSslCertificate> certs)
|
||||
|
|
Loading…
Reference in a new issue