зеркало из https://github.com/nextcloud/desktop.git
Merge remote-tracking branch into 1.8
This commit is contained in:
Коммит
50ba73860c
|
@ -15,9 +15,10 @@
|
||||||
#include "account.h"
|
#include "account.h"
|
||||||
#include "simplesslerrorhandler.h"
|
#include "simplesslerrorhandler.h"
|
||||||
|
|
||||||
bool SimpleSslErrorHandler::handleErrors(QList<QSslError> errors, QList<QSslCertificate> *certs, OCC::AccountPtr account)
|
bool SimpleSslErrorHandler::handleErrors(QList<QSslError> errors, const QSslConfiguration &conf, QList<QSslCertificate> *certs, OCC::AccountPtr account)
|
||||||
{
|
{
|
||||||
(void) account;
|
(void) account;
|
||||||
|
(void) conf;
|
||||||
|
|
||||||
if (!certs) {
|
if (!certs) {
|
||||||
qDebug() << "Certs parameter required but is NULL!";
|
qDebug() << "Certs parameter required but is NULL!";
|
||||||
|
|
|
@ -20,7 +20,7 @@ class QSslCertificate;
|
||||||
|
|
||||||
class SimpleSslErrorHandler : public OCC::AbstractSslErrorHandler {
|
class SimpleSslErrorHandler : public OCC::AbstractSslErrorHandler {
|
||||||
public:
|
public:
|
||||||
bool handleErrors(QList<QSslError> errors, QList<QSslCertificate> *certs, OCC::AccountPtr) Q_DECL_OVERRIDE;
|
bool handleErrors(QList<QSslError> errors, const QSslConfiguration &conf, QList<QSslCertificate> *certs, OCC::AccountPtr) Q_DECL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SIMPLESSLERRORHANDLER_H
|
#endif // SIMPLESSLERRORHANDLER_H
|
||||||
|
|
|
@ -34,8 +34,9 @@ namespace Utility {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool SslDialogErrorHandler::handleErrors(QList<QSslError> errors, QList<QSslCertificate> *certs, AccountPtr account)
|
bool SslDialogErrorHandler::handleErrors(QList<QSslError> errors, const QSslConfiguration &conf, QList<QSslCertificate> *certs, AccountPtr account)
|
||||||
{
|
{
|
||||||
|
(void) conf;
|
||||||
if (!certs) {
|
if (!certs) {
|
||||||
qDebug() << "Certs parameter required but is NULL!";
|
qDebug() << "Certs parameter required but is NULL!";
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -33,7 +33,7 @@ class SslErrorDialog;
|
||||||
|
|
||||||
class SslDialogErrorHandler : public AbstractSslErrorHandler {
|
class SslDialogErrorHandler : public AbstractSslErrorHandler {
|
||||||
public:
|
public:
|
||||||
bool handleErrors(QList<QSslError> errors, QList<QSslCertificate> *certs, AccountPtr) Q_DECL_OVERRIDE;
|
bool handleErrors(QList<QSslError> errors, const QSslConfiguration &conf, QList<QSslCertificate> *certs, AccountPtr) Q_DECL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SslErrorDialog : public QDialog
|
class SslErrorDialog : public QDialog
|
||||||
|
|
|
@ -486,7 +486,7 @@ void Account::slotHandleErrors(QNetworkReply *reply , QList<QSslError> errors)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_sslErrorHandler->handleErrors(errors, &approvedCerts, sharedFromThis())) {
|
if (_sslErrorHandler->handleErrors(errors, reply->sslConfiguration(), &approvedCerts, sharedFromThis())) {
|
||||||
QSslSocket::addDefaultCaCertificates(approvedCerts);
|
QSslSocket::addDefaultCaCertificates(approvedCerts);
|
||||||
addApprovedCerts(approvedCerts);
|
addApprovedCerts(approvedCerts);
|
||||||
// all ssl certs are known and accepted. We can ignore the problems right away.
|
// all ssl certs are known and accepted. We can ignore the problems right away.
|
||||||
|
|
|
@ -62,7 +62,7 @@ private:
|
||||||
class AbstractSslErrorHandler {
|
class AbstractSslErrorHandler {
|
||||||
public:
|
public:
|
||||||
virtual ~AbstractSslErrorHandler() {}
|
virtual ~AbstractSslErrorHandler() {}
|
||||||
virtual bool handleErrors(QList<QSslError>, QList<QSslCertificate>*, AccountPtr) = 0;
|
virtual bool handleErrors(QList<QSslError>, const QSslConfiguration &conf, QList<QSslCertificate>*, AccountPtr) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Загрузка…
Ссылка в новой задаче