From 1304a1a979873a716ad58f7050fe5e927cd9ed5a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 20 Jun 2012 19:21:01 +0200 Subject: Just check first certificate dates and errors to state IT is valid BUG: 299453 --- src/webpage.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/webpage.cpp b/src/webpage.cpp index 559d3eae..9278a897 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -744,17 +744,17 @@ bool WebPage::hasSslValid() const if (certList.isEmpty()) return false; - Q_FOREACH(const QSslCertificate & cert, certList) - { - if (!cert.isValid()) - return false; - } + const QSslCertificate cert = certList.at(0); + if (!cert.isValid()) + return false; QList errorList = SslInfoDialog::errorsFromString(_sslInfo.certificateErrors()); - Q_FOREACH(const QStringList & list, errorList) + if (!errorList.isEmpty()) { + QStringList list = errorList.at(0); if (!list.isEmpty()) return false; } + return true; } -- cgit v1.2.1