The behavior of clang-format slightly changed in Clang 5.0.0: http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
22 lines
776 B
C++
22 lines
776 B
C++
#include "./syncthingconnectionsettings.h"
|
|
|
|
namespace Data {
|
|
|
|
bool SyncthingConnectionSettings::loadHttpsCert()
|
|
{
|
|
expectedSslErrors.clear();
|
|
if (!httpsCertPath.isEmpty()) {
|
|
const QList<QSslCertificate> cert = QSslCertificate::fromPath(httpsCertPath);
|
|
if (cert.isEmpty()) {
|
|
return false;
|
|
}
|
|
expectedSslErrors.reserve(4);
|
|
expectedSslErrors << QSslError(QSslError::UnableToGetLocalIssuerCertificate, cert.at(0));
|
|
expectedSslErrors << QSslError(QSslError::UnableToVerifyFirstCertificate, cert.at(0));
|
|
expectedSslErrors << QSslError(QSslError::SelfSignedCertificate, cert.at(0));
|
|
expectedSslErrors << QSslError(QSslError::HostNameMismatch, cert.at(0));
|
|
}
|
|
return true;
|
|
}
|
|
} // namespace Data
|