Merge remote-tracking branch 'origin/5.15' into dev

Change-Id: I962bcc50c1f78898223b13ef9d9447c5e7a2fea7
This commit is contained in:
Qt Forward Merge Bot 2020-03-21 03:05:08 +01:00
commit 1c533de109
3 changed files with 10 additions and 5 deletions

View File

@ -137,13 +137,16 @@ void QmlCoapSecureClient::setSecurityConfiguration(const QString &localCertifica
{
QCoapSecurityConfiguration configuration;
const auto localCerts = QSslCertificate::fromPath(QUrl(localCertificatePath).toLocalFile());
const auto localCerts =
QSslCertificate::fromPath(QUrl(localCertificatePath).toLocalFile(), QSsl::Pem,
QSslCertificate::PatternSyntax::FixedString);
if (localCerts.isEmpty())
qCWarning(lcCoapClient, "The specified local certificate file is not valid.");
else
configuration.setLocalCertificateChain(localCerts.toVector());
const auto caCerts = QSslCertificate::fromPath(QUrl(caCertificatePath).toLocalFile());
const auto caCerts = QSslCertificate::fromPath(QUrl(caCertificatePath).toLocalFile(), QSsl::Pem,
QSslCertificate::PatternSyntax::FixedString);
if (caCerts.isEmpty())
qCWarning(lcCoapClient, "The specified CA certificate file is not valid.");
else

View File

@ -151,7 +151,7 @@ void QCoapQUdpConnection::createSocket()
Q_D(QCoapQUdpConnection);
d->socketReadyRead();
});
connect(d->udpSocket.data(), QOverload<QAbstractSocket::SocketError>::of(&QUdpSocket::error),
connect(d->udpSocket.data(), &QUdpSocket::errorOccurred,
[this](QAbstractSocket::SocketError socketError) {
qCWarning(lcCoapConnection) << "CoAP UDP socket error" << socketError
<< socket()->errorString();

View File

@ -130,7 +130,8 @@ QCoapSecurityConfiguration createConfiguration(QtCoap::SecurityMode securityMode
}
const auto localCertPath = directory + QDir::separator() +"local_cert.pem";
const auto localCerts = QSslCertificate::fromPath(localCertPath);
const auto localCerts = QSslCertificate::fromPath(
localCertPath, QSsl::Pem, QSslCertificate::PatternSyntax::FixedString);
if (localCerts.isEmpty()) {
qWarning() << "Failed to load local certificates, the"
<< localCertPath
@ -140,7 +141,8 @@ QCoapSecurityConfiguration createConfiguration(QtCoap::SecurityMode securityMode
}
const auto caCertPath = directory + QDir::separator() + "ca_cert.pem";
const auto caCerts = QSslCertificate::fromPath(caCertPath);
const auto caCerts = QSslCertificate::fromPath(caCertPath, QSsl::Pem,
QSslCertificate::PatternSyntax::FixedString);
if (caCerts.isEmpty()) {
qWarning() << "Failed to load CA certificates, the"
<< caCertPath