summaryrefslogtreecommitdiff
path: root/src/urlbar/sslwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-25 19:01:24 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-25 19:01:24 +0200
commitd1711fffc795d925d89980f56cd02b767e871c59 (patch)
treeb4679b32a257b9edb2e8e6931f3d153294f439e4 /src/urlbar/sslwidget.cpp
parentProvide a "click" mechanism to manage favorites (diff)
downloadrekonq-d1711fffc795d925d89980f56cd02b767e871c59.tar.xz
Last SSL fixes
- strings - bool WebPage::hasSslValid() const - check all the certificate chain
Diffstat (limited to 'src/urlbar/sslwidget.cpp')
-rw-r--r--src/urlbar/sslwidget.cpp31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/urlbar/sslwidget.cpp b/src/urlbar/sslwidget.cpp
index a86151a9..ce08e974 100644
--- a/src/urlbar/sslwidget.cpp
+++ b/src/urlbar/sslwidget.cpp
@@ -49,8 +49,15 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
setAttribute(Qt::WA_DeleteOnClose);
setMinimumWidth(400);
- QSslCertificate cert = m_info.certificateChain().first();
- QStringList firstCertErrorList = SslInfoDialog::errorsFromString(m_info.certificateErrors()).first();
+ QList<QSslCertificate> certList = m_info.certificateChain();
+ QSslCertificate cert;
+ if (!certList.isEmpty())
+ cert = certList.first();
+
+ QList<QStringList> certErrorList = SslInfoDialog::errorsFromString(m_info.certificateErrors());
+ QStringList firstCertErrorList;
+ if (!certErrorList.isEmpty())
+ firstCertErrorList = certErrorList.first();
QGridLayout *layout = new QGridLayout(this);
@@ -77,12 +84,14 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
label->setText(i18n("Warning: this site is NOT carrying a certificate!"));
imageLabel->setPixmap(KIcon("security-low").pixmap(32));
+
+ layout->addWidget(label, rows++, 1);
}
else
{
if(cert.isValid() && firstCertErrorList.isEmpty())
{
- label->setText(i18n("This certificate for this site is valid and has been verified by:\n%1.",
+ label->setText(i18n("The certificate for this site is valid and has been verified by:\n%1.",
Qt::escape(cert.issuerInfo(QSslCertificate::CommonName)) ));
imageLabel->setPixmap(KIcon("security-high").pixmap(32));
@@ -100,15 +109,15 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
label->setTextFormat(Qt::RichText);
imageLabel->setPixmap(KIcon("security-low").pixmap(32));
}
- }
- layout->addWidget(label, rows++, 1);
+ layout->addWidget(label, rows++, 1);
- label = new QLabel(this);
- label->setWordWrap(true);
- label->setText("<a href=\"moresslinfos\">Certificate Information</a>");
- connect(label, SIGNAL(linkActivated(const QString &)), this, SLOT(showMoreSslInfos(const QString &)));
- layout->addWidget(label, rows++, 1);
+ label = new QLabel(this);
+ label->setWordWrap(true);
+ label->setText("<a href=\"moresslinfos\">Certificate Information</a>");
+ connect(label, SIGNAL(linkActivated(const QString &)), this, SLOT(showMoreSslInfos(const QString &)));
+ layout->addWidget(label, rows++, 1);
+ }
// ------------------------------------------------------------------------------------------------------------------
label = new QLabel(this);
@@ -171,7 +180,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
label = new QLabel(this);
label->setWordWrap(true);
label->setText(
- i18n("It is encrypted using %1 at %2 bits\nMessage authentication: %3\nKey exchange mechanism: %4, with Auth %5.\n\n",
+ i18n("It is encrypted using %1 at %2 bits, with %3 for message authentication and %4 with Auth %5 as key exchange mechanism.\n\n",
cipherInfo[0],
m_info.usedChiperBits(),
cipherInfo[3],