summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-05-12 18:09:25 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-05-12 18:09:25 (GMT)
commit159e773b156f531575d0d7e241e2d20c85ee6d7c (patch)
tree9116f69b5f20ec07060b73308427ab524305344f /Swift/Controllers/MainController.cpp
parent0f91f88ac69644fb7e7bdbf601b7e098194490fa (diff)
downloadswift-contrib-159e773b156f531575d0d7e241e2d20c85ee6d7c.zip
swift-contrib-159e773b156f531575d0d7e241e2d20c85ee6d7c.tar.bz2
Show Certificate dialog from certificate error window.
Diffstat (limited to 'Swift/Controllers/MainController.cpp')
-rw-r--r--Swift/Controllers/MainController.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 40b4ded..cb43057 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -559,9 +559,9 @@ void MainController::handleDisconnected(const boost::optional<ClientError>& erro
}
bool forceReconnectAfterCertificateTrust = false;
if (!certificateErrorMessage.empty()) {
- Certificate::ref certificate = certificateTrustChecker_->getLastCertificate();
- if (loginWindow_->askUserToTrustCertificatePermanently(certificateErrorMessage, certificate)) {
- certificateStorage_->addCertificate(certificate);
+ std::vector<Certificate::ref> certificates = certificateTrustChecker_->getLastCertificateChain();
+ if (!certificates.empty() && loginWindow_->askUserToTrustCertificatePermanently(certificateErrorMessage, certificates)) {
+ certificateStorage_->addCertificate(certificates[0]);
forceReconnectAfterCertificateTrust = true;
}
else {