summaryrefslogtreecommitdiffstats
path: root/tests/auto/network
Commit message (Collapse)AuthorAgeFilesLines
* tst_http2::earlyResponse - fix a flaky and somewhat broken testTimur Pocheptsov2019-02-203-1/+16
| | | | | | | | | | | | | | 1. Fix erroneous logic, which was triggered in 'h2' mode (non-TLS connection) - after the initial protocol upgrade/POST request was handled, the server (on Windows specifically) was erroneously handling upcoming DATA frames by replying with another redirect response. 2. Make the test less heavy by sending 1 MB of Qt::Uninitialize instead of 10 MB - theoretically this could cause a timeout before the redirected request finished successfully. Task-number: QTBUG-73873 Change-Id: I961e0a5f50252988edd46d0e73baf96ee22eef3f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add cmdline feature to qmakeJoerg Bornemann2019-02-186-13/+7
| | | | | | | | | [ChangeLog][qmake] A new feature "cmdline" was added that implies "CONFIG += console" and "CONFIG -= app_bundle". Task-number: QTBUG-27079 Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* tst_qsslsocket - blacklist several test temporarilyTimur Pocheptsov2019-01-241-0/+6
| | | | | | | | | | | | | | | | | For some reason behavior of SecureTransport has changed from 10.12 to 10.13 and then to 10.14. On 10.13 SecureTransport fails upon receiving the server's certificate with 'Unrecoverable error', before we can do a manual verification and accept the certificate as trusted. Analysis of available source code shows that they, apparently, do not like MD5 hash which our server is using. Until certificate is updated on the server or we switch completely to the Docker-based solution we have to BLACKLIST tests that connect to our current network test-server. Oddly enough, on 10.14 SecureTransport is less mean. Task-number: QTBUG-69873 Change-Id: I7da1883e0970a2f6ddd8385f193b76116d6983e0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-11-273-2/+18
|\ | | | | | | Change-Id: I12bcee17e349edd0dd4fd08da76361d1ffb1a727
| * Make developer build tests pass for boot2qtSami Nurmenniemi2018-11-263-2/+18
| | | | | | | | | | | | | | | | Some tests were fixed and others were skipped/blacklisted. Task-number: QTBUG-63152 Change-Id: Ica7df555f8d152ee589865911130525101d4b941 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-211-0/+3
|\| | | | | | | Change-Id: I909c9cfa0ce80f512de4b4986e626eae66b63afa
| * tst_QNetworkReply: Blacklist getFromHttp:success-externalLiang Qi2018-11-211-0/+3
| | | | | | | | | | | | Task-number: QTBUG-71953 Change-Id: I449ee3be8fa748046895386c9cbff90b30ed80c4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.12.0' into 5.12Liang Qi2018-11-161-3/+57
|\ \ | | | | | | | | | Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
| * | Add missing protocol enumerators, report TLS 1.3 if negotiatedTimur Pocheptsov2018-11-071-3/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Remove the conditional inclusion of DTLS versions, they made difficult and unnecessary ugly adding new protocols (something like TlsV1_2OrLater + 4). 2. OpenSSL 1.1.1 first introduced TLS 1.3 support. OpenSSL 1.1 back-end is compatible with OpenSSL 1.1.1, but would fail to extract/report protocol versions and set versions like 'TLS 1.3 only' or 'TLS 1.3 or better' on a new context. Given 1.1.1 is deployed/adapted fast by different distros, and 5.12 is LTS, we fix this issue by introducing QSsl::Tls1_3 and QSsl::Tls1_3OrLater. SecureTransport, WinRT and OpenSSL below 1.1.1 will report an error in case the application requests this protocol (SecureTransport in future will probably enable TLS 1.3). Saying all that, TLS 1.3 support is experimental in QSslSocket. Done-by: Albert Astals Cid <albert.astals.cid@kdab.com> Done-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: I4a97cc789b62763763cf41c44157ef0a9fd6cbec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Make tst_qsslsocket::protocolServerSide() less flakyTimur Pocheptsov2018-11-071-4/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | By accident, when we erroneously tried testing TlsV1_3 on macOS with SecureTransport (which does not support TLS 1.3) we hit this quite subtle problem: it can happen that a server-side socket is never created but a client (after TCP connection was established) fails in TLS initialization and ... stops the loop preventing SslServer::incomingConnection() from creating its socket. Then we dereference nullptr. Task-number: QTBUG-71638 Change-Id: I8dc5a4c53022a25aafe2c80a6931087517a48441 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | tst_QLocalSocket::processConnections: remove QSKIPTimur Pocheptsov2018-10-251-3/+0
| | | | | | | | | | | | | | | | | | on macOS, the test seems to be stable nowadays. Task-number: QTBUG-39986 Change-Id: I18430c3feb27a5bee5474e1eb95f7d89b25f00a9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Fix builds without DTLSAllan Sandfeld Jensen2018-10-091-1/+1
| | | | | | | | | | | | | | Change-Id: Ic7215c7aa0bf6f7b37ae34649d809f2e1e1ee95b Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | tst_qdtls: add 'invalidConfiguration' testTimur Pocheptsov2018-08-101-0/+15
| | | | | | | | | | | | | | | | | | | | Test that we don't silently replace an invalid TLS configuration with the default one (for now, the only thing that is considered to be non-valid - is having non-DTLS protocol set). Change-Id: I6f714b009cf1345a085a3f26d638fc31330f1a94 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QDtls: delay protocol version verificationTimur Pocheptsov2018-08-101-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A weird behavior of the DTLS server example, when linked with 1.0.2, exposed that client code, requesting an invalid protocol (for example, SSLv3) can end-up with connection encrypted with DTLS 1.2 (which is not that bad, but totally surprising). When we check the protocol version early in setDtlsConfiguration() and find a wrong version, we leave our previous configuration intact and we will use it later during the handshake. This is wrong. So now we let our user set whatever wrong configuration they have and later fail in TLS initialization, saying - 'Unsupported protocol, DTLS was expected'. Auto-test was reduced - the follow-up patch will introduce a new 'invalidConfiguration' auto-test. Change-Id: I9be054c6112eea11b7801a1595aaf1d34329e1d2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-0/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| * Return to eventloop after emitting encryptedMårten Nordheim2018-07-311-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the connection has been encrypted we will, in QHttpNetworkConnectionChannel::_q_encrypted, emit 'reply->encrypted' in which user slots can be called. In the event that the user calls abort it will, however, not abort until the next time it goes back to the event loop (which might not happen until after the request has already been sent). Task-number: QTBUG-65960 Change-Id: I96865f83c47f89deb9f644c86a71948dbb0ec0d0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Extend 'ignoreExpectedErrors' testTimur Pocheptsov2018-08-021-9/+28
| | | | | | | | | | | | | | | | | | with a case when we fail to ignore/pre-set one of possible verification errors. Change-Id: I23b06243b61acef1ef3576c51529f3ef6601ba7d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QDtls: respect pre-set verification errorsTimur Pocheptsov2018-07-311-0/+27
| | | | | | | | | | | | | | | | | | | | That's actually how ignoreVerificationErrors (and QSslSocket::ignoreSslErrors) are used to set the expected/known verification errors before handshake. Auto-test updated too. Change-Id: I9c700302d81ddb383a4a750fafd594373fb38ace Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Rework QNetworkReply tests to use docker-based test serversRyan Chu2018-07-274-209/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change frees the tests of their dependence on the Qt internal test server (qt-test-server.qt-test-net). It makes the developers run the tests out of Qt testing infrastructure. If the user has installed Docker engine on their host, the test servers will be built up inside separate Docker containers, and then, the test case goes with the Docker-based test servers. Otherwise, the test case will keep using the Qt internal test server. Task-number: QTQAINFRA-1686 Change-Id: I518bc3675bfd658938509744b0e7e0610bc8bf66 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | QDtls - use conventional namesTimur Pocheptsov2018-07-271-24/+24
| | | | | | | | | | | | | | | | More Qt-style and more natural, also, shorter names. Change-Id: I97bd68a8614126d518a3853027661435dc4e080d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QDtls - refactorTimur Pocheptsov2018-07-262-31/+31
| | | | | | | | | | | | | | | | | | This patch renames rather awkward 'remote' into more conventional 'peer' (similar to what we have in QAbstractSocket). Change-Id: Ifc45e538b8adf9cc076bd7aee693277829fd94dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | prune cargo-culted and obsolete winsock deps from autotestsOswald Buddenhagen2018-07-1912-15/+0
| | | | | | | | | | Change-Id: I9666598d34e965d7058aeb2b2e7fb3f59600675c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-171-0/+2
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| * tst_qnetworkinterface: Fix for case of zero interfaceTuomas Heimonen2018-07-061-0/+2
| | | | | | | | | | Change-Id: I3e43acf2e96635c39fcb366c8d161a9287af01b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSslSocketBackendPrivate - avoid recursion while handing errorsTimur Pocheptsov2018-07-121-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic seems to be simple - if client code on error signal tries to close TLS socket and this socket has buffered data, it calls 'flush' and 'transmit' or even 'startHandshake' as a result, which in turn will set and emit error again. To auto- test this, we initiate a handshake with pre-shared key hint on a server side and both client/server sockets incorrectly configured (missing PSK signals). We also do early write into the client socket to make sure it has some data buffered by the moment we call 'close'. Task-number: QTBUG-68089 Task-number: QTBUG-56476 Change-Id: I6ba6435bd572ad85d9209c4c81774a397081b34f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QDtls - handle server-side timeoutsTimur Pocheptsov2018-07-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | According to RFC 6347 a DTLS server also must retransmit buffered message(s) if timeouts happen during the handshake phase (so it's not a client only as I initially understood it). Conveniently so an auto-test is already in place and needs just a tiny adjustment - handshakeWithRetransmission covers both sides. Change-Id: If914ec3052e28ef5bf12a40e5eede45bbc53e8e0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-022-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Make tests compile for AndroidLiang Qi2018-06-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only enables compilation, it doesn't fix any test. Qt on Android supports process, but not TEST_HELPER_INSTALLS. See also acdd57cb for winrt. android-ndk-r10e is used to compile, see http://doc-snapshots.qt.io/qt5-5.11/androidgs.html . corelib/io/{qdir,qresourceengine} need to be fixed later. Done-with: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Change-Id: I34b924c8ae5d46d6835b8f0a6606450920f4423b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | DTLS cookie auto-test - do not check the exact UDP socket errorsTimur Pocheptsov2018-06-281-2/+0
| | | | | | | | | | | | | | | | | | | | It was observed on OpenSUSE VM in CI - apparently, even after succesfull read from UDP socket error was not UnknownSocketError. While it's under investigation, the DTLS auto-test should limit itself by DTLS things and barely test IO success (socket-wise) when needed. Change-Id: I0773a02c591432b0d6c894f4131f70e41dc7ed72 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | tst_QSslSocket::qtbug18498_peek() - fix several problemsTimur Pocheptsov2018-06-281-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It all started from the compiler's warnings about 'this' captured but not used in lambdas. While fixing this it was noticed that 'client' socket has a lifetime longer than the test case itself (the socket has a parent, which is tst_QSslSocket object). The 'server' socket was simply leaked. So there is no guarantee that some of them (or both) later, after the test failed in one of QVERIFY, for example, does not emit 'encrypted' upon receiving more data; this will result: in reading/writing from/to invalid memory location (captured local 'encryptedCount') and/or probably exiting event loop when it's not expected to do so. Change-Id: I51de0493d989a5ba36de2cef58d35526c0e26cda Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Add tst_QDtls auto-testTimur Pocheptsov2018-06-2115-1/+1583
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is somewhat similar to tst_QSslSocket but is smaller (in scope, will grow in future), it has no QTcpSocket/QAbstractSocket-specific things and has more DTLS-specific code. At the moment it does not use our network test server, all work is done in the same process with two QUdpSockets and two QDtls objects. We test (both on client/server ends): - parameters validation (for all functions that do this) and the correctness of error codes/handshake states - handshake procedure (with/out certificates and with pre-shared keys) - timeouts and re-transmissions during (D)TLS handshake - peer verification (and related verification errors) - aborted/resumed handshake - encrypted I/O - DTLS shutdown For now, this test is OpenSSL-only. Task-number: QTBUG-67597 Change-Id: I27006bfe3d6c02b89596889e8482a782c630402a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QDtlsClientVerifier - add auto-testTimur Pocheptsov2018-06-193-2/+502
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This part of DTLS is relatively easy to test: we never do a complete handshake. Certificates, verification, ciphers, etc. - do not matter at this stage (to be tested in tst_QDtls). Errors are mostly insignificant and can be ignored or handled trivially. The test is OpenSSL-only: SecureTransport failed to correctly implement/ support server-side DTLS, the problem reported quite some time ago and no fixes from Apple so far. Task-number: QTBUG-67597 Change-Id: I21ad4907de444ef95d5d83b50083ffe211a184f8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | De-parameterise tst_QNetworkReply::ignoreSslErrorsList()'s urlEdward Welbourne2018-06-131-8/+7
| | | | | | | | | | | | | | | | | | It was the same in all test rows, so move it from the _data() to a fixed value in the test. Also, don't implicitly coerce C-string literals to QString. Change-Id: Ieee4c7ffbf251c4b69b5acd79125dfa93eb51d6e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | tst_Http2 auto-test: stop sending DATA frames if test failedTimur Pocheptsov2018-06-043-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike QNAM, our toy http2 server sends payload as one big chunk as soon as it fits in the receive window's size. Internally, 'frame writer' splits this payload into many DATA frames of the appropriate size (imposed either by the default value or the one from the client's SETTINGS frame). If some test fails, we can end up with a server waiting for the writer to send all the DATA frames though it is not needed anymore - there is nobody to receive them after a failure. This patch moves such a loop into the test server instead and stops the loop early if needed. Change-Id: Iea2dcd718d8f83386fd16004807f6447bf999435 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-241-0/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * Treat the Content-Disposition header as a known headerAndy Shaw2018-05-141-0/+3
| | | | | | | | | | Change-Id: I307f67b10759d17f603a340b14266ab47d195497 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-141-2/+10
|\| | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_module_headers.prf tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qwidget/BLACKLIST Change-Id: I2a08952d28d1d0e3d73f521a3d44700ce79ff16c
| * OpenSSL v1.1.1: fix qtbug18498_peekMårten Nordheim2018-05-111-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously the test worked because the client was the last party to know when encryption was established. However, due to changes in the TLSv1.3 handshake the server is now the last one. In either case, relying on both to be encrypted when one of them is finished is not great, so now we only quit the event loop when both client and server have emitted 'encrypted'. Change-Id: Ic1fc75671206d866f7ea983805fd58a99657aac6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-085-33/+19
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro Change-Id: I3169f709cc2a1b75007cb23c02c4c79b74feeb04
| * tests/auto/network: Avoid unconditional qWait()sKari Oikarinen2018-05-085-33/+19
| | | | | | | | | | | | | | | | | | Replace with QSignalSpy or QTRY_COMPARE when possible. Task-number: QTBUG-63992 Change-Id: I18dc8837301424855487a12ee62451a5aeb21bf0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-052-1/+48
|\| | | | | | | Change-Id: Ib58433da04bffb5dfab5486b80f17f39cc4145fa
| * OpenSSL 1.1.1: Fix tst_QSslCertificate::toTextMårten Nordheim2018-05-042-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | The formatting of the output from QSslCertificate::toText has changed slightly from before, so it no longer matches the test's data. From what I can tell we just do a manual sanity check and create a new file with the new output and then augment the test. Task-number: QTBUG-67463 Change-Id: I751e5a3f9a28015f97c895cea47384704fd68e38 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-031-2/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/elasticnodes/graphwidget.cpp examples/widgets/graphicsview/elasticnodes/node.cpp examples/widgets/graphicsview/elasticnodes/node.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_drawing.mm src/widgets/kernel/qmacgesturerecognizer_p.h Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
| * tst_QUdpSocket: Fix Clang warning about unused expressionFriedemann Kleint2018-05-021-2/+4
| | | | | | | | | | | | | | | | | | tst_qudpsocket.cpp(965,9): warning: expression result unused [-Wunused-value] if (!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData()) Task-number: QTBUG-63512 Change-Id: I51959432c6ff166c188842e34c3033ab1319c079 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-021-1/+32
|\| | | | | | | Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
| * Stop rejecting cookies which have a domain that matches a TLDMårten Nordheim2018-04-301-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... but only if the host it came from is an EXACT match. Also only apply the cookie if the url is an EXACT match. [ChangeLog][QtNetwork][QNetworkCookieJar] Cookies will no longer be rejected when the domain matches a TLD. However (to avoid problems with TLDs), such cookies are only accepted, or sent, when the host name matches exactly. Task-number: QTBUG-52040 Change-Id: Ic2ebd9211c48891beb669032591234b57713c31d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Introduce QPasswordDigestor functionsMårten Nordheim2018-04-233-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | Added a few functions to derive keys from passwords. Currently it supports PBKDF1 and PBKDF2 as defined in RFC 8018 ( https://tools.ietf.org/html/rfc8018 ). [ChangeLog][QtNetwork][QPasswordDigestor] Added QPasswordDigestor Task-number: QTBUG-30550 Change-Id: I2166b518bd8b54e3486514166e76fd9ba2f219c8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QSslKey: Implement PKCS#8 support for the generic backendMårten Nordheim2018-04-231-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to decode keys which are encoded with PKCS#8 using the generic back-end (used in winrt and secure transport). It works on both WinRT and macOS; however QSslKey seems unused in the WinRT backend and it seems only RSA keys can be used for certificates on macOS. Meaning that DSA and Ec, which in theory* should represent their unencrypted versions, can't currently be tested properly. * Can also be confirmed by loading the key using the ST or WinRT backend, calling toPem(), writing the output to a file and then loading the unencrypted key using openssl. [ChangeLog][QtNetwork][QSslKey] Added support for PKCS#8-encoded keys in the generic SSL back-end (used for SecureTransport on macOS and for WinRT). Note that it does not support keys encrypted with a PKCS#12 algorithm. Task-number: QTBUG-59068 Change-Id: Ib27338edc7dbcb5c5e4b02addfdb4b62ac93a4c3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add HTTP caching headers to KnownHeadersJan Murawski2018-04-191-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | QNetworkRequest is already aware of the Last-Modified header but has been lacking support for the If-Modified-Since, ETag, If-Match and If-None-Match headers. These headers are used with HTTP to signal conditional download requests. See RFC 7232 for more information. Change-Id: I248577b28e875fafd3e4c44fb31e8d712b6c14f1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Auto-tests: remove unneeded 'gui' from QT variableTimur Pocheptsov2018-04-182-3/+3
| | | | | | | | | | | | | | | | none of these tests needs anything GUI-related. Change-Id: I6b3c02bf13da60ab460f0cc4d804f1d03bc68f50 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>