summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-065-8/+75
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * QSslSocket: Update error string in setSocketDescriptor()Kai Koehne2015-08-031-0/+1
| | | | | | | | | | | | Change-Id: I03cd3886c0e2dbb07ef8d37e75df36308ee5fea5 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Richard J. Moore <rich@kde.org>
| * ssl: add support for EC keys to non-OpenSSL backendsJeremy Lainé2015-07-313-1/+70
| | | | | | | | | | | | | | | | Adds basic support for QSslKey reading / writing Elliptic Curve keys on backends other than OpenSSL (i.e. WinRT / SecureTransport for now). Change-Id: I67012dbe6b844a3ed5b22b63e0cdbacf0497a74a Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix SNI for TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLaterAndré Klitzing2015-07-301-6/+3
| | | | | | | | | | | | | | | | | | | | Since SslV3, SslV2 and UnknownProtocol do not support it we can invert the IF clause here. Change-Id: I42e942337d01f3a8c97885b268bffa568e40d335 Task-number: QTBUG-47528 Reviewed-by: Mikkel Krautz <mikkel@krautz.dk> Reviewed-by: Richard J. Moore <rich@kde.org>
| * ssl: fix native parsing of certificates with DSA keysJeremy Lainé2015-07-281-1/+1
| | | | | | | | | | | | | | | | Fixes a typo which breaks the parsing of certificates with DSA public keys when using a non-OpenSSL backend (WinRT, SecureTransport). Change-Id: I250ba9948d5bd7739e281d7cd1b95cfbcb10e402 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | ssl: add openssl-based QSslKeyPrivate::encrypt / decryptJeremy Lainé2015-07-204-9/+86
| | | | | | | | | | | | | | | | | | | | This adds an OpenSSL-based implementation of the QSslKeyPrivate encrypt and decrypt method. This puts both the OpenSSL-based and non-OpenSSL backends (WinRT for now) on par. Change-Id: I18a75ee5f1c223601e51ebf0933f4430e7c5c29b Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | Fix nullptr literal 0s which would look odd as nullptrMarc Mutz2015-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | These all invoke the QFlags<>(Zero *) ctor, which is designed to accept a 0, but no other int. But in doing so, it requires passing a nullptr literal, and 0 is not a nullptr literal accepted under -Wzero-as-null-pointer-constant or similar warnings. Fix by using the QFlags::QFlags() ctor instead. Task-number: QTBUG-45291 Change-Id: I73f9c9f4de11eeb1ba04ace6c7121d17510ea29f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtNetwork: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-1917-28/+28
| | | | | | | | | | | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I9a05d375d2d9d3ed56079ad024c89a08a290619b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a way for auxiliary threads to handle events without CoreAppThiago Macieira2015-07-182-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Long-lived threads started by Qt itself can now receive events even if QCoreApplication hasn't been created. This is required in all threads we start that will handle events, unless we're sure that the thread will exit before the global application object begins destruction. Otherwise, those threads will have race conditions dealing with the event delivery system trying to call the QCoreApplication::notify() virtual while the object is being destroyed. Change-Id: I27eaacb532114dd188c4ffff13d4ad2a4bb443e6 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Revamp the CLOEXEC support in QtThiago Macieira2015-07-171-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The pipe2/dup3/accept4 functions and SOCK_CLOEXEC are quite old nowadays on Linux. They were introduced on Linux 2.6.28 and glibc 2.10, all from 2008. They were also picked up by uClibc in 2011 and FreeBSD as of version 10.0. So we no longer need the runtime detection of whether the feature is available. Instead, if the libc has support for it, use it unconditionally and fail at runtime if the syscall isn't implemented. Change-Id: Ib056b47dde3341ef9a52ffff13efcc39ef8dff7d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-07-174-55/+78
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
| * Define friend functions of QSslEllipticCurve outside of classKai Koehne2015-07-161-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Define both qHash() and operator==() outside of the class, like it is already done for operator!=(). Defining it inside the class limits it to argument-dependent lookup, which in turn means that the lookup rules for operator!= and operator== were slightly different (e.g. if one would compare variables of a type that is implicitly convertible to QSslEllipticCurve). As a side-effect, this also fixes a qdoc warning. Change-Id: I40ab2f8cd2b6b5f42481dd254229a88b678f3f15 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * ssl: improve SecureTransport error loggingJeremy Lainé2015-07-151-42/+45
| | | | | | | | | | | | | | | | | | | | | | This improves SecureTransport logging consistency: - include error code in SSL error when a native backend call fails - use qt.network.ssl category for debug / warning messages - do not use duplicate qWarning when error is already reported via QSslError Change-Id: I52d457b11f0cef2cc3579305e457663b61b92f3f Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| * Make sure to report correct NetworkAccessibilityLorn Potter2015-07-152-8/+19
| | | | | | | | | | | | | | Task-number: QTBUG-46323 Change-Id: Ibdeb3280091a97d785d4314340678a63e88fb219 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * ssl: fix SecureTransport handling of remote host disconnectJeremy Lainé2015-07-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when the remote server disconnects gracefully (for example upon returning an HTTP request with Connection: close) the call to SSLRead will return errSSLCloseGraceful which is incorrectly reported as QAbstractSocket::SslInternalError. This patch aligns the behavior with that of the OpenSSL backend and instead reports QAbstractSocket::RemoteHostClosedError. Change-Id: I8c6679280ac0c6fbd71d5f0d29b25f692eca5b24 Task-number: QTBUG-47154 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Mark QNetworkReplyImplPrivate::InternalNotifications as primitiveMarc Mutz2015-07-161-0/+1
| | | | | | | | | | | | | | Held in QQueue, thus QList. Change-Id: I9d13babb4c08eddbd67ede31da48c0c5f5fdbd5f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QSslSocket: remove code duplicationMarc Mutz2015-07-131-19/+13
| | | | | | | | | | | | | | | | | | | | | | Since findAllLibSsl() and findAllLibCrypto() differ only in the filter passed to QDir::entryList(), so Extract Method findAllLibs(). In the new function, cache the filters QStringList instead of re-create it in every loop iteration. Change-Id: I1bdd05e83fa1f9bb3f47b9b2ae5da9654ec1525b Reviewed-by: Richard J. Moore <rich@kde.org>
* | QSslSocket: use function objects and algorithms when sorting library pathsMarc Mutz2015-07-131-24/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first change is to make libGreaterThan a function object. This allows all compilers to inline the comparison into the sort implementation. The second change is to use QString::splitRef instead of QString::split to extract the components. The third is to extract the element comparison into a function object and replace the rest of libGreaterThan with a suitable call to std::lexicographical_compare, rendering most code comments (present or missing) moot. Change-Id: I3a761d721aa7cf5fa727dcc4ddca4b922f413899 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-0114-204/+159
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * Replace MAC OS X with OS XNico Vertriest2015-06-303-4/+4
| | | | | | | | | | | | Task-number: QTBUG-46374 Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Merge "Merge remote-tracking branch 'origin/5.5.0' into 5.5" into ↵Liang Qi2015-06-2810-197/+152
| |\ | | | | | | | | | refs/staging/5.5
| | * Merge remote-tracking branch 'origin/5.5.0' into 5.5Liang Qi2015-06-2710-197/+152
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.h Manually fixed src/testlib/qtestcase.cpp to return the right type. Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4
| | | * winrt: Fixed connectToHost, which is meant to be synchronousOliver Wolff2015-06-222-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-46339 Change-Id: I413fef39424a0815ef4604000f85ad37ac2b4dc2 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
| | | * QSslSocket: move default cipher, EC and default CA APIs to QSslConfigurationGiuseppe D'Angelo2015-06-117-157/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSslConfiguration is better suited for these APIs. The ones in QSslSocket that already have a counterpart have been deprecated. [ChangeLog][QtNetwork][SSL/TLS Support] Most of the QSslSocket functions to deal with ciphersuites, certification authorities as well as elliptic curves have been deprecated in favor of the corresponding counterparts in QSslConfiguration. Task-number: QTBUG-46558 Change-Id: I1de03379efcbcab931c20e876e252769fe4279e0 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
| | | * Unexport QSslPreSharedKeyAuthenticatorMarc Mutz2015-06-091-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exporting value classes (as opposed to just their non-inline methods) creates subtle binary incompatibility problems. In this case, between C++11 and C++98 builds because of the move assignment operator. Even though it's not a problem in practice, so far, for some types of classes this issue ie real (QVector, say), so it's best to avoid exporting what we don't need to export. Change-Id: Ifca6aaedcbfa79ca35e651de7630e69c3b266fe3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Doc: rearrange tables with overflowNico Vertriest2015-06-261-1/+1
| |/ / | | | | | | | | | | | | | | | Task-number: QTBUG-46475 Change-Id: Id599b2eb0dee0c003475c094ad61700150e37e65 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
| * | fix usage of wince scopeOswald Buddenhagen2015-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | | QtNetwork: make all Q_DECLARE_SHARED types nothrow move-assignableMarc Mutz2015-06-3016-42/+99
| | | | | | | | | | | | | | | Change-Id: Ib29ec4b73a4cdc51074997f7d167c289cf5af7a4 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Use QVector::reserve() all over the place.Sérgio Martins2015-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduces internal memory fragmentation. The search criteria was: QVector::append(), QVector::push_back(), QVector::operator<<() and QVector::operator+=() calls inside for, do and while loops. Statements inside ifs and out of loops weren't considered. Change-Id: Ie5aaf3cdfac938994e6e5dfa5f51de501ed79a0c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Fix inefficient container.values().first()Sérgio Martins2015-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Saves 1 full iteration and 1 memory allocation. Change-Id: I7e521054bd573f30dea2ec166d566ab6ac60eb4e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Also add support for linked OpenSSL without SSL v2 & v3 supportDaniel Molkentin2015-06-282-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | So far, this was only supported for dlopen mode. This adds symmetric defines for the linking case. Change-Id: I9cbfa18e04d041dde0cbd833929782cada9eb812 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | network: Use QList::reserve(), reduces reallocations.Sérgio Martins2015-06-274-3/+11
| | | | | | | | | | | | | | | | | | Change-Id: Ie0e8cbd28802826206d7e92584b5d56bb844fb09 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Define openssl symbol resolution warning function only if necessaryUlf Hermann2015-06-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Without library support we don't try to load any symbols and the function is unused. This results in a compiler warning. Change-Id: I82ad46a478debe48cf9a8311f5e5ec299baa1af8 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | QHttpNetworkHeaderPrivate: use QList<QByteArray>::join()Marc Mutz2015-06-201-10/+2
| | | | | | | | | | | | | | | | | | | | | ...instead of coding the loop by hand. Change-Id: Ieaa066de1ff8552b737cf27cf0d4236efb7296eb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QSpdyProtocolHandler: don't create QLists of key and value just to iterate overMarc Mutz2015-06-191-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just iterate over the QMultiMap directly. Also, now that we use iterators, the remove operation becomes amortized O(1) instead of O(logN). The loop could be even O(N) (clean, not amortized) if QMap had range-erase. Change-Id: I0cf3511adc3a558e551ddd91e47dabcab376001a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QtNetwork: fix warnings when compiling with QT_NO_BEARERMANAGEMENTUlf Hermann2015-06-192-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Resolving d- and q-pointers in code branches where we don't use them is wasteful and leads to compile warnings. Change-Id: Ib5dadd247acfe48722121e0e95ffcac61e7a2e09 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-0317-76/+150
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * | Merge "Merge remote-tracking branch 'origin/5.5.0' into 5.5" into ↵Liang Qi2015-06-023-21/+26
| |\| | | | | | | | | | refs/staging/5.5
| | * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-06-013-21/+26
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/global/qglobal.h Change-Id: I2c0f7544bf194f2d0f59218fd583c822901487b0
| | | * Merge "Merge remote-tracking branch 'origin/5.4.2' into 5.4" into ↵Liang Qi2015-05-291-1/+4
| | | |\ | | | | | | | | | | | | | | | refs/staging/5.4
| | | | * Merge remote-tracking branch 'origin/5.4.2' into 5.4Liang Qi2015-05-291-1/+4
| | | | |\ | | | | | | | | | | | | | | | | | | Change-Id: Ied2a227a25859163a924c7b5717492a1f974c5ca
| | | | | * Avoid false positives from google by storing OpenSSL version as Unicode.Richard J. Moore2015-05-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Google scan play store apps for the openssl version string which leads to false positives since we record the version we were compiled against even though we don't link it directly. Task-number: QTBUG-46265 Change-Id: Iefd0e0954149c17350d49f57f9f374938124d7b8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | | * | | Fix no bearermanagement buildLorn Potter2015-05-291-20/+21
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in the bug, it also fixes API use when configured with no bearermanagement. Task-number: QTBUG-46239 Change-Id: Ief8df85ad6acf61e8d5bb3eed54e7d6ecb84c1a0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * | Prevent bad-ptrs deref in QNetworkConfigurationManagerPrivateMikhail Lappo2015-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent application to crash with segfault in Qt bearer thread. Corrected hardly reproduceable bug, when QNetworkConfigurationManagerPrivate in pollEngines slot dereferenced null and bad pointers and caused crash Task-number: QTBUG-44407 Change-Id: I2f0b11b2d10125a21a62588d76ad824f375e4a1d Reviewed-by: Richard J. Moore <rich@kde.org>
| * | | | Don't assign iterator to const_iteratorSérgio Martins2015-06-021-26/+26
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | It should also be possible to use QT_STRICT_ITERATORS in Qt's own code base Change-Id: I0914db480d4d2b06e71e3a2588163efdd3ff6d27 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | QFtp: Suppress warning about reading from closed QIODevice.Friedemann Kleint2015-05-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear bytesFromSocket when the socket is not open instead of reading in QFtpDTP::socketConnectionClosed(), which is connected to QTcpSocket::disconnected(). Task-number: QTBUG-46112 Change-Id: I0e5e47448f88601eb5c62fe9ba92e1a461323364 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| * | | WinRT: Windows 10 compilation fixMaurice Kalinowski2015-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Header is required for successful compilation. Change-Id: I401b7c6fbc594b3cd0c9a4b25afc8ff918d8bddd Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
| * | | MSVC2015: Compile fixMaurice Kalinowski2015-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q_DECL_NOTHROW needs to be present at the definition as well in VS2015. Change-Id: I8a6def607aa4ae9c9fe64386a38fc1c728edd8d1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * | | Doc: Qt Network: List the classes on SSL Classes pageTopi Reinio2015-05-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I32693ac3012142c04671f8278e06165396ca3242 Task-number: QTBUG-46145 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| * | | WinRT/Winphone: Fix warnings in qtbaseOliver Wolff2015-05-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I41725bcfeee0124b259e96f1e3a261e30f14350a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>