mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-03 09:11:33 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07db03d6bc | ||
|
|
d68c4b379f |
@@ -1,5 +1,9 @@
|
||||
ChangeLog
|
||||
=========
|
||||
version 1.2.3 (release 2013-04-02 ), csync 0.70.5 required
|
||||
|
||||
* [Fixes] Unbreak self-signed certificate handling
|
||||
|
||||
version 1.2.2 (release 2013-04-02 ), csync 0.70.5 required
|
||||
|
||||
* [Fixes] Do not crash when local file tree contains symlinks
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set( VERSION_MAJOR 1 )
|
||||
set( VERSION_MINOR 2 )
|
||||
set( VERSION_PATCH 2 )
|
||||
set( VERSION_PATCH 3 )
|
||||
set( VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX})
|
||||
set( SOVERSION 0 )
|
||||
|
||||
|
||||
@@ -392,8 +392,7 @@ void Application::slotSSLFailed( QNetworkReply *reply, QList<QSslError> errors )
|
||||
}
|
||||
_sslErrorDialog->setCustomConfigHandle( configHandle );
|
||||
|
||||
QList<QSslCertificate> certs = reply->sslConfiguration().peerCertificateChain();
|
||||
if( _sslErrorDialog->setErrorList( errors, certs) ) {
|
||||
if( _sslErrorDialog->setErrorList( errors ) ) {
|
||||
// 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();
|
||||
|
||||
@@ -57,16 +57,25 @@ QString SslErrorDialog::styleSheet() const
|
||||
}
|
||||
#define QL(x) QLatin1String(x)
|
||||
|
||||
bool SslErrorDialog::setErrorList( QList<QSslError> errors, QList<QSslCertificate> certs )
|
||||
QList<QSslCertificate> SslErrorDialog::storedCACerts()
|
||||
{
|
||||
MirallConfigFile cfg( _customConfigHandle );
|
||||
QList<QSslCertificate> cacerts = QSslCertificate::fromData(cfg.caCerts());
|
||||
return cacerts;
|
||||
}
|
||||
|
||||
bool SslErrorDialog::setErrorList( QList<QSslError> errors )
|
||||
{
|
||||
// check if unknown certs caused errors.
|
||||
_unknownCerts.clear();
|
||||
|
||||
QStringList errorStrings;
|
||||
|
||||
QList<QSslCertificate> trustedCerts = SslErrorDialog::storedCACerts();
|
||||
|
||||
for (int i = 0; i < errors.count(); ++i) {
|
||||
if (certs.contains(errors.at(i).certificate()) ||
|
||||
_unknownCerts.contains(errors.at(i).certificate() ))
|
||||
if (trustedCerts.contains(errors.at(i).certificate()) ||
|
||||
_unknownCerts.contains(errors.at(i).certificate() ))
|
||||
continue;
|
||||
errorStrings += errors.at(i).errorString();
|
||||
if (!errors.at(i).certificate().isNull()) {
|
||||
|
||||
@@ -34,12 +34,14 @@ class SslErrorDialog : public QDialog, public Ui::sslErrorDialog
|
||||
public:
|
||||
explicit SslErrorDialog(QWidget *parent = 0);
|
||||
|
||||
bool setErrorList( QList<QSslError> errors, QList<QSslCertificate> certs );
|
||||
bool setErrorList( QList<QSslError> errors );
|
||||
|
||||
bool trustConnection();
|
||||
|
||||
void setCustomConfigHandle( const QString& );
|
||||
|
||||
QList<QSslCertificate> storedCACerts();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
Reference in New Issue
Block a user