summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* QNAM: Fix upload corruptions when server closes connectionMarkus Goetz2015-04-284-24/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes several upload corruptions if the server closes the connection while/before we send data into it. They happen inside multiple places in the HTTP layer and are explained in the comments. Corruptions are: * The upload byte device has an in-flight signal with pending upload data, if it gets reset (because server closes the connection) then the re-send of the request was sometimes taking this stale in-flight pending upload data. * Because some signals were DirectConnection and some were QueuedConnection, there was a chance that a direct signal overtakes a queued signal. The state machine then sent data down the socket which was buffered there (and sent later) although it did not match the current state of the state machine when it was actually sent. * A socket was seen as being able to have requests sent even though it was not encrypted yet. This relates to the previous corruption where data is stored inside the socket's buffer and then sent later. The included auto test produces all fixed corruptions, I detected no regressions via the other tests. This code also adds a bit of sanity checking to protect from possible further problems. [ChangeLog][QtNetwork] Fix HTTP(s) upload corruption when server closes connection (cherry picked from commit qtbase/cff39fba10ffc10ee4dcfdc66ff6528eb26462d3) Change-Id: I9793297be6cf3edfb75b65ba03b65f7a133ef194 Reviewed-by: Richard J. Moore <rich@kde.org>
* Update copyright headersAkseli Salovaara2015-03-31166-2157/+2157
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Ignore expired certificate during certificate validationAndy Shaw2015-01-141-19/+12
| | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked and adapted from qtbase/0065b55da42b8c6ee0095264b5275fb708887c9d) Change-Id: I2515d79a442bec96734ea88ea850e6e8c2123a6c Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix minor compiler warningKevin Funk2014-11-271-1/+1
| | | | | Change-Id: Ifb0e8c7998ca2b4cba9ce4a34655614d7cefb860 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Windows native socket: handle WSAENETRESET the same as WSAECONNRESETShawn Rutledge2014-10-221-1/+1
| | | | | | | | Backported from Qt 5. Task-number: QTBUG-41934 Change-Id: I4cebfb4b5f6e400b54cab3271af4411becd91b9f Reviewed-by: Richard J. Moore <rich@kde.org>
* refactor disconnectFromFtp to remove cached entries when necessaryMatt Broadstone2014-08-182-12/+15
| | | | | | | | | | | | | | | | | In cases where a cached ftp connection fails to connect, or a file transfer has failed, we should removed the cached connection. Since qnam has an idea of a single internal QFtp per full operation, when file transfers failed previously the cached connection would be reused for subsequent connections and thus fail. [ChangeLog][QtNetwork][QNetworkAccessManager] QNetworkAccessManager now properly handles FTP transfer failures by removing failed cached ftp connections. Task-number: QTBUG-40797 (cherry picked and adapted from qtbase/45cbbe56bc13216b83215ea148590eccf81f420a) Change-Id: Ie9eec5ec54af16a8d19e34d04bdd993cc7bbd0f5 Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove use of 'register' from Qt.Kevin Funk2014-08-112-5/+5
| | | | | | | | | | | | | | | It is deprecated and clang is warning about it [-Wdeprecated-register]. Original patch from Stephen Kelly, see commit d9fb6e6dbb2b322556d581265da2442e3b91a6a3 in qt5/qtbase This is a backport of this commit + additional manual replacements in header files. There are still some 'register' uses inside implementation files left, but headers are all 'register'-free now. Change-Id: I7225381df1f093073583d62fa86f7bd7cca869c7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix at lot of QT_NO_ define guards for very tiny Qt builds.Robert Griebl2014-08-058-0/+48
| | | | | Change-Id: If33639be245a1ad3782e1fde279371f330a988be Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QSslCertificate: blacklist NIC certificates from IndiaPeter Hartmann2014-07-101-0/+4
| | | | | | | | | | | | Those intermediate certificates were used to issue "unauthorized" certificates according to http://googleonlinesecurity.blogspot.de/2014/07/maintaining-digital-certificate-security.html , and are by default trusted on Windows, so to be safe we blacklist them here. (backport of commit 916c9d469bd0df227dc3be97fcca27e3cf58144f) Change-Id: I22c6637895dcd21b1f7af73fdd5ca39d4747cf9e Reviewed-by: Richard J. Moore <rich@kde.org>
* network internals: do not try to cache a deleted entryPeter Hartmann2014-06-182-0/+12
| | | | | | | | | | | We were keeping a dangling pointer to a non-existent QIODevice around which would lead to a crash. This is not reproducible in Qt5 anymore. Task-number: QTBUG-17400 Change-Id: I19af701a42e48c05d04dec18eca9f1bfc7e1f4bb Reviewed-by: Richard J. Moore <rich@kde.org>
* Doc: be more explicit about need to set expected SSL cert in errorsArnaud Bienner2014-06-022-2/+4
| | | | | | | | | Note added in QNetworkReply and QSslSocket documentation. Task-number: QTBUG-16770 Change-Id: I2dd8cfb913ec29a96b5465a905cd213713b8d537 Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from qtbase/34590e84d4aaceb5874d8acb6a2b7a95c153cd6a)
* Updated year in copyright headerKai Koehne2014-03-26164-164/+164
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* network: fix doc typo in QNetworkConfigurationManagerPeter Hartmann2014-03-131-1/+1
| | | | | | | (cherry picked from commit 32794abe722161e1224920865c77c37d74ab977b) Change-Id: Icc66ac3fef52508abda85bafe225fc93f4eb9d4c Reviewed-by: Richard J. Moore <rich@kde.org>
* Prevent spurious SSL errors from local certificates.Richard J. Moore2014-03-131-3/+0
| | | | | | | | | | | | | | | | | | | 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. Backport of 7c8131763de9e70ca56f16635716e7e00559b5d1 Task-number: QTBUG-33228 Task-number: QTBUG-7200 Task-number: QTBUG-24234 Change-Id: I65db8b658df9ff86095381c7b87d690258f03c3a Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* QDeclarativeTypeLoader doesn't close processed QNetworkRepliesFrantisek Vacek2014-02-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | backport of Qt5 patch https://codereview.qt-project.org/#change,76825 This bug causes that Cascades QML application cannot open more than system ulimit defined number of different asset:///*.qml files. The realFile is ordinary closed in the ~QNetworkReplyFileImpl(), the QDeclarativeTypeLoader::networkReplyFinished() calls reply->deleteLater(). There are tricky situations when event-loop is not entered and too many read already files are waiting for close. This patch close() file when all the data is read. It can be done this way since the QNetworkReplyFileImplnetworkreply is a sequential device. For more info, please, read comments on QTBUG-36032 cherry-pick from: qtbase cc88e6e92c806def34bce8cdcab275934ab646bf Task-number: QTBUG-36032 Change-Id: I896cf9a89c541d743db1ccc11ab853219d844884 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix problem with QNetworkAddressEntry returning a invalid netmask.Christian Strømme2014-02-031-6/+6
| | | | | | | | | | | The ip address should be set before the netmask. The reason for this is that QNetworkAddressEntry::setNetmask() compares the protocol of the netmask and the ip, if they don't match the netmask won't be set. Task-number: QTBUG-33911 Change-Id: Ic344b3653c5dfdc5df912dee16e4dbe069d57d24 (cherry-picked from qtbase commit e82951611c6d965cc8ef9cbf4ee7fbccf615bb3f) Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Correct algorithm for digest auth when using the CONNECT verbBradley Buda2014-01-231-1/+2
| | | | | | | | | | | | | | | | | | QHttpSocketEngine fails to authenticate to an HTTP proxy that is using Digest authentication and the CONNECT method (i.e. when you are tunneling TLS over HTTP). The bug is due to a bad parameter being passed to QAuthenticatorPrivate::calculateResponse - the requestMethod parameter is passed in as "CONNECT " instead of "CONNECT" (note the trailing space). Because an MD5 hash is derived from this method when using the qop="auth" flavor of Digest auth, the hash does not match the expected value and authentication always fails in this configuration. (cherry picked from commit 5cab14b8a1dfbb03e22b10af385fb90900a9f280) Change-Id: Ief025ada714e03d96a316116f6b9f1711ab2a7f7 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* SSL: blacklist ANSSI intermediate certificatePeter Hartmann2013-12-121-0/+2
| | | | | | | | | | ... because it was used to operate a man-in-the-middle proxy. Task-number: QTBUG-35474 (backported from commit 7eecbb07184bc8b2c5e7645af2805ba0a2488082) Change-Id: Ibf15faf0b89fa29a8ca9d9dfeeeab120dd644526 Reviewed-by: Richard J. Moore <rich@kde.org>
* network: fix multi-phased NTLM authenticationPeter Hartmann2013-10-311-2/+3
| | | | | | | | | | | tested manually with internal NTLM proxy. Patch-by: Jonathan Lauvernier <Jonathan.Lauvernier@gmail.com> (cherry picked from commit 338da730e8bc23e227e26b094cba6bb6233c42de) Change-Id: I889056545b60deccf55053c2b41ecb1ea0cba62d Reviewed-by: Richard J. Moore <rich@kde.org>
* QHttpMultiPart: fix data corruption in readData methodPeter Hartmann2013-08-031-1/+2
| | | | | | | | | | | | | | | | When readData() is called repeatedly, we need to keep track which part of the multipart message we are currently reading from. Hereby we also need to take the boundary size into account, and not only the size of the multipart; otherwise we would skip a not completely read part. This would then later lead to advancing the read pointer by negative indexes and data loss. Task-number: QTBUG-32534 Change-Id: Ibb6dff16adaf4ea67181d23d1d0c8459e33a0ed0 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> (cherry picked from qtbase/af96c6fed931564c95037539f07e9c8e33c69529) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: adapt SSL lib file name lookup heuristicsPeter Hartmann2013-07-311-1/+4
| | | | | | | | | | | | | | | | | | I.e. do not try to load file names that are not there anyhow. The code would search for libcrypto.so.1.0.0 and libssl.so.1.0.0, while on QNX the libs are called libcrypto.so and libssl.so, and there are no symlinks with version numbers. This saves ~ 45 ms in real apps (tested with Facebook, Twitter and Foursquare), and ~ 24 ms at app startup in an isolated app without GUI (difference maybe because threads are fighting for CPU or so). Task-number: QTBUG-32548 (backport of commit 69b31f7b657a7ca611ad980c2974597de160598c) Change-Id: I33e1c9e2c490b9c7f94aca06add8dc183cce083d Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: hardcode on-demand SSL root cert loadingPeter Hartmann2013-07-301-0/+2
| | | | | | | | | | | | The c_rehash'ed symlinks are always there on QNX, so no need to check at every app start for the feature. This saves ~ 17ms at each app start. Task-number: QTBUG-32549 (backport of commit 28ff65f4dc67349ff88e4cd161b6bced7e9bf477) Change-Id: Ibcc2b5fee806d4a885657746516f4682df2bfa29 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* HTTP internals: do not access reply that was deleted alreadyPeter Hartmann2013-07-251-0/+3
| | | | | | | | | | ... rather than crashing. Task-number: QTBUG-32404 (cherry picked from commit 78f9f4b4970e6f4155b7cf2e88c6ac540dec47bc) Change-Id: Ibdffcb9f57e841655998cf72d0ee8206b4987aa7 Reviewed-by: Richard J. Moore <rich@kde.org>
* QNetworkProxyFactory: check all the proxy environment variablesAdrien Bustany2013-07-161-2/+17
| | | | | | | | | | | QNetworkProxyFactory used to check only for the http_proxy environment variable in systemProxyForQuery. This patch makes it look as well in https_proxy, ftp_proxy and all_proxy. http_proxy is still used as a fallback value. Change-Id: I7934af70d191cd17dbce3b3789260ae1a8332986 (cherry-picked from qtbase commit a7d1b6419d7503474ed5e02f7fb984e4ad5f9219) Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QNetwork: Check AuthenticationReuseAttribute when using credentials from urlEl Mehdi Fekari2013-06-241-2/+4
| | | | | | | | | Note: This is not needed in Qt5, as the authenticationRequired method in Qt5 has an allowAuthenticationReuse parameter (bool) that is checked before the credentials are used. Change-Id: I5a2734de615a1a96d1fe648bd251850f3b45e167 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Fix various NTLM/Digest multi-threading and usage issuesAron Rosenberg2013-06-202-37/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | - Fix multi-threading bug where NTLM/Digest auth would fail when concurrent requests were on the wire. The fix for this is too not internally share QAuthenticationPrivate pointers, since the challenge values would get overridden in different threads. This was failing because the internal QAuthenticationPrivate members would have been set with the status/values of the current request which would mess up the state of the new request. As currently implemented, the helper functions inside QAuthenticationPrivate can't call detach to implement proper copy on write symantics. - Fix issue where if user was set via constructor, the NTLM domain parsing would not occur. Parsing of DOMAIN\user is now redone if proxy type is determined to be NTLM. Task-number: QTBUG-15472 Task-number: QTBUG-17322 Task-number: QTBUG-18794 Task-number: QTBUG-13063 Task-number: QTBUG-16585 (cherry picked from commit 6ccbfd6ca498da04e4ef02102c4ded9768225b5a) Cherry-picked-by: Peter Hartmann <phartmann@blackberry.com> Change-Id: I58ae6ae362baadfb25eaa7b29556e6e8250d5d95 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* network requests: do not access 1st byte of empty byte arrayPeter Hartmann2013-06-191-1/+2
| | | | | | | | | | | | ... because otherwise this would crash. Apparently there are cases where the header name is empty. Task-number: QTBUG-31667 (cherry picked from commit dd050d35d77e2f6ac37bd1266a843df55848022f) Change-Id: I4c99094d2bad3ebb7cf44f83f9ed6a5f73b73016 Reviewed-by: Richard J. Moore <rich@kde.org>
* QHttpMultipart: reset read pointer when device is resetPeter Hartmann2013-04-271-0/+1
| | | | | | | | | | | ... otherwise we would not read from the beginning when trying to read again. The device is reset when we try to resend a request (e.g. remote host closed etc.). (cherry picked from commit 795468bdc68931a90454bd1c975f7de7ba670e3b) Change-Id: I8d7b3afb64b9cd25ee7c13b78f0b470d9dae3021 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* SSL internals: do not write after shutting down the socketPeter Hartmann2013-04-243-4/+13
| | | | | | | | | | ... but rather throw an error, so the HTTP layer can recover from a SSL shutdown gracefully. In case the other side sent us a shutdown, we tried to send one as well, which results in an error. (backport of commit e145b67fbd54f147dab0f8e460280a9c8533aa7b) Change-Id: I57291a5363cb0f6585dbd6aaa521c748766a1fdf Reviewed-by: Richard J. Moore <rich@kde.org>
* Increase the size of the QHostInfo cache.Richard Moore2013-04-241-2/+2
| | | | | | | | | | | | | This change increases the size of the DNS cache in QHostInfo from 64 entries to 128. Given the figures in the google chrome performance paper http://www.igvita.com/posa/high-performance-networking-in-google-chrome/ this should mean we can cache enough entries to handle 4 tabs at once. (cherry picked from commit fd9013658bab096839154ae6e68adfd1a4e10189) Change-Id: I824aa4127b6067c3ed6a2be3dbc819288ba41d1c Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Allow QHostInfo::lookupHost() with no receiver to warm the DNS cache.Richard Moore2013-04-241-1/+8
| | | | | | | | | | | | This change lets you call QHostInfo::lookupHost() with a null receiver in order to warm up the DNS cache. This allows you to try to get the DNS request in flight early. (cherry picked from commit 4030b6339c3dae4474f60b07700526fccf428b0c) Change-Id: Ieac3c535b8f9b12a2f894510a898b349712e2fce Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* QNX host lookup: do not try to load libresolv.so, it is not therePeter Hartmann2013-04-241-1/+1
| | | | | | | | | | Not trying to load the lib saves 30 - 50ms upon an apps' 1st host lookup. Task-number: QTBUG-30809 (cherry picked from commit b4985215df767c14ddd888cbb2919be3a7617cfd) Change-Id: If7338188c05f7fdf2ff80d06d91e7c7022e0e3d7 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* QNetworkConfigurationManager: check whether app is shutting downPeter Hartmann2013-04-161-1/+4
| | | | | | | | | | | | | | | | | ... before trying to update the configurations. Before, we would check whether the pointer to the QNetworkConfigurationManagerPrivate instance was 0 and in that case construct it. This would mean that this code path was taken "at app shutdown", i.e. when the qAddPostRoutine had already been called but the other statics were still accessed. Note: This is not thread safe, but neither is the rest of the code; making it thread-safe would require additional changes. Task-number: QTBUG-30585 (backport of commit cc028650e590ac49293558099b3fb87720e9793b) Change-Id: Ifaae4d758a10b44bc7f838cdc0d3a1129ed63228 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* SSL code: store SSL parameters for debugging, guarded by definePeter Hartmann2013-03-251-0/+35
| | | | | | | | | | | | | ... so SSL traffic can be decrypted with e.g. tcpdump / Wireshark. For this to work, the define needs to be uncommented and QtNetwork recompiled. This will create a file in /tmp/qt-ssl-keys which can be fed into Wireshark. A recent version of Wireshark is needed for this to work. (cherry-picked from commit 1f180e9690a0a5f6cc849c1988ccda13de1b1e20) Change-Id: I413ffd2494c780f92ccad7e4fdc11b790966e7ce Reviewed-by: Richard J. Moore <rich@kde.org>
* QSslConfiguration: toggle on demand loading of root certs properlyPeter Hartmann2013-03-044-1/+21
| | | | | | | | | | | | | | | | | make sure we keep track of when we can load root certs and when we cannot (we cannot when the developer set the certs explicitly). This is implemented the same way for QSslSocket already, and needs to be duplicated because we have 2 methods for setting CA certificates: one in QSslSocket and one in QSslConfiguration. In addition, adapt the auto test which checks whether setting a default QSslConfiguration works: There is no way to set on demand loading through the API, so it should be enabled by default. Task-number: QTBUG-29103 (backport of commit ce35c0db0d9dd849c736eabaeb57d597186aaa13) Change-Id: Idf15c21092c7727e1080b1c261ce055f30dbcf63 Reviewed-by: Richard J. Moore <rich@kde.org>
* SSL docs: Be more explicit about the threats of ignoring SSL errorsPeter Hartmann2013-02-272-5/+14
| | | | | | | | | ... because almost everybody gets it wrong almost every time. (cherry picked from commit eaa18f306341818165c2ee4fc22750da04d5e45e) Change-Id: I3ca1dfe9723d4d29339c2c0a1ebe421f5929c760 Reviewed-by: Richard J. Moore <rich@kde.org>
* BB10 systemProxyForQuery: query system proxy also for non-URL requestsPeter Hartmann2013-02-122-4/+28
| | | | | | | | | | | | | | | ... like e.g. in QAbstractSocket::connectToHost(). We can set the scheme on the query URL based on well-known ports; even if the port is not well-known, we can just query the URL anyhow and let the netstatus API resolve the right proxy for us. In addition, return early for local schemes like "file" and "qrc". Task-number: QTBUG-29425 (cherry picked from commit 28d526db74c50977215133159e565e7c15fd18e3) Change-Id: I40a4865aa7765aad9145e956c0069e78c54670e7 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* BlackBerry bearer plugin: check whether device is online several timesPeter Hartmann2013-02-031-0/+11
| | | | | | | | | | | | | | | | This is supposed to workaround a race condition in the underlying netstatus API: Sometimes we get an event that the Wifi interface changed, but it is not up, e.g. no gateway (yet). In that case we need to check back (currently: 300 ms) whether the interface has come up or not. This commit can be reverted again once the race condition in the netstatus API has been resolved. Task-number: QTBUG-29421 (cherry picked from commit 3dc47622a469ded1c99397fdedc2053b73d57189) Change-Id: I252c39411340fe3f6af8440a8f21482ca9b6e62d Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* BlackBerry: change SSL root cert folderPeter Hartmann2013-01-141-1/+1
| | | | | | | | | | | Currently /etc/openssl/certs is symlinked to /var/certmgr/web/user_trusted, but this will be changed in the future. /etc/openssl/certs is the folder to be used to read the root certs. (cherry picked from commit 4c8d8a72ec65f409394075ef50401265e495c1dd) Change-Id: I80820374586b5a9038e8b69206b6c9b05f486a07 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-13164-164/+164
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QtNetwork: blacklist two more certificatesMartin Petersson2013-01-051-0/+2
| | | | | | | | | | | | | | | | | The comodogate 72:03:21:05:c5:0c:08:57:3d:8e:a5:30:4e:fe:e8:b0 certificate is a test certificate and the MD5 Collisions was created as a proof of concept deliberately made to be expired at the time of it's creation. Task-number: QTBUG-24654 (cherry picked from commit 4c0df9feb2b44d0c4fcaa5076f00aa08fbc1dda5) Signed-off-by: Peter Hartmann <phartmann@rim.com> Apparently this commit was forgotten to cherry-pick to Qt 4. Change-Id: I86949eaa3c02483b0b66b4a620bfa88aaa9aa99b Reviewed-by: Richard J. Moore <rich@kde.org>
* Centralise handling & ignoring of SIGPIPE in qcore_unix_p.hThiago Macieira2013-01-052-27/+3
| | | | | | | | | | | | We had two instances of this function in the Qt source code, one clearly a copy of the other, so both had the same thread-safety issue. Instead, let's have one copy and have both write_nosignal() and sendto() call them. (cherry-picked from qtbase commit cb7d64170d62c9cda11ced7e5047070af678338b) Change-Id: I0f1354a8e9df8e6b10a02f86a940e3c6d1222087 Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix thread-safety of qt_ignore_sigpipeThiago Macieira2013-01-051-1/+5
| | | | | | | | | | | | | | The testAndSet operation would mean another thread could see the value of 1 and proceed to write(2)/sendto(2) before SIGPIPE had been ignored. If the pipe or socket were already closed by then, a SIGPIPE would be delivered to the application with its default action: terminate. (cherry-picked from qtbase commit 3f970c20f9afd5c9a1cc14d7f69882e13f6aaf1b) Change-Id: I62dc8f5fa14c1dd453d13e4053c642bd78fbc468 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* SSL certificates: blacklist mis-issued Turktrust certificatesPeter Hartmann2013-01-051-0/+3
| | | | | | | | | | | | Those certificates have erroneously set the CA attribute to true, meaning everybody in possesion of their keys can issue certificates on their own. backport of bf5e7fb2652669599a508e049b46ebd5cd3206e5 from qtbase Task-number: QTBUG-28937 Change-Id: Iee57c6f983fee61c13c3b66ed874300ef8e80c23 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix binary incompatibility between openssl versionsShane Kearns2012-12-113-1/+13
| | | | | | | | | | | | | | | OpenSSL changed the layout of X509_STORE_CTX between 0.9 and 1.0 So we have to consider this struct as private implementation, and use the access functions instead. This bug would cause certificate verification problems if a different version of openssl is loaded at runtime to the headers Qt was compiled against. Task-number: QTBUG-28343 Change-Id: I47fc24336f7d9c80f08f9c8ba6debc51a5591258 Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from commit eb2688c4c4f257d0a4d978ba4bf57d6347b15252)
* Fix compile issue with building with openssl and in a namespaceAndy Shaw2012-11-181-7/+11
| | | | | | | Task-number: QTBUG-25207 Change-Id: I20ab722d3fcb74d90d9010c5c7c303f586e0d7c7 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Adding PAC and exclusion list support to BlackBerry Qt proxy implementation.Andrey Leonov2012-11-062-4/+26
| | | | | | | | | The additional proxy functionality is only available starting BPS API version 3.1.1. (cherry picked from commit 4b71432987ca9ff059d04f0e5f567b8eb09717f9) Change-Id: Ia59adf00a15e7b0a8fc124fcbb598c9c7c331358 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* fix bug in QLocalSocket::waitForReadyRead on WindowsJoerg Bornemann2012-11-051-1/+1
| | | | | | | | | | | | | | | | | | We must not close the socket, if there's still data in the read buffer. Also waitForReadyRead must return true, even if the pipe is broken after we've read data. QLocalSocket::readData will close the socket after the buffer has been drained. This fixes the flakiness of tst_QLocalSocket::threadedConnection. In Qt5 large portions of this code has been rewritten and this fix does not apply. Task-number: QTBUG-27816 Task-number: QTQAINFRA-574 Change-Id: I467340d4dbab11056e6720b145a94a87156cb419 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QtNetwork: introduce configure switch to use system proxies by defaultPeter Hartmann2012-11-012-0/+7
| | | | | | | | | | | | This option is opt-in (default: no). When configured with "-system-proxies", Qt automatically picks up the system proxies. (backport of commit f7893223e84db86dcdd860c625663d7006fcdad6) Change-Id: I95c3b17abee0691991a60a386052b4c2989f896c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Implementation of the BlackBerry Qt Proxy support.Andrey Leonov2012-10-143-0/+138
| | | | | | | | | An implementation for BlackBerry devices based on the BPS netstatus API. (backport of qtbase/cf66e41728ae70595365833c9ed00d0e2e6c4200) Change-Id: I155f287274c4d92e0546740b8dbe595ea030b505 Reviewed-by: Peter Hartmann <phartmann@rim.com>