diff options
Diffstat (limited to 'Swift/QtUI/QtLoginWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtLoginWindow.cpp | 12 |
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; } |