diff options
-rw-r--r-- | src/mirall/application.cpp | 3 | ||||
-rw-r--r-- | src/mirall/sslerrordialog.cpp | 6 | ||||
-rw-r--r-- | src/mirall/sslerrordialog.h | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp index c4dcde9c7..78294559b 100644 --- a/src/mirall/application.cpp +++ b/src/mirall/application.cpp @@ -392,7 +392,8 @@ void Application::slotSSLFailed( QNetworkReply *reply, QList<QSslError> errors ) } _sslErrorDialog->setCustomConfigHandle( configHandle ); - if( _sslErrorDialog->setErrorList( errors ) ) { + QList<QSslCertificate> certs = reply->sslConfiguration().peerCertificateChain(); + if( _sslErrorDialog->setErrorList( errors, certs) ) { // all ssl certs are known and accepted. We can ignore the problems right away. qDebug() << "Certs are already known and trusted, Warnings are not valid."; reply->ignoreSslErrors(); diff --git a/src/mirall/sslerrordialog.cpp b/src/mirall/sslerrordialog.cpp index ec6fb3a21..e2255a26b 100644 --- a/src/mirall/sslerrordialog.cpp +++ b/src/mirall/sslerrordialog.cpp @@ -57,17 +57,15 @@ QString SslErrorDialog::styleSheet() const } #define QL(x) QLatin1String(x) -bool SslErrorDialog::setErrorList( QList<QSslError> errors ) +bool SslErrorDialog::setErrorList( QList<QSslError> errors, QList<QSslCertificate> certs ) { - QList<QSslCertificate> ourCerts = ownCloudInfo::instance()->certificateChain(); - // check if unknown certs caused errors. _unknownCerts.clear(); QStringList errorStrings; for (int i = 0; i < errors.count(); ++i) { - if (ourCerts.contains(errors.at(i).certificate()) || + if (certs.contains(errors.at(i).certificate()) || _unknownCerts.contains(errors.at(i).certificate() )) continue; errorStrings += errors.at(i).errorString(); diff --git a/src/mirall/sslerrordialog.h b/src/mirall/sslerrordialog.h index 28463c010..2d7e10550 100644 --- a/src/mirall/sslerrordialog.h +++ b/src/mirall/sslerrordialog.h @@ -22,6 +22,7 @@ #include "ui_sslerrordialog.h" class QSslError; +class QSslCertificate; namespace Mirall @@ -33,7 +34,7 @@ class SslErrorDialog : public QDialog, public Ui::sslErrorDialog public: explicit SslErrorDialog(QWidget *parent = 0); - bool setErrorList( QList<QSslError> errors ); + bool setErrorList( QList<QSslError> errors, QList<QSslCertificate> certs ); bool trustConnection(); |