summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp12
-rw-r--r--Swift/QtUI/QtLoginWindow.h2
2 files changed, 10 insertions, 4 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;
}
diff --git a/Swift/QtUI/QtLoginWindow.h b/Swift/QtUI/QtLoginWindow.h
index 3978d73..0efd377 100644
--- a/Swift/QtUI/QtLoginWindow.h
+++ b/Swift/QtUI/QtLoginWindow.h
@@ -39,7 +39,7 @@ namespace Swift {
static QRect defaultPosition();
void setGentleGeometry(const QRect&);
void selectUser(const String& user);
- bool askUserToTrustCertificatePermanently(const String& message);
+ bool askUserToTrustCertificatePermanently(const String& message, Certificate::ref certificate);
virtual void quit();