From 5e2367aaa5137f27c722cd7f8474696b0fbaa099 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 11 Oct 2016 20:39:11 +0200 Subject: use regular configure mechanism for openssl library references don't attempt to hand-craft a library export any more. instead, use the configure system's built-in mechanism, and refer to it via QMAKE_USE. this also allows us to rely on transitive dependencies in the autotest. as a side effect, this makes the openssl-linked feature imply the openssl one. Change-Id: I5dd209b63bc8fbbc62852f6ffc472d4452ea2e68 Reviewed-by: Lars Knoll --- src/network/configure.json | 31 ++++++++++++++++--------------- src/network/ssl/ssl.pri | 16 +++++----------- 2 files changed, 21 insertions(+), 26 deletions(-) (limited to 'src/network') diff --git a/src/network/configure.json b/src/network/configure.json index 1e08aa7c49..c9077c8968 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -46,13 +46,24 @@ "-lproxy" ] }, + "openssl_headers": { + "label": "OpenSSL Headers", + "export": "openssl", + "test": "unix/openssl", + "sources": [ + { + "comment": "placeholder for OPENSSL_PATH", + "libs": "" + } + ] + }, "openssl": { - "label": "OpenSSL Libraries", - "export": "", + "label": "OpenSSL", + "test": "unix/openssl", "sources": [ { "type": "openssl" }, { - "comment": "placeholder for OPENSSL_LIBS{,_{DEBUG,RELEASE}}", + "comment": "placeholder for OPENSSL_{PATH,LIBS{,_{DEBUG,RELEASE}}}", "libs": "", "builds": { "debug": "", @@ -92,11 +103,6 @@ "test": "unix/ipv6ifname", "use": "network" }, - "openssl": { - "label": "OpenSSL", - "type": "compile", - "test": "unix/openssl" - }, "sctp": { "label": "SCTP support", "type": "compile", @@ -138,7 +144,7 @@ "enable": "input.openssl == 'yes' || input.openssl == 'linked' || input.openssl == 'runtime'", "disable": "input.openssl == 'no' || input.ssl == 'no'", "autoDetect": "!config.winrt", - "condition": "!features.securetransport && tests.openssl", + "condition": "!features.securetransport && (features.openssl-linked || libs.openssl_headers)", "output": [ "privateFeature", { "type": "publicQtConfig", "condition": "!features.openssl-linked" }, @@ -149,14 +155,9 @@ "label": " Qt directly linked to OpenSSL", "enable": "input.openssl == 'linked'", "disable": "input.openssl != 'linked'", - "condition": "features.openssl && libs.openssl", + "condition": "!features.securetransport && libs.openssl", "output": [ "privateFeature", - { "type": "varAssign", "name": "OPENSSL_LIBS", "value": "libs.openssl.libs", "eval": "true" }, - { "type": "varAssign", "name": "OPENSSL_LIBS_DEBUG", "value": "libs.openssl.builds.debug.libs", - "eval": "true", "condition": "config.win32" }, - { "type": "varAssign", "name": "OPENSSL_LIBS_RELEASE", "value": "libs.openssl.builds.release.libs", - "eval": "true", "condition": "config.win32" }, { "type": "define", "name": "QT_LINKED_OPENSSL" } ] }, diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri index 79351017a6..52ce2eeade 100644 --- a/src/network/ssl/ssl.pri +++ b/src/network/ssl/ssl.pri @@ -56,7 +56,7 @@ qtConfig(ssl) { ssl/qsslellipticcurve_dummy.cpp } - qtConfig(openssl)|qtConfig(openssl-linked) { + qtConfig(openssl) { HEADERS += ssl/qsslcontext_openssl_p.h \ ssl/qsslsocket_openssl_p.h \ ssl/qsslsocket_openssl_symbols_p.h @@ -79,16 +79,10 @@ qtConfig(ssl) { # - libs in \lib\VC\static # - configure: -openssl -openssl-linked -I \include -L \lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32" OPENSSL_LIBS_DEBUG="-lssleay32MDd -llibeay32MDd" OPENSSL_LIBS_RELEASE="-lssleay32MD -llibeay32MD" - include($$OUT_PWD/qtnetwork-config.pri) - - CONFIG(debug, debug|release) { - LIBS_PRIVATE += $$OPENSSL_LIBS_DEBUG - } else { - LIBS_PRIVATE += $$OPENSSL_LIBS_RELEASE - } - - QMAKE_CXXFLAGS += $$OPENSSL_CFLAGS - LIBS_PRIVATE += $$OPENSSL_LIBS + qtConfig(openssl-linked): \ + QMAKE_USE_FOR_PRIVATE += openssl + else: \ + QMAKE_USE_FOR_PRIVATE += openssl/nolink win32: LIBS_PRIVATE += -lcrypt32 } } -- cgit v1.2.3 From 59a3abd1f1429eef19e178e880070c3c1d902fba Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 8 Feb 2017 21:22:08 +0100 Subject: configure: generalize command line overrides of library parameters the outdated ones remain for backwards compatibility; some remain unchanged. Task-number: QTBUG-30083 Change-Id: Ia596b854d26b00fcb4f48df0da7ad893650ac1c8 Reviewed-by: Lars Knoll --- src/network/configure.json | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/network') diff --git a/src/network/configure.json b/src/network/configure.json index c9077c8968..7bd3f6164a 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -7,9 +7,6 @@ "commandline": { "assignments": { - "OPENSSL_LIBS": "openssl.libs", - "OPENSSL_LIBS_DEBUG": "openssl.libs.debug", - "OPENSSL_LIBS_RELEASE": "openssl.libs.release", "OPENSSL_PATH": "openssl.prefix" }, "options": { -- cgit v1.2.3 From 4c367833b4c1776f01eff3d51472a9889c85e1c5 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 20 Feb 2017 11:16:12 +0100 Subject: Fix multicastMembershipHelper to not assume addresses are IPv4 Make it iterate the addresses available looking for an IPv4 address, when that's what it needs, instead of just assuming the first entry in the list (when non-empty) is IPv4. Based on a suggestion by Dmitry Pankratov. Task-number: QTBUG-27641 Change-Id: I1920f68ade44a996ea5c2ed691a87ff3e686f35a Reviewed-by: Marc Mutz Reviewed-by: Timur Pocheptsov Reviewed-by: Thiago Macieira --- src/network/socket/qnativesocketengine_unix.cpp | 14 ++++++++++---- src/network/socket/qnativesocketengine_win.cpp | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'src/network') diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index d1efc21e09..e140b33ce9 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -679,10 +679,16 @@ static bool multicastMembershipHelper(QNativeSocketEnginePrivate *d, if (interface.isValid()) { const QList addressEntries = interface.addressEntries(); - if (!addressEntries.isEmpty()) { - QHostAddress firstIP = addressEntries.first().ip(); - mreq4.imr_interface.s_addr = htonl(firstIP.toIPv4Address()); - } else { + bool found = false; + for (const QNetworkAddressEntry &entry : addressEntries) { + const QHostAddress ip = entry.ip(); + if (ip.protocol() == QAbstractSocket::IPv4Protocol) { + mreq4.imr_interface.s_addr = htonl(ip.toIPv4Address()); + found = true; + break; + } + } + if (!found) { d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::NetworkUnreachableErrorString); return false; diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index 5a9641a9fe..e203571a63 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -959,10 +959,16 @@ static bool multicastMembershipHelper(QNativeSocketEnginePrivate *d, if (iface.isValid()) { const QList addressEntries = iface.addressEntries(); - if (!addressEntries.isEmpty()) { - QHostAddress firstIP = addressEntries.first().ip(); - mreq4.imr_interface.s_addr = htonl(firstIP.toIPv4Address()); - } else { + bool found = false; + for (const QNetworkAddressEntry &entry : addressEntries) { + const QHostAddress ip = entry.ip(); + if (ip.protocol() == QAbstractSocket::IPv4Protocol) { + mreq4.imr_interface.s_addr = htonl(ip.toIPv4Address()); + found = true; + break; + } + } + if (!found) { d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::NetworkUnreachableErrorString); return false; -- cgit v1.2.3 From b48e960969bee08174c79d6660de1e448f1c6b5c Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Wed, 22 Feb 2017 18:22:02 +0100 Subject: HSTS - API/naming fixes As recommended in API review: use 'is...STS...Enabled' and 'set...STS..Enabled(bool)' function names instead of stsEnabled and separate enable/disable functions. Replace QList with QVector in the public API. Change-Id: I1526124c830450058967ebc192d27575cc89292d Reviewed-by: Marc Mutz --- src/network/access/qhsts.cpp | 14 ++++++---- src/network/access/qhsts_p.h | 8 +++--- src/network/access/qhstspolicy.cpp | 2 +- src/network/access/qnetworkaccessmanager.cpp | 40 +++++++++------------------- src/network/access/qnetworkaccessmanager.h | 10 +++---- src/network/access/qnetworkreply.cpp | 2 +- 6 files changed, 34 insertions(+), 42 deletions(-) (limited to 'src/network') diff --git a/src/network/access/qhsts.cpp b/src/network/access/qhsts.cpp index 5e4f75b0ed..3581fbc796 100644 --- a/src/network/access/qhsts.cpp +++ b/src/network/access/qhsts.cpp @@ -39,9 +39,9 @@ #include "qhsts_p.h" -#include "QtCore/qstringlist.h" - #include "QtCore/private/qipaddress_p.h" +#include "QtCore/qvector.h" +#include "QtCore/qlist.h" QT_BEGIN_NAMESPACE @@ -84,7 +84,7 @@ void QHstsCache::updateFromHeaders(const QList> &h updateKnownHost(url.host(), parser.expirationDate(), parser.includeSubDomains()); } -void QHstsCache::updateFromPolicies(const QList &policies) +void QHstsCache::updateFromPolicies(const QVector &policies) { for (const auto &policy : policies) updateKnownHost(policy.host(), policy.expiry(), policy.includesSubDomains()); @@ -183,9 +183,13 @@ void QHstsCache::clear() knownHosts.clear(); } -QList QHstsCache::policies() const +QVector QHstsCache::policies() const { - return knownHosts.values(); + QVector values; + values.reserve(knownHosts.size()); + for (const auto &host : knownHosts) + values << host; + return values; } // The parser is quite simple: 'nextToken' knowns exactly what kind of tokens diff --git a/src/network/access/qhsts_p.h b/src/network/access/qhsts_p.h index 5d95f39b96..ab3ca536fb 100644 --- a/src/network/access/qhsts_p.h +++ b/src/network/access/qhsts_p.h @@ -57,26 +57,28 @@ #include #include #include -#include #include #include #include QT_BEGIN_NAMESPACE +template class QList; +template class QVector; + class Q_AUTOTEST_EXPORT QHstsCache { public: void updateFromHeaders(const QList> &headers, const QUrl &url); - void updateFromPolicies(const QList &hosts); + void updateFromPolicies(const QVector &hosts); void updateKnownHost(const QUrl &url, const QDateTime &expires, bool includeSubDomains); bool isKnownHost(const QUrl &url) const; void clear(); - QList policies() const; + QVector policies() const; private: diff --git a/src/network/access/qhstspolicy.cpp b/src/network/access/qhstspolicy.cpp index 6922e1d8f9..e8b4e0aeff 100644 --- a/src/network/access/qhstspolicy.cpp +++ b/src/network/access/qhstspolicy.cpp @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE applies to subdomains, either in the constructor or by calling setExpiry(), setHost() and setIncludesSubdomains(). - \sa QNetworkAccessManager::enableStrictTransportSecurity() + \sa QNetworkAccessManager::setStrictTransportSecurityEnabled() */ class QHstsPolicyPrivate diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 19e9ecc265..0b03865df8 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -697,36 +697,22 @@ void QNetworkAccessManager::setCookieJar(QNetworkCookieJar *cookieJar) /*! \since 5.9 - Enables HTTP Strict Transport Security (HSTS, RFC6797). When processing a - request, QNetworkAccessManager automatically replaces "http" scheme with - "https" and uses a secure transport if a host is a known HSTS host. - Port 80 if it's set explicitly is replaced by port 443. + If \a enabled is \c true, QNetworkAccessManager follows the HTTP Strict Transport + Security policy (HSTS, RFC6797). When processing a request, QNetworkAccessManager + automatically replaces the "http" scheme with "https" and uses a secure transport + for HSTS hosts. If it's set explicitly, port 80 is replaced by port 443. When HSTS is enabled, for each HTTP response containing HSTS header and received over a secure transport, QNetworkAccessManager will update its HSTS cache, either remembering a host with a valid policy or removing a host with - expired/disabled HSTS policy. + an expired or disabled HSTS policy. - \sa disableStrictTransportSecurity(), strictTransportSecurityEnabled() + \sa isStrictTransportSecurityEnabled() */ -void QNetworkAccessManager::enableStrictTransportSecurity() +void QNetworkAccessManager::setStrictTransportSecurityEnabled(bool enabled) { Q_D(QNetworkAccessManager); - d->stsEnabled = true; -} - -/*! - \since 5.9 - - Disables HTTP Strict Transport Security (HSTS). HSTS headers in responses would - be ignored, no scheme/port mapping is done. - - \sa enableStrictTransportSecurity() -*/ -void QNetworkAccessManager::disableStrictTransportSecurity() -{ - Q_D(QNetworkAccessManager); - d->stsEnabled = false; + d->stsEnabled = enabled; } /*! @@ -735,9 +721,9 @@ void QNetworkAccessManager::disableStrictTransportSecurity() Returns true if HTTP Strict Transport Security (HSTS) was enabled. By default HSTS is disabled. - \sa enableStrictTransportSecurity + \sa setStrictTransportSecurityEnabled() */ -bool QNetworkAccessManager::strictTransportSecurityEnabled() const +bool QNetworkAccessManager::isStrictTransportSecurityEnabled() const { Q_D(const QNetworkAccessManager); return d->stsEnabled; @@ -761,7 +747,7 @@ bool QNetworkAccessManager::strictTransportSecurityEnabled() const \sa addStrictTransportSecurityHosts(), QHstsPolicy */ -void QNetworkAccessManager::addStrictTransportSecurityHosts(const QList &knownHosts) +void QNetworkAccessManager::addStrictTransportSecurityHosts(const QVector &knownHosts) { Q_D(QNetworkAccessManager); d->stsCache.updateFromPolicies(knownHosts); @@ -776,7 +762,7 @@ void QNetworkAccessManager::addStrictTransportSecurityHosts(const QList QNetworkAccessManager::strictTransportSecurityHosts() const +QVector QNetworkAccessManager::strictTransportSecurityHosts() const { Q_D(const QNetworkAccessManager); return d->stsCache.policies(); @@ -1390,7 +1376,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera #endif ) { #ifndef QT_NO_SSL - if (strictTransportSecurityEnabled() && d->stsCache.isKnownHost(request.url())) { + if (isStrictTransportSecurityEnabled() && d->stsCache.isKnownHost(request.url())) { QUrl stsUrl(request.url()); // RFC6797, 8.3: // The UA MUST replace the URI scheme with "https" [RFC2818], diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h index 52769627f3..7a03a29377 100644 --- a/src/network/access/qnetworkaccessmanager.h +++ b/src/network/access/qnetworkaccessmanager.h @@ -42,6 +42,7 @@ #include #include +#include #include #ifndef QT_NO_SSL #include @@ -121,11 +122,10 @@ public: QNetworkCookieJar *cookieJar() const; void setCookieJar(QNetworkCookieJar *cookieJar); - void enableStrictTransportSecurity(); - void disableStrictTransportSecurity(); - bool strictTransportSecurityEnabled() const; - void addStrictTransportSecurityHosts(const QList &knownHosts); - QList strictTransportSecurityHosts() const; + void setStrictTransportSecurityEnabled(bool enabled); + bool isStrictTransportSecurityEnabled() const; + void addStrictTransportSecurityHosts(const QVector &knownHosts); + QVector strictTransportSecurityHosts() const; QNetworkReply *head(const QNetworkRequest &request); QNetworkReply *get(const QNetworkRequest &request); diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index ca27e66791..79afd21a1a 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -736,7 +736,7 @@ void QNetworkReply::setSslConfiguration(const QSslConfiguration &config) this function has no effect. \sa sslConfiguration(), sslErrors(), QSslSocket::ignoreSslErrors(), - QNetworkAccessManager::enableStrictTransportSecurity() + QNetworkAccessManager::setStrictTransportSecurityEnabled() */ void QNetworkReply::ignoreSslErrors(const QList &errors) { -- cgit v1.2.3 From c0157a9f035a27a3ba20cab0ca3ca1c6e78f0b14 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 20 Feb 2017 16:25:51 +0100 Subject: QNativeSocketEngine - set query type in checkProxy The default query type for QNetworkProxyQuery is TcpSocket (that's what our QNetworkProxy::applicationProxy() requests). Unfortunately, this can result in http_proxy found and QTcpServer::listen() failing (probably, QUdpSocket is also affected). So now we extract applicationProxy's logic but modify it to provide the exact query type we need. Task-number: QTBUG-58706 Task-number: QTBUG-41053 Task-number: QTBUG-58374 Change-Id: I79ce0efb779bbaf08afd78c44cbe92d08730152b Reviewed-by: Thiago Macieira --- src/network/socket/qnativesocketengine.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'src/network') diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index b56d460b8c..cf3afe1845 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -358,17 +358,41 @@ bool QNativeSocketEnginePrivate::checkProxy(const QHostAddress &address) #if !defined(QT_NO_NETWORKPROXY) QObject *parent = q_func()->parent(); QNetworkProxy proxy; + QNetworkProxyQuery::QueryType queryType = QNetworkProxyQuery::TcpSocket; if (QAbstractSocket *socket = qobject_cast(parent)) { proxy = socket->proxy(); + switch (socket->socketType()) { + case QAbstractSocket::UdpSocket: + queryType = QNetworkProxyQuery::UdpSocket; + break; + case QAbstractSocket::SctpSocket: + queryType = QNetworkProxyQuery::SctpSocket; + break; + case QAbstractSocket::TcpSocket: + case QAbstractSocket::UnknownSocketType: + queryType = QNetworkProxyQuery::TcpSocket; + } } else if (QTcpServer *server = qobject_cast(parent)) { proxy = server->proxy(); + queryType = QNetworkProxyQuery::TcpServer; +#ifndef QT_NO_SCTP + if (qobject_cast(server)) + queryType = QNetworkProxyQuery::SctpServer; +#endif } else { // no parent -> no proxy return true; } - if (proxy.type() == QNetworkProxy::DefaultProxy) - proxy = QNetworkProxy::applicationProxy(); + if (proxy.type() == QNetworkProxy::DefaultProxy) { + // This is similar to what we have in QNetworkProxy::applicationProxy, + // the only difference is that we provide the correct query type instead of + // always using TcpSocket unconditionally (this is the default type for + // QNetworkProxyQuery). + QNetworkProxyQuery query; + query.setQueryType(queryType); + proxy = QNetworkProxyFactory::systemProxyForQuery(query).constFirst(); + } if (proxy.type() != QNetworkProxy::DefaultProxy && proxy.type() != QNetworkProxy::NoProxy) { -- cgit v1.2.3 From 09ca03e1aab7de1dbfcc61b3f95bbf2ede56f89e Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Thu, 23 Feb 2017 10:18:43 +0100 Subject: QNAM - rename Redirect*s*Nnn to RedirectNnn As discussed in API code-review. Change-Id: Ib54cfd43d5bef8c7d99a7fb3b09a9d16dc1dc1dc Reviewed-by: Edward Welbourne --- src/network/access/qhttpnetworkconnection.cpp | 8 ++--- src/network/access/qhttpnetworkrequest.cpp | 16 ++++----- src/network/access/qhttpnetworkrequest_p.h | 6 ++-- src/network/access/qnetworkaccessmanager.cpp | 22 ++++++------ src/network/access/qnetworkaccessmanager.h | 4 +-- src/network/access/qnetworkaccessmanager_p.h | 4 +-- src/network/access/qnetworkreplyhttpimpl.cpp | 14 ++++---- src/network/access/qnetworkrequest.cpp | 48 +++++++++++++-------------- src/network/access/qnetworkrequest.h | 14 ++++---- 9 files changed, 68 insertions(+), 68 deletions(-) (limited to 'src/network') diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index fd3cbbe36e..c2458152a3 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -550,15 +550,15 @@ QUrl QHttpNetworkConnectionPrivate::parseRedirectResponse(QAbstractSocket *socke // Check redirect url protocol const QUrl priorUrl(reply->request().url()); if (redirectUrl.scheme() == QLatin1String("http") || redirectUrl.scheme() == QLatin1String("https")) { - switch (reply->request().redirectsPolicy()) { - case QNetworkRequest::NoLessSafeRedirectsPolicy: + switch (reply->request().redirectPolicy()) { + case QNetworkRequest::NoLessSafeRedirectPolicy: // Here we could handle https->http redirects as InsecureProtocolError. // However, if HSTS is enabled and redirectUrl.host() is a known STS // host, then we'll replace its scheme and this won't downgrade protocol, // after all. We cannot access QNAM's STS cache from here, so delegate // this check to QNetworkReplyHttpImpl. break; - case QNetworkRequest::SameOriginRedirectsPolicy: + case QNetworkRequest::SameOriginRedirectPolicy: if (priorUrl.host() != redirectUrl.host() || priorUrl.scheme() != redirectUrl.scheme() || priorUrl.port() != redirectUrl.port()) { @@ -566,7 +566,7 @@ QUrl QHttpNetworkConnectionPrivate::parseRedirectResponse(QAbstractSocket *socke return QUrl(); } break; - case QNetworkRequest::UserVerifiedRedirectsPolicy: + case QNetworkRequest::UserVerifiedRedirectPolicy: break; default: Q_ASSERT(!"Unexpected redirect policy"); diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp index 7862d464e1..60b566299f 100644 --- a/src/network/access/qhttpnetworkrequest.cpp +++ b/src/network/access/qhttpnetworkrequest.cpp @@ -49,7 +49,7 @@ QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(QHttpNetworkRequest::Oper : QHttpNetworkHeaderPrivate(newUrl), operation(op), priority(pri), uploadByteDevice(0), autoDecompress(false), pipeliningAllowed(false), spdyAllowed(false), http2Allowed(false), withCredentials(true), preConnect(false), redirectCount(0), - redirectsPolicy(QNetworkRequest::ManualRedirectsPolicy) + redirectPolicy(QNetworkRequest::ManualRedirectPolicy) { } @@ -67,7 +67,7 @@ QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(const QHttpNetworkRequest ssl(other.ssl), preConnect(other.preConnect), redirectCount(other.redirectCount), - redirectsPolicy(other.redirectsPolicy) + redirectPolicy(other.redirectPolicy) { } @@ -90,7 +90,7 @@ bool QHttpNetworkRequestPrivate::operator==(const QHttpNetworkRequestPrivate &ot && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect) - && (redirectsPolicy == other.redirectsPolicy); + && (redirectPolicy == other.redirectPolicy); } QByteArray QHttpNetworkRequest::methodName() const @@ -231,17 +231,17 @@ void QHttpNetworkRequest::setPreConnect(bool preConnect) bool QHttpNetworkRequest::isFollowRedirects() const { - return d->redirectsPolicy != QNetworkRequest::ManualRedirectsPolicy; + return d->redirectPolicy != QNetworkRequest::ManualRedirectPolicy; } -void QHttpNetworkRequest::setRedirectsPolicy(QNetworkRequest::RedirectsPolicy policy) +void QHttpNetworkRequest::setRedirectPolicy(QNetworkRequest::RedirectPolicy policy) { - d->redirectsPolicy = policy; + d->redirectPolicy = policy; } -QNetworkRequest::RedirectsPolicy QHttpNetworkRequest::redirectsPolicy() const +QNetworkRequest::RedirectPolicy QHttpNetworkRequest::redirectPolicy() const { - return d->redirectsPolicy; + return d->redirectPolicy; } int QHttpNetworkRequest::redirectCount() const diff --git a/src/network/access/qhttpnetworkrequest_p.h b/src/network/access/qhttpnetworkrequest_p.h index 3900e9080e..ecf8856ded 100644 --- a/src/network/access/qhttpnetworkrequest_p.h +++ b/src/network/access/qhttpnetworkrequest_p.h @@ -131,8 +131,8 @@ public: void setPreConnect(bool preConnect); bool isFollowRedirects() const; - void setRedirectsPolicy(QNetworkRequest::RedirectsPolicy policy); - QNetworkRequest::RedirectsPolicy redirectsPolicy() const; + void setRedirectPolicy(QNetworkRequest::RedirectPolicy policy); + QNetworkRequest::RedirectPolicy redirectPolicy() const; int redirectCount() const; void setRedirectCount(int count); @@ -176,7 +176,7 @@ public: bool ssl; bool preConnect; int redirectCount; - QNetworkRequest::RedirectsPolicy redirectsPolicy; + QNetworkRequest::RedirectPolicy redirectPolicy; }; diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 0b03865df8..0a6270d417 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -1157,7 +1157,7 @@ void QNetworkAccessManager::connectToHost(const QString &hostName, quint16 port) /*! \since 5.9 - Sets the manager's redirects policy to be the \a policy specified. This policy + Sets the manager's redirect policy to be the \a policy specified. This policy will affect all subsequent requests created by the manager. Use this function to enable or disable HTTP redirects on the manager's level. @@ -1166,18 +1166,18 @@ void QNetworkAccessManager::connectToHost(const QString &hostName, quint16 port) the highest priority, next by priority is QNetworkRequest::FollowRedirectsAttribute. Finally, the manager's policy has the lowest priority. - For backwards compatibility the default value is QNetworkRequest::ManualRedirectsPolicy. + For backwards compatibility the default value is QNetworkRequest::ManualRedirectPolicy. This may change in the future and some type of auto-redirect policy will become the default; clients relying on manual redirect handling are encouraged to set this policy explicitly in their code. - \sa redirectsPolicy(), QNetworkRequest::RedirectsPolicy, + \sa redirectPolicy(), QNetworkRequest::RedirectPolicy, QNetworkRequest::FollowRedirectsAttribute */ -void QNetworkAccessManager::setRedirectsPolicy(QNetworkRequest::RedirectsPolicy policy) +void QNetworkAccessManager::setRedirectPolicy(QNetworkRequest::RedirectPolicy policy) { Q_D(QNetworkAccessManager); - d->redirectsPolicy = policy; + d->redirectPolicy = policy; } /*! @@ -1185,12 +1185,12 @@ void QNetworkAccessManager::setRedirectsPolicy(QNetworkRequest::RedirectsPolicy Returns the redirect policy that is used when creating new requests. - \sa setRedirectsPolicy(), QNetworkRequest::RedirectsPolicy + \sa setRedirectPolicy(), QNetworkRequest::RedirectPolicy */ -QNetworkRequest::RedirectsPolicy QNetworkAccessManager::redirectsPolicy() const +QNetworkRequest::RedirectPolicy QNetworkAccessManager::redirectPolicy() const { Q_D(const QNetworkAccessManager); - return d->redirectsPolicy; + return d->redirectPolicy; } /*! @@ -1280,12 +1280,12 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera Q_D(QNetworkAccessManager); QNetworkRequest req(originalReq); - if (req.attribute(QNetworkRequest::RedirectsPolicyAttribute).isNull() + if (req.attribute(QNetworkRequest::RedirectPolicyAttribute).isNull() && req.attribute(QNetworkRequest::FollowRedirectsAttribute).isNull()) { // We only apply the general manager's policy if: - // - RedirectsPolicyAttribute is not set already on request and + // - RedirectPolicyAttribute is not set already on request and // - no FollowRedirectsAttribute is set. - req.setAttribute(QNetworkRequest::RedirectsPolicyAttribute, redirectsPolicy()); + req.setAttribute(QNetworkRequest::RedirectPolicyAttribute, redirectPolicy()); } bool isLocalFile = req.url().isLocalFile(); diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h index 7a03a29377..f035ac5b00 100644 --- a/src/network/access/qnetworkaccessmanager.h +++ b/src/network/access/qnetworkaccessmanager.h @@ -155,8 +155,8 @@ public: #endif void connectToHost(const QString &hostName, quint16 port = 80); - void setRedirectsPolicy(QNetworkRequest::RedirectsPolicy policy); - QNetworkRequest::RedirectsPolicy redirectsPolicy() const; + void setRedirectPolicy(QNetworkRequest::RedirectPolicy policy); + QNetworkRequest::RedirectPolicy redirectPolicy() const; Q_SIGNALS: #ifndef QT_NO_NETWORKPROXY diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h index cafc93871a..13a26a54f1 100644 --- a/src/network/access/qnetworkaccessmanager_p.h +++ b/src/network/access/qnetworkaccessmanager_p.h @@ -93,7 +93,7 @@ public: #endif cookieJarCreated(false), defaultAccessControl(true), - redirectsPolicy(QNetworkRequest::ManualRedirectsPolicy), + redirectPolicy(QNetworkRequest::ManualRedirectPolicy), authenticationManager(QSharedPointer::create()) { #ifndef QT_NO_BEARERMANAGEMENT @@ -196,7 +196,7 @@ public: bool cookieJarCreated; bool defaultAccessControl; - QNetworkRequest::RedirectsPolicy redirectsPolicy; + QNetworkRequest::RedirectPolicy redirectPolicy; // The cache with authorization data: QSharedPointer authenticationManager; diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index ece08acc6b..5cd0747e34 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -668,14 +668,14 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq } #endif - auto redirectsPolicy = QNetworkRequest::ManualRedirectsPolicy; - const QVariant value = newHttpRequest.attribute(QNetworkRequest::RedirectsPolicyAttribute); + auto redirectPolicy = QNetworkRequest::ManualRedirectPolicy; + const QVariant value = newHttpRequest.attribute(QNetworkRequest::RedirectPolicyAttribute); if (value.isValid()) - redirectsPolicy = value.value(); + redirectPolicy = value.value(); else if (newHttpRequest.attribute(QNetworkRequest::FollowRedirectsAttribute).toBool()) - redirectsPolicy = QNetworkRequest::NoLessSafeRedirectsPolicy; + redirectPolicy = QNetworkRequest::NoLessSafeRedirectPolicy; - httpRequest.setRedirectsPolicy(redirectsPolicy); + httpRequest.setRedirectPolicy(redirectPolicy); httpRequest.setPriority(convert(newHttpRequest.priority())); @@ -1155,7 +1155,7 @@ void QNetworkReplyHttpImplPrivate::onRedirected(const QUrl &redirectUrl, int htt const bool isLessSafe = schemeBefore == QLatin1String("https") && url.scheme() == QLatin1String("http"); - if (httpRequest.redirectsPolicy() == QNetworkRequest::NoLessSafeRedirectsPolicy + if (httpRequest.redirectPolicy() == QNetworkRequest::NoLessSafeRedirectPolicy && isLessSafe) { error(QNetworkReply::InsecureRedirectError, QCoreApplication::translate("QHttp", "Insecure redirect")); @@ -1165,7 +1165,7 @@ void QNetworkReplyHttpImplPrivate::onRedirected(const QUrl &redirectUrl, int htt redirectRequest = createRedirectRequest(originalRequest, url, maxRedirectsRemaining); operation = getRedirectOperation(operation, httpStatus); - if (httpRequest.redirectsPolicy() != QNetworkRequest::UserVerifiedRedirectsPolicy) + if (httpRequest.redirectPolicy() != QNetworkRequest::UserVerifiedRedirectPolicy) followRedirect(); emit q->redirected(url); diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 169695fa27..e95187de30 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -289,9 +289,9 @@ QT_BEGIN_NAMESPACE marked to be decompressed automatically. (This value was introduced in 5.9.) - \value RedirectsPolicyAttribute + \value RedirectPolicyAttribute Requests only, type: QMetaType::Int, should be one of the - QNetworkRequest::RedirectsPolicy values (default: ManualRedirectsPolicy). + QNetworkRequest::RedirectPolicy values (default: ManualRedirectPolicy). This attribute obsoletes FollowRedirectsAttribute. (This value was introduced in 5.9.) @@ -343,33 +343,33 @@ QT_BEGIN_NAMESPACE */ /*! - \enum QNetworkRequest::RedirectsPolicy + \enum QNetworkRequest::RedirectPolicy \since 5.9 Indicates whether the Network Access API should automatically follow a HTTP redirect response or not. - \value ManualRedirectsPolicy Default value: not following any redirects. - - \value NoLessSafeRedirectsPolicy Only "http"->"http", "http" -> "https" - or "https" -> "https" redirects are allowed. - Equivalent to setting the old FollowRedirectsAttribute - to true - - \value SameOriginRedirectsPolicy Require the same protocol, host and port. - Note, http://example.com and http://example.com:80 - will fail with this policy (implicit/explicit ports - are considered to be a mismatch). - - \value UserVerifiedRedirectsPolicy Client decides whether to follow each - redirect by handling the redirected() - signal, emitting redirectAllowed() on - the QNetworkReply object to allow - the redirect or aborting/finishing it to - reject the redirect. This can be used, - for example, to ask the user whether to - accept the redirect, or to decide - based on some app-specific configuration. + \value ManualRedirectPolicy Default value: not following any redirects. + + \value NoLessSafeRedirectPolicy Only "http"->"http", "http" -> "https" + or "https" -> "https" redirects are allowed. + Equivalent to setting the old FollowRedirectsAttribute + to true + + \value SameOriginRedirectPolicy Require the same protocol, host and port. + Note, http://example.com and http://example.com:80 + will fail with this policy (implicit/explicit ports + are considered to be a mismatch). + + \value UserVerifiedRedirectPolicy Client decides whether to follow each + redirect by handling the redirected() + signal, emitting redirectAllowed() on + the QNetworkReply object to allow + the redirect or aborting/finishing it to + reject the redirect. This can be used, + for example, to ask the user whether to + accept the redirect, or to decide + based on some app-specific configuration. */ class QNetworkRequestPrivate: public QSharedData, public QNetworkHeadersPrivate diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h index 06c895af5f..68d4ae6d6b 100644 --- a/src/network/access/qnetworkrequest.h +++ b/src/network/access/qnetworkrequest.h @@ -91,7 +91,7 @@ public: HTTP2AllowedAttribute, HTTP2WasUsedAttribute, OriginalContentLengthAttribute, - RedirectsPolicyAttribute, + RedirectPolicyAttribute, User = 1000, UserMax = 32767 @@ -113,11 +113,11 @@ public: LowPriority = 5 }; - enum RedirectsPolicy { - ManualRedirectsPolicy, - NoLessSafeRedirectsPolicy, - SameOriginRedirectsPolicy, - UserVerifiedRedirectsPolicy + enum RedirectPolicy { + ManualRedirectPolicy, + NoLessSafeRedirectPolicy, + SameOriginRedirectPolicy, + UserVerifiedRedirectPolicy }; @@ -177,6 +177,6 @@ Q_DECLARE_SHARED(QNetworkRequest) QT_END_NAMESPACE Q_DECLARE_METATYPE(QNetworkRequest) -Q_DECLARE_METATYPE(QNetworkRequest::RedirectsPolicy) +Q_DECLARE_METATYPE(QNetworkRequest::RedirectPolicy) #endif -- cgit v1.2.3 From 14db1d5560254766746446069b6f2456e4444602 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Thu, 23 Feb 2017 13:40:30 +0100 Subject: HSTS policy - fix API API-review follow-up: 1. make a ctor explicit 2. add swap member-function 3. make move-assignment inlined 4. make comparison operators non-members 5. make d_ptr QSharedDataPointer (and private implementation - QSharedData). Change-Id: I3257ca03cccd0f1254c9b95461752911359352a5 Reviewed-by: Edward Welbourne Reviewed-by: Timur Pocheptsov --- src/network/access/qhstspolicy.cpp | 32 +++++++++++--------------------- src/network/access/qhstspolicy.h | 25 +++++++++++++++++++------ 2 files changed, 30 insertions(+), 27 deletions(-) (limited to 'src/network') diff --git a/src/network/access/qhstspolicy.cpp b/src/network/access/qhstspolicy.cpp index e8b4e0aeff..634bf4784b 100644 --- a/src/network/access/qhstspolicy.cpp +++ b/src/network/access/qhstspolicy.cpp @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE \sa QNetworkAccessManager::setStrictTransportSecurityEnabled() */ -class QHstsPolicyPrivate +class QHstsPolicyPrivate : public QSharedData { public: QUrl url; @@ -77,6 +77,15 @@ public: } }; +/*! + Returns \c true if the two policies have the same host and expiration date + while agreeing on whether to include or exclude subdomains. +*/ +bool operator==(const QHstsPolicy &lhs, const QHstsPolicy &rhs) +{ + return *lhs.d == *rhs.d; +} + /*! Constructs an invalid (expired) policy with empty host name and subdomains not included. @@ -121,17 +130,7 @@ QHstsPolicy::~QHstsPolicy() */ QHstsPolicy &QHstsPolicy::operator=(const QHstsPolicy &other) { - *d = *other.d; - return *this; -} - - -/*! - Move-assignment operator. -*/ -QHstsPolicy &QHstsPolicy::operator=(QHstsPolicy &&other) Q_DECL_NOTHROW -{ - qSwap(d, other.d); + d = other.d; return *this; } @@ -195,15 +194,6 @@ bool QHstsPolicy::includesSubDomains() const return d->includeSubDomains; } -/*! - Returns \c true if the two policies have the same host and expiration date - while agreeing on whether to include or exclude subdomains. -*/ -bool QHstsPolicy::operator==(const QHstsPolicy &other) const -{ - return *d == *other.d; -} - /*! Return \c true if this policy has a valid expiration date and this date is greater than QDateTime::currentGetDateTimeUtc(). diff --git a/src/network/access/qhstspolicy.h b/src/network/access/qhstspolicy.h index 4260ac278c..45fa40dfe8 100644 --- a/src/network/access/qhstspolicy.h +++ b/src/network/access/qhstspolicy.h @@ -42,7 +42,7 @@ #include -#include +#include #include QT_BEGIN_NAMESPACE @@ -55,13 +55,15 @@ class Q_NETWORK_EXPORT QHstsPolicy public: QHstsPolicy(); - QHstsPolicy(const QDateTime &expiry, bool includeSubDomains, const QString &host, - QUrl::ParsingMode mode = QUrl::DecodedMode); + explicit QHstsPolicy(const QDateTime &expiry, bool includeSubDomains, const QString &host, + QUrl::ParsingMode mode = QUrl::DecodedMode); QHstsPolicy(const QHstsPolicy &rhs); QHstsPolicy &operator=(const QHstsPolicy &rhs); - QHstsPolicy &operator=(QHstsPolicy &&rhs) Q_DECL_NOTHROW; + QHstsPolicy &operator=(QHstsPolicy &&other) Q_DECL_NOTHROW { swap(other); return *this; } ~QHstsPolicy(); + void swap(QHstsPolicy &other) Q_DECL_NOTHROW { qSwap(d, other.d); } + void setHost(const QString &host, QUrl::ParsingMode mode = QUrl::DecodedMode); QString host(QUrl::ComponentFormattingOptions options = QUrl::FullyDecoded) const; void setExpiry(const QDateTime &expiry); @@ -69,14 +71,25 @@ public: void setIncludesSubDomains(bool include); bool includesSubDomains() const; - bool operator==(const QHstsPolicy &rhs) const; bool isExpired() const; private: - QScopedPointer d; + QSharedDataPointer d; + + friend Q_NETWORK_EXPORT bool operator==(const QHstsPolicy &lhs, const QHstsPolicy &rhs); }; +Q_DECLARE_SHARED(QHstsPolicy) + +Q_NETWORK_EXPORT bool operator==(const QHstsPolicy &lhs, const QHstsPolicy &rhs); + +inline bool operator!=(const QHstsPolicy &lhs, const QHstsPolicy &rhs) +{ + return !(lhs == rhs); +} + + QT_END_NAMESPACE #endif // QHSTSPOLICY_H -- cgit v1.2.3 From a62d8ab9936dae70e76cdb27f9dd9ea03b2f8fe1 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 21 Feb 2017 10:16:19 +0100 Subject: Doc: Use canonical contact URL in license header Change-Id: I34821150f66255df30d12572b27779e0e729ebc8 Reviewed-by: Samuel Gaist Reviewed-by: Alex Trotsenko Reviewed-by: Jani Heikkinen Reviewed-by: Lars Knoll --- src/network/doc/snippets/code/src_network_socket_qsctpsocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/network') diff --git a/src/network/doc/snippets/code/src_network_socket_qsctpsocket.cpp b/src/network/doc/snippets/code/src_network_socket_qsctpsocket.cpp index 3783a6f939..378022d655 100644 --- a/src/network/doc/snippets/code/src_network_socket_qsctpsocket.cpp +++ b/src/network/doc/snippets/code/src_network_socket_qsctpsocket.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2016 Alex Trotsenko -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** -- cgit v1.2.3 From a64c766a3dc8be44183ee54653c8d8d2a9737068 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 21 Feb 2017 10:22:01 +0100 Subject: Network: Use canonical license headers Replace outdated LGPL21 with LGPL license header. Use GPL-EXCEPT for all autotests. Also use canonical contact url. Change-Id: I6e5cc8a4285569c4f862730a980f492b8a933a72 Reviewed-by: Jani Heikkinen --- src/network/kernel/qnetworkdatagram.cpp | 2 +- src/network/kernel/qnetworkdatagram.h | 2 +- src/network/kernel/qnetworkdatagram_p.h | 32 +++++++++++++--------- src/network/ssl/qssldiffiehellmanparameters.cpp | 2 +- src/network/ssl/qssldiffiehellmanparameters.h | 2 +- .../ssl/qssldiffiehellmanparameters_dummy.cpp | 2 +- .../ssl/qssldiffiehellmanparameters_openssl.cpp | 2 +- src/network/ssl/qssldiffiehellmanparameters_p.h | 2 +- 8 files changed, 26 insertions(+), 20 deletions(-) (limited to 'src/network') diff --git a/src/network/kernel/qnetworkdatagram.cpp b/src/network/kernel/qnetworkdatagram.cpp index 88ca763187..dd412b69d1 100644 --- a/src/network/kernel/qnetworkdatagram.cpp +++ b/src/network/kernel/qnetworkdatagram.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2016 Intel Corporation. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** diff --git a/src/network/kernel/qnetworkdatagram.h b/src/network/kernel/qnetworkdatagram.h index a20d69185a..fa994d6170 100644 --- a/src/network/kernel/qnetworkdatagram.h +++ b/src/network/kernel/qnetworkdatagram.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2016 Intel Corporation. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** diff --git a/src/network/kernel/qnetworkdatagram_p.h b/src/network/kernel/qnetworkdatagram_p.h index e55651a78b..5b5c037488 100644 --- a/src/network/kernel/qnetworkdatagram_p.h +++ b/src/network/kernel/qnetworkdatagram_p.h @@ -1,31 +1,37 @@ /**************************************************************************** ** ** Copyright (C) 2015 Intel Corporation. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/network/ssl/qssldiffiehellmanparameters.cpp b/src/network/ssl/qssldiffiehellmanparameters.cpp index de7eab9a9e..cb6c474861 100644 --- a/src/network/ssl/qssldiffiehellmanparameters.cpp +++ b/src/network/ssl/qssldiffiehellmanparameters.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2015 Mikkel Krautz -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** diff --git a/src/network/ssl/qssldiffiehellmanparameters.h b/src/network/ssl/qssldiffiehellmanparameters.h index 4533ea4ed2..497d2bebfb 100644 --- a/src/network/ssl/qssldiffiehellmanparameters.h +++ b/src/network/ssl/qssldiffiehellmanparameters.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2015 Mikkel Krautz -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** diff --git a/src/network/ssl/qssldiffiehellmanparameters_dummy.cpp b/src/network/ssl/qssldiffiehellmanparameters_dummy.cpp index 220c017f4c..8fcf141f73 100644 --- a/src/network/ssl/qssldiffiehellmanparameters_dummy.cpp +++ b/src/network/ssl/qssldiffiehellmanparameters_dummy.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2015 Mikkel Krautz -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** diff --git a/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp b/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp index 949da1b7df..90687b05c5 100644 --- a/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp +++ b/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2015 Mikkel Krautz -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** diff --git a/src/network/ssl/qssldiffiehellmanparameters_p.h b/src/network/ssl/qssldiffiehellmanparameters_p.h index 06ecf292ff..dd69895dae 100644 --- a/src/network/ssl/qssldiffiehellmanparameters_p.h +++ b/src/network/ssl/qssldiffiehellmanparameters_p.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2015 Mikkel Krautz -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** -- cgit v1.2.3