diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp index ee6d76305..bdb0cf342 100644 --- a/src/libsync/account.cpp +++ b/src/libsync/account.cpp @@ -418,11 +418,14 @@ void Account::slotHandleSslErrors(QNetworkReply *reply, QList 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