summaryrefslogtreecommitdiffstats
path: root/src/plugins/tls/openssl/qtls_openssl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/tls/openssl/qtls_openssl.cpp')
-rw-r--r--src/plugins/tls/openssl/qtls_openssl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/tls/openssl/qtls_openssl.cpp b/src/plugins/tls/openssl/qtls_openssl.cpp
index a78bdca53f..57d09a649b 100644
--- a/src/plugins/tls/openssl/qtls_openssl.cpp
+++ b/src/plugins/tls/openssl/qtls_openssl.cpp
@@ -92,7 +92,7 @@ QSslCertificate findCertificateToFetch(const QList<QSslError> &tlsErrors, bool c
if (checkAIA) {
const auto extensions = certToFetch.extensions();
for (const auto &ext : extensions) {
- if (ext.oid() == QStringLiteral("1.3.6.1.5.5.7.1.1")) // See RFC 4325
+ if (ext.oid() == u"1.3.6.1.5.5.7.1.1") // See RFC 4325
return certToFetch;
}
//The only reason we check this extensions is because an application set trusted
@@ -490,7 +490,7 @@ void TlsCryptographOpenSSL::init(QSslSocket *qObj, QSslSocketPrivate *dObj)
handshakeInterrupted = false;
fetchAuthorityInformation = false;
- caToFetch = QSslCertificate{};
+ caToFetch.reset();
}
void TlsCryptographOpenSSL::checkSettingSslContext(std::shared_ptr<QSslContext> tlsContext)
@@ -577,7 +577,7 @@ bool TlsCryptographOpenSSL::startHandshake()
auto configuration = q->sslConfiguration();
if (!errorsReportedFromCallback) {
const auto &peerCertificateChain = configuration.peerCertificateChain();
- for (const auto &currentError : qAsConst(lastErrors)) {
+ for (const auto &currentError : std::as_const(lastErrors)) {
emit q->peerVerifyError(QTlsPrivate::X509CertificateOpenSSL::openSSLErrorToQSslError(currentError.code,
peerCertificateChain.value(currentError.depth)));
if (q->state() != QAbstractSocket::ConnectedState)
@@ -697,7 +697,7 @@ bool TlsCryptographOpenSSL::startHandshake()
// Translate errors from the error list into QSslErrors.
errors.reserve(errors.size() + errorList.size());
- for (const auto &error : qAsConst(errorList))
+ for (const auto &error : std::as_const(errorList))
errors << X509CertificateOpenSSL::openSSLErrorToQSslError(error.code, peerCertificateChain.value(error.depth));
if (!errors.isEmpty()) {
@@ -749,7 +749,7 @@ void TlsCryptographOpenSSL::enableHandshakeContinuation()
void TlsCryptographOpenSSL::cancelCAFetch()
{
fetchAuthorityInformation = false;
- caToFetch = QSslCertificate{};
+ caToFetch.reset();
}
void TlsCryptographOpenSSL::continueHandshake()
@@ -1803,7 +1803,7 @@ void TlsCryptographOpenSSL::caRootLoaded(QSslCertificate cert, QSslCertificate t
Q_ASSERT(q);
//Done, fetched already:
- caToFetch = QSslCertificate{};
+ caToFetch.reset();
if (fetchAuthorityInformation) {
if (!q->sslConfiguration().caCertificates().contains(trustedRoot))