summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Use explicit linkage with target_link_librariesKai Koehne2020-11-301-1/+1
| | | | | | | | | | | | | | The Professional CMake book suggests always using explicit linkage with target_link_libraries, so let's use that. Whether to use PUBLIC or PRIVATE depends on the context. But let's be conservative and advise on using PRIVATE by default. Task-number: QTBUG-88935 Pick-to: 6.0 Change-Id: I12b80ee85be9f6916f1e4dea6b1c9cb29e03c20f Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Replace qt_make_unique with std::make_uniqueAllan Sandfeld Jensen2020-11-231-4/+3
| | | | | | | We can depend on C++14 now. Change-Id: Iee9796cd22dbfbb70d4bdb25f0eee1662a026d6d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QDtls - remove redundant RAII structTimur Pocheptsov2020-11-201-13/+1
| | | | | | | | | | | | As noted by LCOV, the part with q_BIO_free(bio) was never executed since we were taking the result from QScopedPointer before returning. While it's a what RAII idiom is for, there is quite a low probability that SSL_set_bio() one day will start throwing exceptions. Pick-to: 6.0 Pick-to: 5.15 Change-Id: Id24e480dac34166c627b71bb2972de558c644339 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Update docs about how to configure OpenSSLKai Koehne2020-11-191-7/+6
| | | | | Change-Id: Ifd243cd8d3ac3fd52af649fd4507cfd9788e98d3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QSocks5SocketEngine: Fix out-of-bounds access of QBAMårten Nordheim2020-11-191-3/+1
| | | | | | | | | This should've been caught a long time ago, but long story short: it wasn't. This has been deprecated since 5.14 and is now asserting. Pick-to: 5.15 Change-Id: Iddee22b1a68e5d1a03006831f795db8ec1c472be Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* HTTP2: fix crash from assertionMårten Nordheim2020-11-192-2/+7
| | | | | | | | | | | | | | | In general the protocolHandler isn't deleted unless the channel is being destructed. So instead of reset()ing the pointer we keep it around. Also update the http2protocolhandler to mimic the http1 handler a little closer: shutting down the channel in receiveReply if there's no reply/activeStreams, and not calling receiveReply at all if there's no activeStreams. Pick-to: 5.15 Change-Id: I702547f594deb6b0c1384068f7e93e560527e8e2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix schannel TLS 1.3 reneg delayMårten Nordheim2020-11-191-0/+2
| | | | | | | | | With TLS 1.3 the client goes through renegotiation when using Schannel. The status returned is OK and we can immediately continue, so do that. Change-Id: I831eaae318df9d94b5fb7672db7e407d94f9da56 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove obsolete warningsChristophe Giboudeaux2020-11-182-10/+0
| | | | | | | | The libproxy issue was fixed 4 years ago and the related Qt and libproxy bug reports were also closed long ago. Change-Id: I5af18f1eaaffb8d33556ab94ca1759959a2c272d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update landing pages and module pages in qtbaseJerome Pasion2020-11-171-8/+11
| | | | | | | | | | -Qt SQL, Qt D-BUS, Qt GUI, Qt OpenGL, Qt Widgets, Qt Test, Qt Concurrent, Qt XML, Qt Network, Qt Core -language edits for consistency, add links Task-number: QTBUG-87155 Change-Id: Ic61350c9fa15090c802a42d8e9116219591eba73 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-163-9/+9
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Fix reference of qt_attribution.json to license fileKai Koehne2020-11-161-0/+373
| | | | | | | | Amends 4f076db3d and 0ebda39e065 Change-Id: I307bb59acdfe00cf0ffe4f0f645152f2a8ba11a6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Add missing brief statements for \property documentationTopi Reinio2020-11-121-2/+3
| | | | | | | | ... where applicable. Fixes: QTBUG-88232 Change-Id: I835df434765caededd35d5114965b4a1663e7942 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QAsn1Element: Read value in blocks to avoid oom at wrong lengthRobert Loehning2020-11-091-5/+13
| | | | | | | | Fixes oss-fuzz issue 22272. Pick-to: 5.15 Change-Id: I8a49b9487f632469402c983e517e817e8e65bef7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-092-3/+3
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: Ib59de7976fae19e7b39962e80161df6628e4070b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update public suffix list header to latest versionEdward Welbourne2020-11-082-13994/+14327
| | | | | | | | | The former *.platform.sh entry has been replaced by more specific entries, replacing the wildcard with only selected second levels. Task-number: QTBUG-87925 Change-Id: Ie4ba7c66ba9aa40eafe23f02faa12f19d791cff2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename qurltlds-related files to match the header's moveEdward Welbourne2020-11-084-3/+32
| | | | | | | | | | | | | The header is now in src/network/kernel/ rather than src/corelib/io/, but the qt_attribution.json got left behind and the update program was still in a sub-dir of util/corelib/. Renamed the latter to util/publicSuffix/ (second-layer sub-directory was overkill, util/ isn't crowded and it was the only thing in util/corelib/; and there was no util/network/). This is a follow-up to commit 4f076db3d2e2e27cc56029fe878056ee79def56f Change-Id: I51c2c7892752ddc47390966044eb5650dfdfa9c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake Build: Fix CMake configure with -DFEATURE_schannel=ONCristian Adam2020-11-072-6/+8
| | | | | | | | | | When -DFEATURE_schannel=ON, -DFEATURE_ssl=ON, and -DFEATURE_openssl=OFF cmake configuration would fail. Fixes: QTBUG-88126 Change-Id: I7325a6c6bc4b9ff448893c7f05b7f46c34eefc1e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QNAM: Work around QObject finicky orphan cleanup detailsMårten Nordheim2020-11-061-1/+11
| | | | | | | | | Details described in a comment. Task-number: QTBUG-88063 Pick-to: 5.15 Change-Id: I763ecfedf518de97615e04a8eaae0fe1fd784f52 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QDecompressHelper: use the new readPointer function in QByteDataBufferMårten Nordheim2020-11-061-43/+29
| | | | | | | | | | Gets rid of moving strings back and forth, which was extra expensive without QList's prepend optimization (which is returning, but getting rid of the moves is even better). Change-Id: I520fc140310a0e1f096dda97f2e999d0e7993e77 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtNetwork: highlight DTLS client and server exampleMårten Nordheim2020-11-041-1/+3
| | | | | | | Change-Id: Ie6aaf0c15daaf63f9c7dd172c7a775d4076e4b16 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix link error when comparing QSslPreSharedKeyAuthenticatorFriedemann Kleint2020-11-041-1/+1
| | | | | | | | | | QSslPreSharedKeyAuthenticator::isEqual() as accessed by inline operators is not exported. Amends 57e57d9bcda868abcfb552e1247b391162c0dff9. Change-Id: Ia0f0de81a371a31422d07af5b11f0db03265504e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Prefer versioned CMake library targetsv6.0.0-beta3Kai Koehne2020-11-011-1/+1
| | | | | | | | The non-versioned one's do miss some properties. It's therefore best to not advocate using them. Change-Id: I53645e65ed4de4e0100e59905c024cdfe40be0c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Regenerate qtbase projectsAlexandru Croitor2020-10-301-0/+17
| | | | | | | | | | In preparation for some further regeneration. Also modify pro2cmake to add forgotten mapping for the Qt::EglFsKmsGbmSupportPrivate module. Change-Id: I92425c566c2b275b40eec8c652496290754ac385 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Hide comparison operators for QtNetwork value types from non-ADLVolker Hilsheimer2020-10-3012-98/+130
| | | | | | | | | Make them hidden friends, add a private isEqual helper where needed. Adjust and add documentation. Fixes: QTBUG-87976 Change-Id: If7c19eeab5be7452364eb76193981100f5516d6b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Hide comparison of QHostAddress with SpecialAddress from ADLVolker Hilsheimer2020-10-302-9/+8
| | | | | | | | | Make global operators hidden friends. No change to the member-operators. Task-number: QTBUG-87976 Change-Id: If7b08a30700d4e2f1a304d4b6cc4b5d02ee5e251 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Fix documentation warnings for Qt NetworkTopi Reinio2020-10-303-6/+10
| | | | | | Task-number: QTBUG-86295 Change-Id: Ib8bcf0a6e2af8a589b44e56b19641f4d2fe6f800 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Pass SameSite through QNetworkCookieAllan Sandfeld Jensen2020-10-282-1/+9
| | | | | | | | | It is an important new details in cookies, as a minimum pass it through, before we add API for it. Pick-to: 5.15 Change-Id: I5222a24e0f50f3822a94cce126b5055fed1a8008 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* qsslsocket_schannel: update QMutexLocker usageMårten Nordheim2020-10-281-1/+1
| | | | | | | | | Following 77d812683f0ad595606f9833613dd49bb2fda26d QMutexLocker is now a templated class which should in most cases be deduced automatically. Doesn't work here because of the global static wrapper. Change-Id: I62fda0651eac12f3234396cb7e41a26df8cc8b46 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Refactor QMutexLocker to be able to handle recursive mutexesLars Knoll2020-10-172-3/+3
| | | | | | | | Since we're going to split QMutex and QRecursiveMutex into separate classes, make sure QMutexLocker is prepared for that. Change-Id: Id5e9a955d1db7c8ee663dd3811ad6448dad0aeae Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix some bad uses of QSharedPointerData::operator T*Allan Sandfeld Jensen2020-10-163-12/+15
| | | | | | | | Avoid detaching where possible Change-Id: I438d3e66689aeef05951af86a48af2a6910da7c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSslCertificate (generic) fill the extension's variant mapTimur Pocheptsov2020-10-161-2/+18
| | | | | | | | | When parsing subjectAltName extension to make it more like OpenSSL counterpart. Fixes: QTBUG-86830 Change-Id: If1a4e72ee0b19f2cf40aa53632f9ec1468178c3b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QLocalSocket/Win: prevent writing to broken pipeAlex Trotsenko2020-10-151-0/+6
| | | | | | | | | | | | When a peer closes the connection, the device remains opened for reading purposes. However, we should disable writing on disconnected socket. Otherwise, if the user issues a write() call, a new pipe writer object will be created and the write call occurs with invalid handle value. Pick-to: 5.15 Change-Id: Id136798c7663df1fce7ed0aa4e3c6f5c65218a11 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Schannel: TLS1.3 supportMårten Nordheim2020-10-142-24/+105
| | | | | | | | | | | | | | | | | | | | | | It's not possible to connect to microsoft.com with Schannel TLS 1.3 for some reason (also tested with Internet Explorer), but other sites work fine. Must be something they have to iron out for later. In my experience this needs a preview release of Windows. One of my machines is opted into the dev channel of Windows where they enabled TLS 1.3 by default, and it works well in my tests except for the part above. On my other machine, after enabling TLS 1.3 through the registry, I fail to complete the handshake with any site. So around March/April next year is when this code would activate for most people. MinGW apparently defines NTDDI_VERSION as the one for Windows Server 2003, so it currently doesn't build the new TLS 1.3 code. In Qt (as a project) we could consider setting this higher, but that's out of scope for this patch! Fixes: QTBUG-81294 Change-Id: If329959c3a30ecbfbb8c0d335cc39ccb6d012890 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QSslSocket - replace NULL with nullptrTimur Pocheptsov2020-10-131-1/+1
| | | | | | Change-Id: I3af7747f424ef7837c9c3d4af3e5cbd14922aeb6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove dead codeLars Knoll2020-10-123-30/+0
| | | | | | | This code has been deprecated in Qt 5. Change-Id: Ia8e0bc791ac1f43df7124b4f30db3d0bb9966015 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtNetwork: add documentation about porting from Qt 5 to Qt 6Timur Pocheptsov2020-10-121-1/+142
| | | | | | | Fixes: QTBUG-87098 Change-Id: I91e9d644c6491abaa3bdfe2735aff4a43b545da5 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkRequest: Close gap in enumMårten Nordheim2020-10-081-1/+1
| | | | | | | It was there for binary compatibility reasons, but it's not needed anymore Change-Id: I659dadc710a5bcdbcba74f13fd4db6044a497cd2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-071-2/+2
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android: rename Android's package name for Qt 6Assam Boudjelthia2020-10-037-10/+10
| | | | | | | | | | Rename Android package name org.qtproject.qt5.android to org.qtproject.qt.android to avoid inconsistency with Qt 6 name. Also, we include the major version number in the jar target. Task-number: QTBUG-86969 Change-Id: Ibb68947289be1079911b34ea157bf089cc52c47f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QSsl: Remove enum value gapsMårten Nordheim2020-09-291-2/+2
| | | | | | | | These value gaps were there for binary compatibility, but we don't need those in Qt 6. Change-Id: I72a40d601b61f90e14562578e88493b0d54ff398 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Docs: Update default redirect policy enumerationMårten Nordheim2020-09-291-3/+4
| | | | | Change-Id: Ia72151cc0fbcb325572e7b623ef9a4b3236d797f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QSslConfiguration::setAllowedNextProtocol - remove the old signatureTimur Pocheptsov2020-09-282-8/+0
| | | | | Change-Id: I0b4b18e6ea2b78917220e77865fd92eb7a684179 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix qdoc warnings: supportedCiphers is a member of QSslConfigurationVolker Hilsheimer2020-09-281-7/+7
| | | | | | | ... not of QSslSocket. Change-Id: I9db5debe6a0aaa6a780b0047ae3f551ec3770fb4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Replace Q_REQUIRED_RESULT with [[nodiscard]]Allan Sandfeld Jensen2020-09-252-9/+9
| | | | | | | It was already used many places directly making the code inconsistent. Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* wasm: fix network status code propagationLorn Potter2020-09-252-6/+14
| | | | | | | | Fixes: QTBUG-86620 Pick-to: 5.15 Change-Id: I911636739dc57e47bc2a07a583f4e67fc08b1b19 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Doc: Make network snippets a subdirs/lib projectPaul Wicking2020-09-232-8/+12
| | | | | | | | Task-number: QTBUG-86497 Pick-to: 5.15 Change-Id: I45eb22344beb777dd4ad20ba669b28e50cbfc3ec Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-232-112/+112
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QDecompressHelper: limit decompression ratioMårten Nordheim2020-09-227-0/+93
| | | | | | | | To avoid potential decompression bombs. This is implemented with just a simple check that the ratio doesn't pass some hardcoded preset. Change-Id: I17246f0f43e73280cdb35a8f03d65885f5678ad6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Regenerate projectsAlexandru Croitor2020-09-222-4/+10
| | | | | | | | | Clean up the state of the projects, before changing the internal CMake API function names. Task-number: QTBUG-86815 Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Correct link errors qtbaseNico Vertriest2020-09-211-1/+1
| | | | | | Task-number: QTBUG-86295 Change-Id: I27f6bbdadffb08a8794520a14dfe0e2334979575 Reviewed-by: Paul Wicking <paul.wicking@qt.io>