summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* winrt: use ComPtr in network classesAndrew Knight2014-06-255-79/+48
| | | | | | | | | | This removes extra code and potential memory leaks by using smart pointers instead of calling Release() directly. Task-number: QTBUG-38115 Change-Id: If799d6948af8c3df3d0c1617742653b104087e3b Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Add missing QDnsLookup constructor implementationAndy Shaw2014-06-201-1/+13
| | | | | | | Task-number: QTBUG-39136 Change-Id: I4d2626416fae99339988cd994653ce7ec753f081 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-059-60/+71
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * remove HSTRING instancesMaurice Kalinowski2014-06-034-49/+49
| | | | | | | | | | | | | | | | | | | | | | HSTRING needs to be released or handles will be leaked. Instead use HString which takes care of resource management on its own. Task-Number: QTBUG-38115 Change-Id: I2c767776c1f22f45acd8dd77b693f30d63d894b9 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * Doc: be more explicit about need to set expected SSL cert in errorsArnaud Bienner2014-05-272-2/+4
| | | | | | | | | | | | | | | | Note added in QNetworkReply and QSslSocket documentation. Task-number: QTBUG-16770 Change-Id: I2dd8cfb913ec29a96b5465a905cd213713b8d537 Reviewed-by: Richard J. Moore <rich@kde.org>
| * WinRT: Fix compile warningsMaurice Kalinowski2014-05-263-3/+7
| | | | | | | | | | Change-Id: If223dd73b9558a0f5144be38f19a61316f8c807b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * Ensure all encrypted bytes are sent when closing QSslSocket.Richard J. Moore2014-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | If you do sock->write(data) followed by sock->close() then the data written is not transmitted unless you flush when using QSslSocket but is when using QTcpSocket. This change makes QSslSocket work like QTcpSocket. Change-Id: Ia2e1c021dc48ac0d573f78da782ea77641c03bc1 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * IPv6 scope ID of zero is not validThiago Macieira2014-05-262-6/+9
| | | | | | | | | | | | | | | | IANA reserves scope ID of 0x0 to mean "no scope ID", so make sure that we don't try to set it when reading from the sockaddr_in6 structure. Change-Id: I71b207e6f8262ab2bf9fde993288a71ba63c7572 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-227-8/+22
|\| | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| * Mark the missing QDnsLookup constructor as \internalAndy Shaw2014-05-211-0/+5
| | | | | | | | | | | | | | | | | | Implementation will be added for Qt 5.4.0 as it cannot be done sooner. Change-Id: I4d2626416fae99339988cd994653ce7ec753f081 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Avoid accessing the internals of the SSL_CIPHER struct.Richard J. Moore2014-05-193-3/+4
| | | | | | | | | | | | | | | | | | | | | | Avoid accessing the internals of the SSL_CIPHER struct since this has changed size etc. over time leading to binary incompatibilities. Task-number: QTBUG-32423 Task-number: QTBUG-23363 Change-Id: I8cb399484e3a62be7d511f4b8b22c876825c87d4 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
| * Fix crash in QNetworkAccessManager.Jędrzej Nowacki2014-05-192-4/+12
| | | | | | | | | | | | | | | | | | | | Recreating QCoreApplication could cause a crash in QNetworkAccessManager constructor. That was caused by an invalid shutdown detection introduced in f273d6fbc02055ff3999adc0df76360ca0670435. Task-number: QTBUG-36897 Change-Id: Ib5bba773a2a4fcde690a3a93680aef551aae3a5b Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-141-1/+1
| |\ | | | | | | | | | Change-Id: If1abbe7810ea43ae750db91066f9f579c79b2289
| | * Fix the documentation on how to use -openssl-linked.Richard J. Moore2014-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | You set the environment /before/ you run configure. Change-Id: I6954656f892214f41b5f2ec4e3f4926eb5a9e247 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Friedemann Kleint2014-05-143-26/+27
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-133-26/+27
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp Change-Id: Ibe75603dc8a51769db6550ea3f07bc8d19b0be85
| | * | Fix MSVC warnings in qspdyprotocolhandlerKai Koehne2014-05-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings about 'truncation of constant value': qspdyprotocolhandler.cpp(583) : warning C4309: '=' : truncation of constant value qspdyprotocolhandler.cpp(656) : warning C4309: '=' : truncation of constant value qspdyprotocolhandler.cpp(659) : warning C4309: '=' : truncation of constant value Change-Id: I3c32b9f47c06da9b50f5c94871a2ee455b3a5cb6 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| | * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-122-23/+24
| | |\| | | | | | | | | | | | | Change-Id: I9300572e2b74f0564b2589cbd0fbdf24850f68df
| | | * Ignore expired certificate during certificate validationDaniel Molkentin2014-05-112-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSSL has a bug when validating a chain with two certificates. If a certificate exists twice (which is a valid use case for renewed CAs), and the first one it hits is expired (which depends on the order on data structure internal to OpenSSL), it will fail to validate the chain. This is only a bandaid fix, which trades improved chain validation for error reporting accuracy. However given that reissuing of CA certs is a real problem that is only getting worse, this fix is needed. See also: https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html#WARNINGS [ChangeLog][QtNetwork][QSslSocket] Added a workaround to an OpenSSL problem that may cause errors when the trust store contains two certificates of the issuing CA, one of which is expired. Task-number: QTBUG-38896 Change-Id: I8f17972ac94555648098624e470fff0eff2e7940 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | | Move the PKCS#12 support from QSslSocket to QSslCertificate.Richard J. Moore2014-05-144-25/+25
|/ / / | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-05-131-1/+1
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Manually changed enum to LibGL in src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
| | * | Fix debug output when enabling QABSTRACTSOCKET_DEBUG.David Faure2014-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some calls pass len=32, so garbage was shown when maxlen (readBytes) is smaller. Change-Id: I97e61dcdf5a0db032317c57afb4bfb406437d8d5 Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | | | Add support for loading PKCS#12 bundles.Richard J. Moore2014-05-119-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | QSslCertificate::isSelfSigned(): add since tag in documentationPeter Hartmann2014-05-111-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I6a4e96fb1a94a1a55eabe6b3e0df09b5d27fd8a2 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | | Change debug output to use stream version of debug.Robin Burchell2014-05-101-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | df757e30f816bee8bed5f65ff8e63cec57fe46b1 may have fixed this for one platform, but different platforms appear to have different ideas on what constitutes a FD. Just use the stream operator to avoid having to face this nightmare all the time. Change-Id: I298c5a4b31e8a4af6b613d039cb9aee6e8263b5a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-065-123/+224
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-011-1/+1
| |\| | | | | | | | | | | | | | | | This merge adds the opengl rename. Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
| | * QAbstractSocket: enable read notification for unbuffered socketsPeter Hartmann2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores behavior for UDP sockets as it was in 5.2.1. Change 13c246ee119fdb10d91f509b968a221d4fc1d8ba introduced a behavioral change / regression in that respect. Task-number: QTBUG-37489 Change-Id: I8f0b26d763dd66ea6edcc343e91ff5c9c7bdc0f2 Reviewed-by: Richard J. Moore <rich@kde.org>
| * | Add missing QT_NO_NETWORKPROXY guards around HTTP connect statementsAndrew Knight2014-04-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without these, a spew of connection warnings will occur when using HTTP on Qt builds with QT_NO_NETWORKPROXY. Change-Id: I330f6d98d1abdbadc57768dc48b8fab0ee1f6655 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * | Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-232-122/+215
| |\| | | | | | | | | | Change-Id: Id13b4a3803664692f32f9d57549be8a0c4a08567
| | * WinRT: Fix TCP socket readsAndrew Knight2014-04-222-122/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All read calls are now pulled from an intermediate buffer which is populated from the asynchronous callback (this was a TODO previously, and was breaking downloads of large requests). As a side-benefit, the use of only async callbacks ensures fewer first-chance exceptions appear in the debug output. Task-number: QTBUG-30196 Change-Id: I5653742d8d94934a4b4a4227298865d20518bc4c Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * | Fix build against older OpenSSL.Sérgio Martins2014-04-141-0/+2
| |/ | | | | | | | | | | | | The declaration of q_SSL_ctrl is ifdefed, so ifdef it's usage too. Change-Id: I99a53af6f4f24ed991d39ab89f18e03b8f38c617 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Provide new API: QSslCertificate::isSelfSigned()Daniel Molkentin2014-04-304-0/+19
| | | | | | | | | | Change-Id: I382a017a0b865b849667301aff8b2f87b676ecc6 Reviewed-by: Richard J. Moore <rich@kde.org>
* | SPDY: use QUrl's logic for determining the correct "Host" headerPeter Hartmann2014-04-291-19/+1
| | | | | | | | | | | | | | | | | | | | | | ... and not duplicate part of the logic in the SPDY code. This code was also existent in QNetworkRequest. The next step will be to actually respect the header if set via QNetworkRequest::setRawHeader(). Change-Id: Ifda2658ea826d039c9dad61ed6fa42aaedaee6b6 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Marc Mutz2014-04-117-14/+101
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-117-14/+101
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-armv7le-qcc/qplatformdefs.h src/printsupport/kernel/qcups.cpp src/widgets/styles/qstyle.h tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
| | * Support for DH and ECDH key exchange for QSslSocket serversRichard J. Moore2014-04-093-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Ensure we initialize things before checking the openssl version.Richard J. Moore2014-04-081-0/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-37783 Change-Id: Ie276e597062d8bfc74ef57251ed21a94020e030f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * QNetworkReplyHttpImpl: fix misuse of QDateTime::addSecs()David Faure2014-04-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDateTime::addSecs() is a const function and returns a new QDateTime with the given seconds added, thus the current statement had no effect. Found by applying Q_REQUIRED_RESULT in dev branch. Change-Id: Id712334f91e0adb40bafc23470bf46479334c81a Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Fix QNetworkRequest::setRawHeader() for QT_NO_CAST_FROM_BYTEARRAYRichard J. Moore2014-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Avoid the implicit conversion in the doc snippet. Change-Id: Iacec6dab371a22c16f537af471f6653d9c5ad43d Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| | * network: finish all pending replies upon errorPeter Hartmann2014-04-071-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
* | | QNetworkAccessManager: optimize QNetworkAccessAuthenticationManager allocationMarc Mutz2014-04-111-1/+1
|/ / | | | | | | | | | | | | | | | | Use QSharedPointer<T>::create(), which co-locates the refcount with the payload in a single memory allocation, instead of QSharedPointer<T>(new T), which causes two allocations. Change-Id: I58196b6390dcc9bd52417e279fd9e000ab9ee9cc Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNetworkReplyImpl: optimize QRingBuffer allocationMarc Mutz2014-04-101-2/+2
| | | | | | | | | | | | | | | | | | Use QSharedPointer<T>::create(), which co-locates the refcount with the payload in a single memory allocation, instead of QSharedPointer<T>(new T), which causes two allocations. Change-Id: I84980e98c4fe9773f12533983937eafa0b0ab250 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | Add QNonContiguousByteDeviceFactory::createShared()Marc Mutz2014-04-072-4/+4
| | | | | | | | | | | | | | | | | | | | for more efficient creation of QNonContiguousByteDevices held in shared pointers. Use the new functions in QNetworkAccessBackend::createUploadByteDevice() and QNetworkReplyHttpImplPrivate::createUploadByteDevice(). Change-Id: I8a3c76f7c8d5926850303992c77e9382a39a55e8 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-249-22/+82
|\| | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| * network: add support for NTLM Session SecurityPeter Hartmann2014-03-201-2/+9
| | | | | | | | | | | | | | | | | | tested manually with internal proxy. Patch-by: Jonathan Lauvernier <Jonathan.Lauvernier@gmail.com> Change-Id: Ief5b4579b3444ce70eb99637edf771d37d3971fb Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * BlackBerry networking: call special select() methodPeter Hartmann2014-03-201-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... so that the socket notifiers are enabled after selecting and thus emit signals even after selecting (select() is called e.g. by the waitFor* methods). Task-number: QTBUG-36144 Change-Id: I385f288e8c42f92a9c84e53bce843e52f8094ada Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Fanda Vacek <fvacek@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix crash if SSL_get0_next_proto_negotiated() cannot be resolved.Friedemann Kleint2014-03-201-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Crash occurs after warnings like: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated Task-number: QTBUG-37515 Task-number: QTBUG-33208 Change-Id: I18b803e4709b9d5f6b33717c2ac43179676351a4 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * HTTP internals: keep consistent state in channel and protocol handlerPeter Hartmann2014-03-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | It could be that the channel has its reply already reset to 0, while the protocol handler thinks the reply is still active, which might lead to weird behavior including hard to reproduce crashes. Task-number: QTBUG-37424 Change-Id: I89b65d34caaa546a343edc2ee205aa76425de88f Reviewed-by: Richard J. Moore <rich@kde.org>