Fix error in logic.

Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
alex-z 2022-10-10 17:05:44 +03:00 committed by allexzander
parent 4930531949
commit 564a3ad987

View file

@ -33,13 +33,15 @@ bool SimpleSslErrorHandler::handleErrors(QList<QSslError> errors, const QSslConf
return true; return true;
} }
bool allTrusted = true;
for (const auto &error : qAsConst(errors)) { for (const auto &error : qAsConst(errors)) {
if (!account->approvedCerts().contains(error.certificate())) { if (!account->approvedCerts().contains(error.certificate())) {
certs->append(error.certificate()); allTrusted = false;
return false;
} }
certs->append(error.certificate());
} }
return true; return allTrusted;
} }
} }