At the moment, there is no stream information in the cache file. This
can lead to a problem when current stream version differs from version
cache file written with.
As an example, if file written with Qt 5.1.1, QTimeDate in the metadata
stored as 13-bytes value, but Qt 5.2 and later can read additional 4
bytes which breaks following data, leading to network request just hangs
forever.
Adding stream version fixes this problem.
As cache format changed, cache version bumped.
Task-number: QTBUG-36219
Change-Id: I467d8c9fda82bcf9302192f51e7a00d2f6a9ff66
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
The combination of these unstable tests makes it very
hard to get changes through the CI system due to the
unrelated test failures.
Skip the following test functions:
tst_QIODevice::unget QTBUG-39983 (Mac)
tst_QThreadPool:expiryTimeoutRace QTBUG-3786 (Windows)
tst_QLocalSocket::processConnection QTBUG-39986 (Mac)
tst_QTcpServer::adressReusable QTBUG-39985 (Linux)
Change-Id: I96559bea0d437fd25966b6ccac1ece1490e06241
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Conflicts:
mkspecs/qnx-x86-qcc/qplatformdefs.h
src/corelib/global/qglobal.h
src/network/socket/qnativesocketengine_winrt.cpp
src/plugins/platforms/android/androidjniaccessibility.cpp
src/plugins/platforms/windows/qwindowswindow.cpp
Manually adjusted:
mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
to include 9ce697f2d5
Thanks goes to Sergio for the qnx mkspecs adjustments.
Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
The sockaddr_in struct is defined in netinet/in.h header.
Change-Id: I67a3421094c96a5e948968a26723ec8c21f85c93
Reviewed-by: BogDan Vatra <bogdan@kde.org>
We were keeping a dangling pointer to a non-existent QIODevice around
which would lead to a crash.
Task-number: QTBUG-17400
Change-Id: Ie374cbb94bb45c9b0fbef46287b3317f60154123
Reviewed-by: Richard J. Moore <rich@kde.org>
... because it fails on the new network test server. The Socks5 tests
in QUdpSocket have already been disabled by commit
aa3eaf9d2e .
Task-number: QTBUG-35490
Change-Id: Ib062adb422ff6e5538f14d15a266d79c3bb53956
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Recreating QCoreApplication could cause a crash in QNetworkAccessManager
constructor. That was caused by an invalid shutdown detection introduced
in f273d6fbc0.
Task-number: QTBUG-36897
Change-Id: Ib5bba773a2a4fcde690a3a93680aef551aae3a5b
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Discussed with Peter and agreed that it's a slightly better fit there.
Change-Id: If8db777336e2273670a23d75d8542b30c07e0d7b
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Add support for loading certificates and keys from PKCS#12 bundles
(also known as pfx files).
Task-number: QTBUG-1565
[ChangeLog][QtNetwork][QSslSocket] Support for loading PKCS#12
bundles was added. These are often used to transport keys and
certificates conveniently, particularly when making use of
client certificates.
Change-Id: Idaeb2cb4dac4b19881a5c99c7c0a7eea00c2b207
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Change-Id: I92fa083665509932b75ff1037904a6f78a950fd6
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Change-Id: Ife5b7206fd3d7af57cfca3c0f28f56bb53ede7a7
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
... because they are too unstable. We can check whether they are more
stable once the new network tests server is in place.
Task-number: QTBUG-38385
Change-Id: I5ced7cc1f89290812aa88f174a41965fd2ef7252
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Change-Id: I2912dcca77270582f6e989b8b3fb72b82f6f70d6
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Despite supporting DH and ECDH key exchange as a client, Qt did not provide
any default parameters which prevented them being used as a server. A
future change should allow the user to control the parameters used, but
these defaults should be okay for most users.
[ChangeLog][Important Behavior Changes] Support for DH and ECDH key exchange
cipher suites when acting as an SSL server has been made possible. This
change means the you can now implement servers that offer forward-secrecy
using Qt.
Task-number: QTBUG-20666
Change-Id: I469163900e4313da9d2d0c3e1e5e47ef46320b17
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
FAIL! : tst_QNetworkReply::ioPostToHttpUploadProgress() 'args.at(0).toLongLong() != sourceFile.size()' returned FALSE. ()
Task-number: QTBUG-37449
Task-number: QTBUG-24226
Change-Id: Idcc0ceac0332705b1e3a073d40fa8098bea2c9f3
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
... and not only one. This was a problem e.g. when there were several
requests to the same host and the host was not reachable; only one
reply would get an error signal in case we suppressed other errors in
"happy eyeballs" host lookup style.
Task-number: QTBUG-36890
Change-Id: I1b5757498bd644b0d773cf6c43e4950620949c5c
Reviewed-by: Richard J. Moore <rich@kde.org>
Output the SSL library version, output socket error string on connection
failure consistently, silence numerous warnings about QIODevice not
being open in tst_QSslSocket::constructing.
Change-Id: Ia23d42de5b2daca55b2f6f50af025d61e99c52a0
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
tested manually with internal proxy.
Patch-by: Jonathan Lauvernier <Jonathan.Lauvernier@gmail.com>
Change-Id: Ief5b4579b3444ce70eb99637edf771d37d3971fb
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Do not close connection in slot bytesWritten() since that can
cause clients to fail with "Connection Closed". Instead, use
deleteLater() to close properly and prevent leaking the sockets.
FAIL! : tst_QNetworkReply::qtbug28035browserDoesNotLoadQtProjectOrgCorrectly() 'waitForFinish(reply) == Success' returned FALSE. ( QUrl( "http://localhost:58240" ) failed: # 2 "Connection closed" )
..\tst_qnetworkreply.cpp(7067) : failure location
Task-number: QTBUG-37449
Change-Id: Ib92cb62fae523370b2fb45e1ccfa217559732bc8
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Replacing old troll.no domain with qt-project.org domain. Using troll.no
doesn't work anymore.
Change-Id: Ic6fa71b044d1adbdc66c875b47bfdc256a2afc8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The test takes too long and fails:
FAIL! : tst_QFtp::abort(WithoutProxy:get_fluke01) '(int)newData_ba.size() == bytesDone' returned FALSE. ()
tst_qftp.cpp(1886) : failure location
FAIL! : tst_QFtp::abort(WithoutProxy:get_fluke01) Network operation timed out
tst_qftp.cpp(1392) : failure location
FAIL! : tst_QFtp::abort(WithoutProxy:put_fluke01) 'bytesDone != bytesTotal' returned FALSE. ()
tst_qftp.cpp(1406) : failure location
FAIL! : tst_QFtp::abort(WithSocks5Proxy:get_fluke01) '(int)newData_ba.size() == bytesDone' returned FALSE. ()
tst_qftp.cpp(1886) : failure location
FAIL! : tst_QFtp::abort(WithSocks5Proxy:get_fluke01) Network operation timed out
tst_qftp.cpp(1392) : failure location
FAIL! : tst_QFtp::abort(WithoutProxyWithSession:get_fluke01) '(int)newData_ba.size() == bytesDone' returned FALSE. ()
tst_qftp.cpp(1886) : failure location
FAIL! : tst_QFtp::abort(WithoutProxyWithSession:get_fluke01) Network operation timed out
tst_qftp.cpp(1392) : failure location
FAIL! : tst_QFtp::abort(WithoutProxyWithSession:put_fluke01) 'bytesDone != bytesTotal' returned FALSE. ()
tst_qftp.cpp(1406) : failure location
FAIL! : tst_QFtp::abort(WithSocks5ProxyAndSession:get_fluke01) '(int)newData_ba.size() == bytesDone' returned FALSE. ()
tst_qftp.cpp(1886) : failure location
FAIL! : tst_QFtp::abort(WithSocks5ProxyAndSession:get_fluke01) Network operation timed out
tst_qftp.cpp(1392) : failure location
Totals: 327 passed, 10 failed, 4 skipped
QtQA::App::TestRunner: warning: test duration (398 seconds) is dangerously close to maximum permitted time (450 seconds)
QtQA::App::TestRunner: warning: Either modify the test to reduce its runtime, or use a higher timeout.
QtQA::App::TestRunner: test failed, running again to see if it is flaky...
Change-Id: I122641f174927c6b3668df05c79f88e38b88042f
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
- Replace SRCDIR define by QFINDTESTDATA
- Replace QVERIFY by QCOMPARE where applicable
- Introduce QVERIFY2 with message for comparisons
Change-Id: Ib5a6b0f09428587281e1b9521e4d8a8117c1afdb
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
There is no need to even try to run the tests if the network test
server is not present.
Add a validation in initTestCase() since all test functions depend
on the network test server.
Change-Id: I8eca376a718ab5b6e1cc2c57f2e045dd0b58f52b
Reviewed-by: Richard J. Moore <rich@kde.org>
Currently the only supported SPDY version is 3.0.
The feature needs to be enabled explicitly via
QNetworkRequest::SpdyAllowedAttribute. Whether SPDY actually was used
can be determined via QNetworkRequest::SpdyWasUsedAttribute from a
QNetworkReply once it has been started (i.e. after the encrypted()
signal has been received). Whether SPDY can be used will be
determined during the SSL handshake through the TLS NPN extension
(see separate commit).
The following things from SPDY have not been enabled currently:
* server push is not implemented, it has never been seen in the wild;
in that case we just reject a stream pushed by the server, which is
legit.
* settings are not persisted across SPDY sessions. In practice this
means that the server sends a small message upon session start
telling us e.g. the number of concurrent connections.
* SSL client certificates are not supported.
Task-number: QTBUG-18714
[ChangeLog][QtNetwork] Added support for the SPDY protocol (version
3.0).
Change-Id: I81bbe0495c24ed84e9cf8af3a9dbd63ca1e93d0d
Reviewed-by: Richard J. Moore <rich@kde.org>
They cause test failures from time to time.
Change-Id: I917bef340401d25bf54e133be9d9562b3b133c9f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
A few more HTTP status codes from the 4xx and 5xx series have been
added to QNetworkReply::NetworkError.
For content errors, the following codes have been added:
1. 409 - Resource Conflict
2. 410 - Resource Gone
For server related errors, the following codes have been added:
1. 500 - Internal Server Error
2. 501 - Operation Not Implemented
3. 503 - Service Unavailable
Few of the above codes are quite possible when communicating with REST
based services.
NOTE:
=====
* HTTP error status 400 is interpreted as
QNetworkReply::ProtocolInvalidOperationError.
* QNetworkReply::UnknownServerError is returned for all server related
errors (5xx) not listed above.
[ChangeLog][QtNetwork][QNetworkReply] Added more (specific) HTTP status
codes to NetworkError enum.
Task-number: QTBUG-30880
Change-Id: I9d2a133f6b3869f26710c6eb930dd8b08df31108
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Any cipher that is < 128 bits is excluded from the default SSL
configuration. These ciphers are still included in the list
of availableCiphers() and can be used by applications if required.
Calling QSslSocket::setDefaultCiphers(QSslSocket::availableCiphers())
will restore the old behavior.
Note that in doing so I spotted that calling defaultCiphers() before
doing other actions with SSL had an existing bug that I've addressed
as part of the change.
[ChangeLog][Important Behavior Changes] The default set of
ciphers used by QSslSocket has been changed to exclude ciphers that are
using key lengths smaller than 128 bits. These ciphers are still available
and can be enabled by applications if required.
Change-Id: If2241dda67b624e5febf788efa1369f38c6b1dba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commit 773dd01 introduced a general mingw platform scope, which
is cleaner and more flexible than matching the spec name.
Change-Id: Ie3a9cb791a83f7c8a51bc4e23069190c452ab521
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Qt since approximately 4.4 has set the verify callback on both the SSL
store and the SSL context. Only the latter is actually needed. This is
normally not a problem, but openssl prior to 1.0.2 uses the verify
code to find the intermediate certificates for any local certificate
that has been set which can lead to verification errors for the local
certificate to be emitted.
Task-number: QTBUG-33228
Task-number: QTBUG-7200
Task-number: QTBUG-24234
Change-Id: Ie4115e7f7faa1267ea9b807c01b1ed6604c4a16c
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>