summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Make networkAccessibility() return the actual state of the networkAndy Shaw2017-04-111-2/+2
| | | | | | | | | | If networkAccessibility() was queried when the networkAccessibleChanged signal was emitted then it would report the wrong state and in some instances it would incorrectly report NotAccessible. This ensures that it is reflecting what the signal would have been emitted with. Change-Id: Ib0a7ef9e9ec42c9007340020fd535c8ad36caa49 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix GCC warning about dereferencing type-punned pointersThiago Macieira2017-04-061-1/+2
| | | | | | | | | | | | | | GCC is wrong. Type-punning is when you read something of a given type as something else. We're not doing that, as it's only read as integer. qnativesocketengine_unix.cpp:1011:79: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] Too bad my plan for a good C++ solution was foiled by glibc developers. Change-Id: I27b55fdf514247549455fffd14b1a27667745e94 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix build when SCTP is enabledThiago Macieira2017-04-061-0/+4
| | | | | | | | c0157a9f035a27a3ba20cab0ca3ca1c6e78f0b14 was incomplete. Change-Id: I27b55fdf514247549455fffd14b158f54403663d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkRequest - do not set ManualRedirectPolicyTimur Pocheptsov2017-04-041-4/+2
| | | | | | | | | | | If QNAM's general policy is 'Manual' and QNetworkRequest has neither policy set not FollowRedirectAttribute - do NOT set this 'Manual' policy - its implicitly implied. This fixes previously unnoticed auto test failure (was blacklisted) and also makes QNetworkRequest::operator == work correctly. Change-Id: If17c9af4baf8a470659f82d1a40488078ea8ede0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Allow Secure Transport backend to use a temporary keychainTimur Pocheptsov2017-04-042-6/+125
| | | | | | | | | | | | | | | | | | | | | | | | Cherry picked: this change was first merged into dev, but now we also need it in 5.9 to enable SSL socket tests on the new CI VMs (macOS 10.11, 10.12). As we do not merge dev->5.9, we need this cherry-pick. Since day one Secure Transport socket has two annoying problems on macOS: when we call SecPKCS12Import, we indeed import certs and keys into the default keychain and also (which is more serious) later a dialog can pop up, asking for permission to use a private key (this is especially annoying if you're running SSL autotests or have a server application). Apparently, it's possible to work around those problems if we create our own (temporary) keychain and pass it in the 'options' parameter to SecPKCS12Import. [ChangeLog][QtNetwork] Allow QSslSocket to use a temporary keychain on macOS. Task-number: QTBUG-56102 Change-Id: Ic3a56c905100dc80d907a25fe6ebfa232dcf5b9e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 17927392cf1cecb20cef7cb9cd77131391de087c) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix build without features.networkinterfaceTasuku Suzuki2017-04-042-0/+6
| | | | | Change-Id: I9fd2a7ec402a1d2d99e30f08554d86f18c6424ff Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Prefer rvalue versions of toLatin() and toUtf8()Anton Kudryavtsev2017-03-302-2/+2
| | | | | | | ... to re-use existing buffers. Change-Id: I7c42529b8cd4400520a59e658ab76f4f8e965cd4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use HTTP2WasUsedAttribute for HTTP2Timur Pocheptsov2017-03-293-2/+14
| | | | | | | | | | | Previously we were always setting SpdyWasUsedAttribute for SPDY/HTTP/2/HTTP/1.1 (true/false) which is confusing. Now if HTTP2AllowedAttribute was set to true on a request, we set HTTP2WasUsedAttribute. Otherwise, as we did before, we're setting SpdyWasUsedAttribute. Change-Id: I0c44cfb5469fef0c12719baa951197ee2accee4a Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use case-insensitive compare moreAnton Kudryavtsev2017-03-291-1/+1
| | | | | | | | ... to avoid allocations. Change-Id: I5993633d1509495ff6ce3a11274a53504aac7c5e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-272-7/+21
|\ | | | | | | Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
| * QSslSocket: fix connection to a international domain nameOlivier Goffart2017-03-232-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC6125 section 6.4.2 specify we need to convert the IDN to ascii before comparison. Note that we don't need to toLower anymore because toAce takes care of it. Section 7.2 recommands that we dod not attempt to check for wildcard character embedded within the A-labels or U-labels of an internationalized domain name. So we reject names that contiains a '*' but starts with 'xn--'. Change-Id: Ib0830520a1f82bbf9fd11818718277a479527ee3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-214-38/+71
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/eglfs-plugin.pro Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
| * Android: Bearer jar shouldn't be a dependency if disabledDaiwei Li2017-03-171-10/+12
| | | | | | | | | | | | Task-number: QTBUG-59264 Change-Id: I960d5bff902b06ca5dda447fd60002a756a11e51 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QHttpNetworkConnection: fall back gracefully to HTTP/1.1Timur Pocheptsov2017-03-083-28/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Both SPDY and HTTP/2 work with a single qhttpnetworkchannel (and this means one socket per qhttpnetworkconnection). Normally, HTTP/1.1 connection is using up to 6 channels/sockets though. At the moment a failure to negotiate SPDY/HTTP/2 leaves us with a downgraded HTTP/1.1 connection (with only one channel vs. default 6). Since we initialize channels (and establish connections) in a 'lazy' manner it's ok to pre-allocate all 6 channels and then either use 1 (if SPDY/HTTP/2 indeed was negotiated) or switch back to 6 in case of failure. Change-Id: Ia6c3061463c4d634aaed05ce0dde47bfb5e24dd8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Secure Transport - add a missing cipherTimur Pocheptsov2017-03-161-58/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Secure Transport supports more ciphers then we can convert into QSslCipher. This results in our tests failing, since after the successful SSL handshake sessionCipher is 'unknown'. This patch adds missing AES256-GCM-SHA384 and also, to make new cipher addition easier in future, sorts cipher suites as it's done in CipherSuite.h (ST framework's header) - grouped by RFC they were introduced in + sorted within their group. As a bonus (thanks to Eddy for spotting this problem) - some copy & paste (?) typos were fixed (mismatched names). Task-number: QTBUG-59480 Change-Id: I61e984da8b37f1c0787305a26fc289e2e7c2b4ad Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-135-14/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-064-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Remove the last remaining non-SSL use of QMutexPool in QtThiago Macieira2017-03-031-1/+2
| | | | | | | | | | | | Task-number: QTBUG-59164 Change-Id: Idd5ceba1eba34cb78c46fffd14a734735991f4fb Reviewed-by: David Faure <david.faure@kdab.com>
* | QHstsPolicy: Replace bool with QFlagsTimur Pocheptsov2017-03-083-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in the previous code-review: Replace a bool ctor parameter with QFlags<enum> to conform to Qt API Design Principles (Boolean Parameter Trap). Since the bool with its many unwanted implicit conversions is gone from the ctor parameter list now, drop the explicit keyword again. It was requested because of the boolean parameter in the first place. Change-Id: Ibaf287a6a3e38c22f033fd5d9e024c54f30a1fd4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Replace outdated BSD license textKai Koehne2017-03-031-1/+11
| | | | | | | | | | | | | | | | For examples and documentation, use new BSD license text that includes the commercial licenses. Change-Id: I1cd74bd8e9c8f2746d8702df00780ee100cbebac Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Network: Use canonical license headersKai Koehne2017-02-288-20/+26
| | | | | | | | | | | | | | | | | | 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 <jani.heikkinen@qt.io>
* | Doc: Use canonical contact URL in license headerKai Koehne2017-02-281-1/+1
| | | | | | | | | | | | | | | | Change-Id: I34821150f66255df30d12572b27779e0e729ebc8 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Simon Hausmann2017-02-244-37/+41
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-244-37/+41
| |\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/moc.prf Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
| | * Fix multicastMembershipHelper to not assume addresses are IPv4Edward Welbourne2017-02-222-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <marc.mutz@kdab.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * configure: generalize command line overrides of library parametersOswald Buddenhagen2017-02-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | the outdated ones remain for backwards compatibility; some remain unchanged. Task-number: QTBUG-30083 Change-Id: Ia596b854d26b00fcb4f48df0da7ad893650ac1c8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * use regular configure mechanism for openssl library referencesOswald Buddenhagen2017-02-222-26/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <lars.knoll@qt.io>
* | | HSTS policy - fix APITimur Pocheptsov2017-02-242-27/+30
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QNAM - rename Redirect*s*Nnn to RedirectNnnTimur Pocheptsov2017-02-239-68/+68
| | | | | | | | | | | | | | As discussed in API code-review. Change-Id: Ib54cfd43d5bef8c7d99a7fb3b09a9d16dc1dc1dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QNativeSocketEngine - set query type in checkProxyTimur Pocheptsov2017-02-231-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <thiago.macieira@intel.com>
* | HSTS - API/naming fixesTimur Pocheptsov2017-02-236-42/+34
| | | | | | | | | | | | | | | | | | | | 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 <marc.mutz@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-02-171-4/+4
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-161-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/plugin/qlibrary_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp Change-Id: I632c400d909f8c204f55743aadc7886af2f15dfb
| | * QNetworkSession - register types before connecting slotsTimur Pocheptsov2017-02-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QNetworkSession's ctor has a race condition: it 1) connects signals/slots and also 2) registers meta-types (but after these connects). Our users apparently have a lot of per-thread QNAMs in multiple threads (and implicitly many QNetworkSessions on different threads too). From error logs it appears that while one thread tries to connect signals/slots and evaluates the types of signal and slot arguments, another thread can register this type. If the first thread extracted signal argument types, then the second registered this type, we can end up in a 'type mismatch' error on the first thread with seemingly the same types in a debug message (something like "type mismatch A::Some <-> A::Some") - they have the same name, but one has type() == 0 and another - some non-zero type(). Now we call qRegisterMetaType before connect. Task-number: QTBUG-50901 Change-Id: Idbb9515573e174bbc5e5bf55dc3a7911a81646ea Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Use static initialization for QBasicAtomicsMarc Mutz2017-02-162-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed static QBasicAtomicInt at function scope will be dynamically initialized. It will still be zero-initialized, but at least GCC adds guard variables for such objects. When using aggregate initialization, the guard disappears. Amends 04d6495bf773a6bb0d4fa6980df22d3b81a605b0. Change-Id: Id9335cffdd43094cafb231fdde2523d013abe1d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make some atomic counters zero-basedMarc Mutz2017-02-153-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A variable of static storage duration that is not zero-initialized takes up space in the DATA segment of the executable. By making the counters start at zero and adding the initial value afterwards, we move them over to the BSS segment, which does not take up space in the executable. Wrap atomics used across function boundaries into small functions, to avoid code duplication and to increase readability. Change-Id: Ida6ed316ecb8fe20da62a9577161349e14de5aed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-083-16/+6
|\| | | | | | | | | | | | | | | Conflicts: configure.json mkspecs/win32-icc/qmake.conf Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
| * QSocks5SocketEngine: stop polling on UDPAlex Trotsenko2017-02-012-14/+0
| | | | | | | | | | | | | | | | | | | | | | There is no need in additional polling, because readyRead() signal of the inner socket is directly connected to the slot which extracts the datagrams. Moreover, calling _q_udpSocketReadNotification() from the engine code might cause the spurious notifications both in the outer and inner sockets. Change-Id: Ibe75f5990e27b7460d628fa4a1ca4e64657e302c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Doc: Normalize \since usageTopi Reinio2017-01-311-2/+6
| | | | | | | | | | | | | | | | | | | | | | Although it's permitted to specify the project name together with a version number for \since, it's unnecessary for Qt classes and functions. This change also normalizes the version formatting: '<major>.<minor>' Change-Id: Ie5a43662077d13c31e241bcde8a7a2849d27d330 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * qsslsocket_openssl_symbols.cpp: Fix signedness warning in DEFINEFUNC2Friedemann Kleint2017-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix warning: qsslsocket_openssl_symbols.cpp157:78:warning: implicit conversion changes signedness: 'int' to 'unsigned long' note: expanded from macro 'DEFINEFUNC2' Amends change 2cf63c71ebe139890526057dcc51b24ea6df6c30 Change-Id: I694c5199d272d05f0070288af2e00b6fce42fc91 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 38a446b69e95423d8d42d33b30b3154caa475e09)
* | Fix some qdoc warnings for 5.9Friedemann Kleint2017-02-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings: src/network/access/qhstspolicy.cpp:158: warning: Undocumented parameter 'expiry' in QHstsPolicy::setExpiry() src/network/access/qhstspolicy.cpp:178: warning: Undocumented parameter 'include' in QHstsPolicy::setIncludesSubDomains() src/network/access/qhstspolicy.cpp:178: warning: Can't link to 'includeSubdomains()' src/widgets/kernel/qsizepolicy.cpp:402: warning: Cannot find 'transposed(...)' in '\fn' QSizePolicy QSizePolicy::transposed() src/widgets/kernel/qsizepolicy.h:165: warning: No documentation for 'QSizePolicy::transposed()' src/widgets/util/qundostack.cpp:164: warning: Undocumented parameter 'obsolete' in QUndoCommand::setObsolete() Fix the signature of the QStaticByteArrayMatcher member functions. The warnings src/corelib/tools/qbytearraymatcher.cpp:372: warning: Cannot find 'indexIn(...)' in '\fn' QStaticByteArrayMatcher::indexIn(const char *haystack, int hlen, int from) src/corelib/tools/qbytearraymatcher.cpp:382: warning: Cannot find 'indexIn(...)' in '\fn' QStaticByteArrayMatcher::indexIn(const QByteArray &haystack, int from) remain, though since apparently qdoc is thrown off by the constructor. Change-Id: I157359a881ff3fbc80d2eeb52dd5c27249d009c4 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/devLiang Qi2017-01-301-4/+11
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-301-4/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network-chat/peermanager.cpp src/widgets/util/qsystemtrayicon.cpp src/widgets/util/qsystemtrayicon_qpa.cpp src/widgets/util/qsystemtrayicon_win.cpp src/widgets/util/qsystemtrayicon_x11.cpp Change-Id: I1c026df83818c0ccaf956980370e7522960627db
| | * qnetworkproxy_mac - fix proxyAutoConfigCallbackTimur Pocheptsov2017-01-261-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have an invalid pointer dereference in our callback. Apple's docs are quite ambiguous, whatever we receive in our callback's 'client' parameter is our PACInfo, not clientContext's address. That's what we pass to CFNetworkExecuteProxyAutoConfigurationURL: "clientContext - A stream context containing a client info object and optionally retain and release callbacks for that object." This 'client info' is our PACInfo struct with 2 pointers. Now in a callback, 'client': "The client reference originally passed in the clientContext parameter of the ..." So apparently we should read this as "client info originally passed in ...." Otherwise incorrect cast results in invalid pointer (apparently the value of retain/release/copy pointers we carefully set to 0) and a crash on dereference. Task-number: QTBUG-56747 Change-Id: I89378f1582679638cd29a36c563e506d8f5af518 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | SecureTransport - remove (now) redundant standalone functionTimur Pocheptsov2017-01-301-94/+82
|/ / | | | | | | | | | | | | | | | | | | | | | | | | It was first introduced when we had to work-around old macOS SDK (<= 10.7) with missing API; so we split the original code into two functions, one for iOS (any supported version) and macOS > 10.7, another function (with all ifdefs needed and old, deprecated API usage) for macOS <= 10.7. Now that support for those versions was dropped and the second function gone, having the remaining code in some external function looks illogical. It can be moved into the member-function back. Change-Id: Ib6355f225b5df3d92a70bd7679545cc89c450228 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Use std::enable_if instead of QEnableIfAlexander Volkov2017-01-271-2/+2
| | | | | | | | | | | | Change-Id: Ideca8283141484cb6da47c50333f5c96e416f082 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Revert "Network (HTTPS): prevent recursion among ->close() methods"Paolo Angelelli2017-01-261-23/+21
| | | | | | | | | | | | | | | | | | | | This reverts commit 556b2ee7737b1dfdbc5223e9a1230b5df6843a01. The reason for this is that this change appears to stop QtLocation from fetching tiles. Task-number: QTBUG-58303 Change-Id: I64cd3a17d24f10652bb68cee0267cc7ff1f9d479 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QHostAddress: add missing op!=(SpecialAddress, QHostAddress)Marc Mutz2017-01-262-0/+14
| | | | | | | | | | | | | | | | | | The equality operator was supplied, but this one was missing. [ChangeLog][QtNetwork][QHostAddress] Added op!=(SpecialAddress, QHostAddress). Change-Id: Iad9c55fa0ee7a8e97d5e4ea4be0605b8b74649d1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make our redirect policies STS-awareTimur Pocheptsov2017-01-262-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way we ensure NoLessSafeRedirectsPolicy and also the way we create actual redirect requests: https->http redirect is now reported as InsecureRedirectError (under NoLessSafeRedirectsPolicy) only if STS is disabled or we were redirected to a host whithout Strict Transport Security policy. Otherwise, we replace 'http' scheme with 'https' and explicitly set port 80 with port 443 as defined by HTTP Strict Transport Security policy. This scheme/port replacement will affect both NoLessSafeRedirectsPolicy and UserVerifiedRedirectsPolicy (SameOriginRedirectsPolicy does not allow any scheme change and we continue to report such redirects as InsecureRedirectError). Change-Id: Ib370b830e5fb6a0fec503d6fa3a0dec771c4b741 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/devLiang Qi2017-01-268-20/+40
|\ \