2014-04-01 13:57:37 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Klaas Freitag <freitag@owncloud.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2016-10-25 09:00:07 +00:00
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2014-04-01 13:57:37 +00:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
2014-11-09 22:25:57 +00:00
|
|
|
#include "configfile.h"
|
2014-07-10 22:31:24 +00:00
|
|
|
#include "utility.h"
|
|
|
|
#include "account.h"
|
2014-04-01 13:57:37 +00:00
|
|
|
#include "simplesslerrorhandler.h"
|
|
|
|
|
2015-06-26 15:07:47 +00:00
|
|
|
namespace OCC {
|
|
|
|
|
2015-04-06 19:46:03 +00:00
|
|
|
bool SimpleSslErrorHandler::handleErrors(QList<QSslError> errors, const QSslConfiguration &conf, QList<QSslCertificate> *certs, OCC::AccountPtr account)
|
2014-04-01 13:57:37 +00:00
|
|
|
{
|
|
|
|
(void) account;
|
2015-04-06 19:46:03 +00:00
|
|
|
(void) conf;
|
2014-04-01 13:57:37 +00:00
|
|
|
|
|
|
|
if (!certs) {
|
|
|
|
qDebug() << "Certs parameter required but is NULL!";
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach( QSslError error, errors ) {
|
|
|
|
certs->append( error.certificate() );
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-26 15:07:47 +00:00
|
|
|
|
|
|
|
}
|