[SSL] Print warning only if something changed

This commit is contained in:
Hannah von Reth 2020-02-10 13:08:57 +01:00 committed by Kevin Ottens
parent ba87fc9e78
commit 106a35d242
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -418,11 +418,14 @@ void Account::slotHandleSslErrors(QNetworkReply *reply, QList<QSslError> errors)
if (!guard)
return;
QSslSocket::addDefaultCaCertificates(approvedCerts);
addApprovedCerts(approvedCerts);
emit wantsAccountSaved(this);
// all ssl certs are known and accepted. We can ignore the problems right away.
qCInfo(lcAccount) << out << "Certs are known and trusted! This is not an actual error.";
if (!approvedCerts.isEmpty()) {
QSslSocket::addDefaultCaCertificates(approvedCerts);
addApprovedCerts(approvedCerts);
emit wantsAccountSaved(this);
// all ssl certs are known and accepted. We can ignore the problems right away.
qCInfo(lcAccount) << out << "Certs are known and trusted! This is not an actual error.";
}
// Warning: Do *not* use ignoreSslErrors() (without args) here:
// it permanently ignores all SSL errors for this host, even