summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-13 20:08:40 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-13 20:08:40 (GMT)
commit0863ece69f6490602e90b22c0dd17189bd8bf5a7 (patch)
tree640ea400d7b2e8786c6551795e070e0727f3b75e /Swift/QtUI/QtLoginWindow.cpp
parentc8603ee2ea4dfe9b881367198dbd259986345412 (diff)
downloadswift-0863ece69f6490602e90b22c0dd17189bd8bf5a7.zip
swift-0863ece69f6490602e90b22c0dd17189bd8bf5a7.tar.bz2
Extend the certificate accept dialog & login after accept.
Diffstat (limited to 'Swift/QtUI/QtLoginWindow.cpp')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 42641ba..c1f4f24 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -391,12 +391,18 @@ void QtLoginWindow::moveEvent(QMoveEvent*) {
emit geometryChanged();
}
-bool QtLoginWindow::askUserToTrustCertificatePermanently(const String& message) {
+bool QtLoginWindow::askUserToTrustCertificatePermanently(const String& message, Certificate::ref certificate) {
QMessageBox dialog(this);
- dialog.setText("Invalid server certificate.");
- dialog.setInformativeText("The certificate presented by the server is not valid. " + P2QSTRING(message) + " Would you like to permanently trust this certificate? This must only be done if you know it is correct.");
+
+ dialog.setText("The certificate presented by the server is not valid.");
+ dialog.setInformativeText(P2QSTRING(message) + "\n\nWould you like to permanently trust this certificate? This must only be done if you know it is correct.");
+
+ QString detailedText = "Subject: " + P2QSTRING(certificate->getSubjectName());
+ dialog.setDetailedText(detailedText);
+
dialog.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
dialog.setDefaultButton(QMessageBox::No);
+
return dialog.exec() == QMessageBox::Yes;
}