summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* QNetworkAccessManager: introduce support for TLS PSKGiuseppe D'Angelo2015-01-2312-0/+116
| | | | | | | | | | | | Expose the same kind of TLS PSK client support we already have set in place for QSslSocket. [ChangeLog][QtNetwork][QNetworkAccessManager] It is now possible to use TLS PSK ciphersuites when using HTTPS (or similar protocols working over SSL). Change-Id: I56a048e9f4f841f886758c781af2867d18538a3e Reviewed-by: Richard J. Moore <rich@kde.org>
* QSslSocket: introduce support for TLS PSK (client side)Giuseppe D'Angelo2015-01-2310-0/+581
| | | | | | | | | [ChangeLog][QtNetwork][QSslSocket] It is now possible to use TLS PSK ciphersuites in client sockets. Task-number: QTBUG-39077 Change-Id: I5523a2be33d46230c6f4106c322fab8a5afa37b4 Reviewed-by: Richard J. Moore <rich@kde.org>
* QSslEllipticCurve: enable NRVO in *Name() methodsMarc Mutz2015-01-211-8/+4
| | | | | | | | | | Make it easier for the compiler to apply the Named Return Value Optimization (NRVO) in the shortName()/longName() functions by not returning different objects in different return statements. Change-Id: I1b6fa7e6121bc1c843378be33499728c56c97f92 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSslEllipticCurve: don't call QSslSocketPrivate::ensureInitialized() in ↵Marc Mutz2015-01-211-4/+0
| | | | | | | | | | | | | const functions Rationale: the case of an invalid QSslEllipticCurve is already dealt with before we'd call ensureInitialized(). But in order to have a non-invalid QSslEllipticCurve, we must have called one of the constructor functions first. There, we already call ensureInitialized(), so we don't need to do it here again. Change-Id: I96bdb5db63ec0165e6b8fac9469b5d81c6b2cdae Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSslEllipticCurve: add missing noexceptMarc Mutz2015-01-212-4/+4
| | | | | Change-Id: I94701ddb78a822adf35aea57f9e171a747745f6b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSslEllipticCurve: remove unneeded includes from headerMarc Mutz2015-01-211-2/+0
| | | | | Change-Id: I66b8b85e6c02b0e53391079d5048017d5e63ac8b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devSimon Hausmann2015-01-215-19/+40
|\
| * Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-215-19/+40
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| | * Doc: Fix typosSze Howe Koh2015-01-191-1/+1
| | | | | | | | | | | | | | | Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * Don't unnecessariy set localAddress in QNativeSocketEngine's nativeBindThiago Macieira2015-01-112-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The outer QNativeSocketEngine::bind() function will call fetchConnectionParameters() as soon as nativeBind() returns, so don't bother copying localAddress. Change-Id: Ice13e507ccb9c575a7d3bdf0b41394f35230b746 Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Optimize QHostAddress::operator== for SpecialAddressThiago Macieira2015-01-091-10/+26
| | | | | | | | | | | | | | | | | | | | | There's no need to allocate memory for the special address. Change-Id: I5f3760565807731ab595e91fc934c21d10df212a Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Fix crash if PAC script retrieval returns a null CFData instanceDaniel Molkentin2015-01-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for CFURLCreateDataAndPropertiesFromResource() does not make this clear but from looking at the CFNetwork implementation and a user stacktrace it appears that this function can return true but not set the data argument under certain circumstances. Change-Id: I48034a640d6f47a51cd5883bbafacad4bcbd0415 Task-number: QTBUG-36787 Patch-By: Robert Knight Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| | * Fix possible crash when passing an invalid PAC URLDaniel Molkentin2015-01-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit checks whether CFURLCreateWithString() succeeded. It does not appear to be possible to enter an empty URL directly in the PAC configuration dialog but I can't rule out the possibility that it could find its way into the settings via some other means. Change-Id: I6c2053d385503bf0330f5ae9fb1ec36a473d425d Patch-By: Robert Knight Task-number: QTBUG-36787 Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| | * Fix crash on Mac OS if PAC URL contains non-URL legal charsDaniel Molkentin2015-01-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macQueryInternal() was retrieving the PAC URL string as-entered by the user in the 'Proxies' tab of the system network settings dialog and passing it to CFURLCreateWithString(). CFURLCreateWithString() returns null if the input string contains non-URL legal chars or is empty. Change-Id: I9166d0433a62c7b2274b5435a7dea0a16997d10e Patch-By: Robert Knight Task-number: QTBUG-36787 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Markus Goetz <markus@woboq.com>
* | | QSslEllipticCurve: add fromLongNameGiuseppe D'Angelo2015-01-216-0/+43
|/ / | | | | | | | | | | | | | | Since the conversion to a long name was already there, also support creation from a long name. Change-Id: Iad712db7447fb0a0a18f600b7db54da5b5b87154 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QTcpServerPrivate: move class definition to the separate headerAlex Trotsenko2015-01-184-39/+118
| | | | | | | | | | | | | | | | This allows further QTcpServer inheritance in library. Also, add protected c'tor for this purpose. Change-Id: I1a5c0cdedd64bcd41b028e09d7752248506296c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add elliptic curve support to QSslAndré Klitzing2015-01-189-9/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add possibility to get length and other information of EC based certificates. Also it is possible to parse those public/private keys from PEM and DER encoded files. Based on patch by Remco Bloemen [ChangeLog][QtNetwork][SSL/TLS support] It is now possible to parse elliptic curve certificates. Change-Id: I4b11f726296aecda89c3cbd195d7c817ae6fc47b Task-number: QTBUG-18972 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Haiku: Make network module compile on HaikuTobias Koenig2015-01-141-0/+5
| | | | | | | | | | | | | | | | | | Add the missing definition for IFF_RUNNING like documented on http://ports.haiku-files.org/wiki/CommonProblems Change-Id: Iea3fa224dc8e7e1e36674026efbb28289d2efa2a Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Avoid double cache lookup in QHostInfoCacheJędrzej Nowacki2015-01-131-2/+1
| | | | | | | | | | Change-Id: If5ef2d2f117fe8c1abdf361f1122e32075e14385 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix authenticated POST/PUT http requests with buffering disabledAllan Sandfeld Jensen2015-01-092-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If reset is disabled then POST and PUT requests can not be authenticated as the upload device can not be reset. There shouldn't be any reason that shouldn't be allowed if the QIODevice given supports resetting. The disableReset feature of QNonContiguousByteDevice is removed as it is not used anywhere else, and is redundant when reset can indicate success or failure. Task-number: QTBUG-43628 Change-Id: If941a98fd3f797872351c10bdca6aa6745dbefea Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | Remove workarounds for RVCT compiler bugsThiago Macieira2015-01-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not try to remove support for RVCT. There has been no report of it working or failing to work, so the status continues to be unknown. In particular, the inline assembly code in atomic_armv[56].h remains in place. This commit only removes workarounds for compiler bugs or bogus warnings, assuming that anyone using this compiler has updated since Qt last tried to use it for Symbian in 2011. Note also how anonymous unions are now part of the language in C++11. Change-Id: Idc4fab092beb31239eb08b7e139bce2602adae81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add missing qdatastream.h includes.Richard J. Moore2015-01-052-0/+3
| | | | | | | | | | Change-Id: I726041ec5e92d371bc5afb9b7f8cb854bfd41451 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-295-6/+12
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/kernel/qplatformsystemtrayicon.cpp src/gui/kernel/qplatformsystemtrayicon.h src/plugins/platforms/xcb/xcb-plugin.pro Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79
| * Report QHostAddress::Any explicitly in qDebug()Thiago Macieira2014-12-281-1/+4
| | | | | | | | | | | | | | | | With toString(), it was printing "0.0.0.0", which is the same as QHostAddress::AnyIPv4, making it difficult to tell the two apart. Change-Id: I4668ec3337c25ddfdc2fa3bbacc83b9d34316b1f Reviewed-by: Richard J. Moore <rich@kde.org>
| * Silence warning in tst_QUdpSocket::multicast for Any+IPv4Thiago Macieira2014-12-241-2/+2
| | | | | | | | | | | | | | | | | | | | QUdpSocket doesn't support binding to QHostAddress::Any and then joining an IPv4 multicat group since QHostAddress::Any is really an IPv6 socket with v6only = false. The test did check this case, but failed to ignore the warning. Change-Id: I62d782408319a6e566e0ff1a6081b706ac1f669c Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix silly mistake: 0 is a valid file descriptorThiago Macieira2014-12-241-1/+1
| | | | | | | | | | Change-Id: I60baa01f0ef9419a73535c761c4722c5abd6f26e Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix include headers for qsslcertificate_qt.cppThiago Macieira2014-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The order is: 1) own header 2) own private header, if any 3) other headers Commit f17d7a124f0fa817a7e1a2dda6f48098432c0dc0 broke the order. Change-Id: I7225024691db91fd936a057accdad65bacb3f979 Reviewed-by: Richard J. Moore <rich@kde.org>
| * QNetworkDiskCache: Do not store set-cookie headers of the response in disk ↵Jeongmin Kim2014-12-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | cache. The cookies may contain sensitive information. so we should not store cookies in disk cache. Task-number: QTBUG-42546 Change-Id: I6331bdd766445af41f55bfaf0e9132b75dd7957f Reviewed-by: Jeongmin Kim <jm86.kim@lge.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-1815-108/+187
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/platformsupport/platformcompositor/qopenglcompositor.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I5422868500be695584a496dbbbc719d146bc572d
| * Change bugreports.qt-project.org -> bugreports.qt.ioAlex Blasche2014-12-182-2/+2
| | | | | | | | | | | | | | The Qt bug tracker URL changes as part of the qt.io transition Change-Id: Icb4ab198943b93639b5e3a8d99262303785c6459 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Use categorized logging for ssl codeKai Koehne2014-12-1013-106/+185
| | | | | | | | | | | | | | | | | | Place all debug output into the 'qt.network.ssl' category. This allows people to disable certain warnings at runtime. Task-number: QTBUG-43173 Change-Id: Ide731fae3109f9cd7730cc096ee069a5b99d35f1 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-1010-10/+18
|\| | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * WinRT: Only set keepalive socket option in certain socket statesOliver Wolff2014-12-052-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | The keepalive socket can only be set if the socket is not connected (see http://msdn.microsoft.com/en-us/library/ie/windows.networking.sockets.streamsocketcontrol.keepalive) Task-number: QTBUG-38623 Change-Id: Ia40dc66f071a8109538e4be7a8f420de81d5be8d Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
| * QHttpThreadDelegate : Fix QHttpThreadDelegate don't read response data about ↵Jeongmin Kim2014-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Synchronous error reply. The App might use response data of Synchronous 401 reply. (example : specific error info of code, string as json) so, Added a function to read it for Sync. Async is already OK. Sync path is different from Async path. Change-Id: I683d4b6b40f600793d2545811dcd6644515de79c Task-number:QTBUG-43030 Reviewed-by: Jeongmin Kim <jm86.kim@lge.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
| * QNetworkReply::abort will also call finished()Albert Astals Cid2014-12-021-2/+4
| | | | | | | | | | Change-Id: I86e493178bf523c47eed36015354c0fbbebd56d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-276-7/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.4.0 7231e1fbe24102f2a93b34dfa70e3dca884440d2 went into 5.4 instead of the 5.4.0 branch, thus the conflict. Change-Id: I70b8597ab52506490dcaf700427183950d42cbd1
| | * Use camel case in PKCS#12 functionAlejandro Exojo2014-11-246-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it follow the coding style, which says to camel case acronyms too, and makes it consistent with the rest of the class. Change-Id: I4a1b21de1815530e476fc5aa8a0d41c724fc8021 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: hjk <hjk121@nokiamail.com>
* | | Remove support for NTLMv1Kai Koehne2014-12-081-59/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NTLVMv1 is of historic interest only, since even Windows NT 4.0 already supported NTLMv2. NTLVMv1 is also considered to be insecure. Removing the code (that was not compiled in by default anyway) allows us also to get rid of 3rdparty/des. Change-Id: I5a9778f4250e1974c270ee6be539332318c09443 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-0331-263/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QSslEllipticCurve: remove a copy when setting the curvesGiuseppe D'Angelo2014-12-032-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The only reason for copying QSslEllipticCurves into a temporary array would be to be extra-pedantic about type safety, but in the end, we can simply force a cast and remove the copy. Change-Id: Ice8a036fe4b79ba438ce83b5eacf6158eb3f0ce7 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | SSL: let a server choose the most appropriate curve for a clientGiuseppe D'Angelo2014-11-291-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSSL 1.0.2 introduces SSL_CTX_set_ecdh_auto, which allows us to stop using one specific temporary curve, and instead makes the server negotiate the best curve. Task-number: QTBUG-42925 Change-Id: I3a68f29030bdf04f368bfdf79c888401ce82bdd8 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | SSL: Add support for selecting which curves should be used by an elliptic cipherGiuseppe D'Angelo2014-11-2615-1/+812
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QtSSL] It is now possible to choose which elliptic curves should be used by an elliptic curve cipher. Change-Id: If5d0d58922768b6f1375836489180e576f5a015a Done-with: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-248-79/+116
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * | SSL: Fix sslConfiguration in encrypted slotAndré Klitzing2014-11-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If "encrypted" signal is fired the configuration of ssl is not updated. If someone wants to perform additional checks on the certificate chain it is now possible to use peerCertificate and peerCertificateChain. Change-Id: Id5136a8c52727562c36028eaef721cc9ad86619d Task-number: QTBUG-40401 Reviewed-by: Richard J. Moore <rich@kde.org>
| * | Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-213-46/+57
| |\| | | | | | | | | | Change-Id: I95f235a66ce2e9b1fa435c0f911c6f7e811755f0
| | * Fix memcpy with incorrect destinationAndré Klitzing2014-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Variable dsa is assigned in this block with q_DSA_new instead of rsa. So this should be the destination of memcpy. Change-Id: Id5a41d99f1606bf525ad5f819bbc06bb1235bf5b Reviewed-by: Richard J. Moore <rich@kde.org>
| | * WinRT: Fill data in QUdpSocket::readDatagramOliver Wolff2014-11-162-45/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was still a TODO left in there and the data was never filled. In addition to filling the data, some pointer checks for addr and port were added. Task-number: QTBUG-42244 Change-Id: I8e358b5544edcdb4077a52f433e4bc17d92014ce Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
| * | Do not force a content-type on POST request with no contentAllan Sandfeld Jensen2014-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While a POST request with no body may be a pointless thing it does happen on many websites. Currently this causes QtNetwork to print a warning to the console and set an invalid content-type. This patch allows the content-type to be absent when content is. Task-number: QTBUG-42479 Change-Id: Ia84c89147d2469a9421b9694d062c797987b3194 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | OS X and iOS: Search for openssl libs in .app/Contents/FrameworksKai Koehne2014-11-111-0/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows apps to ship their own openssl libraries inside the application bundle. The change consists of two parts: First, adding <bundle>/Contents/Frameworks to the alternative search paths. Second, disabling the preemtive check for libssl.dylib, libcrypto.dylib in the system paths: The system's /usr/lib/libssl.dylib, /usr/lib/libcrypto.dylib will still be picked up as a fallback in the alternative search paths, but only after .app/Contents/Frameworks have been inspected. [ChangeLog][QtNetwork][QSsl] On OS X and iOS, openssl dylib's are picked up from the 'Frameworks' directory of the app bundle. Change-Id: I982930f4a6cf5e0114c04ecbc87f27e54ba8bb88 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
| * Remove incorrect read from QSslSocket::readData()Alex Trotsenko2014-11-061-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | QIODevice makes readData() call only when its read buffer is empty. Also data argument points to the user or reserved read buffer area. So, no need in data transfer from read buffer at this point at all. Task-number: QTBUG-41797 Change-Id: Ieb4afdf7eec37fdf288073e4a060e64424f22b9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 1853579dad1bbb44599314213a1d8a203ecae1c9) Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>