diff options
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r-- | src/webpage.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp index 93e41944..0c9b436d 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -50,6 +50,7 @@ #include "webpluginfactory.h" #include "webtab.h" #include "sslwidget.h" +#include "sslinfodialog.h" // KDE Includes #include <KIO/Job> @@ -755,9 +756,20 @@ bool WebPage::hasSslValid() { bool v = true; QList<QSslCertificate> certList = _sslInfo.certificateChain(); + + if (certList.isEmpty()) + return false; + Q_FOREACH(const QSslCertificate & cert, certList) { v &= cert.isValid(); } + + QList<QStringList> errorsList = SslInfoDialog::errorsFromString(_sslInfo.certificateErrors()); + Q_FOREACH(const QStringList & err, errorsList) + { + v &= err.isEmpty(); + } + return v; } |