From c0c9350c43a206fd37c77f67c65197bbdc386f76 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 20 Jul 2011 18:46:52 +0200 Subject: Improve SSL management Hopefully addressed the problems against our (new) SSL code. CCMAIL:timb@nth-dimension.org.uk --- src/webpage.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/webpage.cpp') 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 @@ -755,9 +756,20 @@ bool WebPage::hasSslValid() { bool v = true; QList certList = _sslInfo.certificateChain(); + + if (certList.isEmpty()) + return false; + Q_FOREACH(const QSslCertificate & cert, certList) { v &= cert.isValid(); } + + QList errorsList = SslInfoDialog::errorsFromString(_sslInfo.certificateErrors()); + Q_FOREACH(const QStringList & err, errorsList) + { + v &= err.isEmpty(); + } + return v; } -- cgit v1.2.1