summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Fixed build of SSL when using android-no-sdk.Samuel Rødal2013-03-071-3/+5
| | | | | | | | Introduced Q_OS_ANDROID_NO_SDK which makes more sense than Q_OS_LINUX_ANDROID when Q_OS_ANDROID also defines Q_OS_LINUX. Change-Id: Id2aa228b66daffba82776a12c91a264a360afd86 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-061-5/+5
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreen.cpp src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
| * Return -1 as the API documents it for socket issuesLaszlo Papp2013-03-051-5/+5
| | | | | | | | | | | | Task-number: QTBUG-30024 Change-Id: I51498e6d74ab139134abfb94f35647e995319ee8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make QLocalSocket::open set an error when already connectedCorentin Jabot2013-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | When attempting to connect a tcp-based QLocalSocket while it was already connected, the open() (and connectToServer()) method failed silently. That behavior was not helpful and inconsistent with the windows and unix implementations. So an error is now set and error() is emitted Change-Id: I544e81f0a303dd6d5b1869287df860878a8a06c6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make QLocalSocket connectable with open()Corentin Jabot2013-03-055-37/+94
| | | | | | | | | | | | | | | | | | | | | | | | Add getter and setter for handling the server QLocalSocket connects to. Move the connectServer() implementation to QLocalSocket::open so the local socket can be handled transparently as a QIODevice Add a convenient connectToServer(OpenMode) method Change-Id: Ibc8dc33f79903f92daf2d1ca2e64ead2ce39f33e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Introducing the Qt Android portPaul Olav Tvete2013-03-057-12/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> hjk <hjk121@nokiamail.com> Oswald Buddenhagen <oswald.buddenhagen@digia.com> Paul Olav Tvete <paul.tvete@digia.com> Robin Burchell <robin+qt@viroteck.net> Samuel Rødal <samuel.rodal@digia.com> Yoann Lopes <yoann.lopes@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | iOS: network should not link against CoreServices on iOSRichard Moe Gustavsen2013-02-271-1/+5
| | | | | | | | | | Change-Id: Ia3e21a3d73f696f0e77c427bdb263333646c48d3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Giuseppe D'Angelo2013-02-211-4/+4
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-201-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/unix/separate_debug_info.prf src/gui/kernel/qwindow_p.h src/plugins/platforms/cocoa/qcocoacursor.mm tests/auto/tools/moc/tst_moc.cpp Change-Id: Ieb57834c00f961a747ffe51e6eb9fc9612cebccf
| | * Doc: Fixed value descriptions for enum QAbstractSocket::SocketError.Marcel Krems2013-02-181-4/+4
| | | | | | | | | | | | | | | Change-Id: I7ef5ff53ac838a7793852c1eadd9610e630cae43 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | Allow QHostInfo::lookupHost() with no receiver to warm the DNS cache.Richard Moore2013-02-201-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. Change-Id: Icfdd28146479aa534ae9ceb472f75e08aaa39cd2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add an encrypted() signal to QNetworkAccessManager and QNetworkReply.Richard Moore2013-02-1915-0/+107
| | | | | | | | | | | | | | | | | | | | | | Add an encrypted signal to QNAM and QNetworkReply to allow applications to perform additional checks on the certificate chain beyond those done as part of the standard SSL validation. This allows things like certificate change notification to be implemented for QNAM as they can be for QSSLSocket currently. Change-Id: I693e3e6fec8b7040379b7e7f1f819550e6b2617f Reviewed-by: Peter Hartmann <phartmann@rim.com>
* | Add support for intermediate certificates to server sockets.Richard Moore2013-02-195-0/+68
| | | | | | | | | | | | | | | | | | | | Add intermediate certificates to our server sockets, and to our client certs. Change-Id: Ib5aa575473f9e84f337bebe35099506dd7d7e2ba Task-Number: QTBUG-19825 Task-Number: QTBUG-13281 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* | Store the local certificate in a QList.Richard Moore2013-02-194-11/+31
| | | | | | | | | | | | | | | | | | Instead of storing a single QSslCertificate for a the local cert, store a list of them. This will allow us to handle server sockets that use a certificate that is not issued directly from the CA root in future. Change-Id: I9a36b9a99daa9c0bdd17f61b4ce1a7da746f2e96 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-182-5/+14
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qmacstyle_mac.mm Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
| * SSL docs: Be more explicit about the threats of ignoring SSL errorsPeter Hartmann2013-02-162-5/+14
| | | | | | | | | | | | | | ... because almost everybody gets it wrong almost every time. Change-Id: I54938ef094323ba8de02186b585b11b9579f3ca4 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Remove ifdefs for supporting Mac OS <= 10.5Tor Arne Vestbø2013-02-183-24/+5
| | | | | | | | | | | | | | | | Qt5 requires Mac OS 10.6, so we can remove checks such as if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 Change-Id: Iea21727a277291148704ecf9677ed0b68c24920f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-1415-28/+102
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * Remove Nokia from ssl linking exception.Frederik Gladhorn2013-02-116-8/+65
| | | | | | | | | | | | Change-Id: I559d4dd8789a249af855f6fe9bfe013ba1d77132 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix loading of SSL certificate of DER files.BogDan Vatra2013-02-081-4/+10
| | | | | | | | | | | | | | | | | | DER certificates should not be opened as text files, so we only pass the QIODevice::Text flag when the format is QSsl::Pem. Change-Id: I4bad98023c397b967d5beeec0aaa6c414e06fd9c Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix lupdate-warning in qnetworkreplyhttpimpl.cpp.Friedemann Kleint2013-02-061-1/+1
| | | | | | | | | | | | | | | | qnetworkreplyhttpimpl.cpp:666: Cannot invoke tr() like this. Change-Id: I3baf448f2118b108c32dcddc7e408b2b75542eab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Nokia -> Qt ProjectFrederik Gladhorn2013-02-051-1/+1
| | | | | | | | | | Change-Id: Iadd29ee918dc181d2a468f5198e66351c7cb3548 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * fix doc page urlsOswald Buddenhagen2013-02-041-1/+1
| | | | | | | | | | | | | | they are versioned nowadays Change-Id: I839db633e9d7d63c9d445f8e914b529bd7ce60a2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Merge "Merge branch 'release' into stable" into refs/staging/stableSergio Ahumada2013-02-013-7/+7
| |\
| | * Merge branch 'release' into stableSergio Ahumada2013-01-313-7/+7
| | |\ | | | | | | | | | | | | Change-Id: If3aa1b7ed75082eff6e9761ad82c83691135ed60
| | | * Fix some more old references and links to NokiaSergio Ahumada2013-01-283-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-28156 Change-Id: I9ba0d6f1e92103219bec1e61e716b6b2f269a8ad Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | | * Fix socket binding on mingw buildsShane Kearns2013-01-211-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mingw headers lack the IPV6_V6ONLY define, depending where you get them from. Currently the headers provided by mingw-builds are more complete than those from mingw.org itself. I have removed the compile time check, defined the macro if it is undefined, and it should be just a runtime check for if you are running on windows XP you get no dual stack binding. Task-number: QTBUG-28787 Task-number: QTBUG-28971 Task-number: QTBUG-28972 Change-Id: Iafadbb55d367c44ba9f812a24115e65591701b54 Reviewed-by: Ilya Sidorov Reviewed-by: Peter Hartmann <phartmann@rim.com> (cherry picked from commit d3c4296198947162b8d4d27758a6947c7a1a693e)
| * | | substitute fixed version numbers in qdocconf files with variablesOswald Buddenhagen2013-02-011-5/+5
| |/ / | | | | | | | | | | | | | | | Change-Id: Ie57765c10a8e90d6fc74ee5a8fd84bfc7cd8bcf2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | BlackBerry bearer plugin: check whether device is online several timesPeter Hartmann2013-01-311-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 Change-Id: I215ce8aae4848b6e942e77c6425adba90e9cc526 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| * | Fix minor typos in docs, printed messages & commentsSze Howe Koh2013-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Missing apostrophes Change-Id: I3ef5e9d494fb7a37f8e6075f24cd3a274e572c23 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | BB10 systemProxyForQuery: query system proxy also for non-URL requestsPeter Hartmann2013-02-112-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 Change-Id: I900f1ecbac6dd380bb8a77470b39de2c07aa7f6e Reviewed-by: Andrey Leonov <aleonov@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | Try harder to locate external OpenSSL libraries on win32Erik van Pienbroek2013-02-091-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When OpenSSL is built using MSVC then the library names are named ssleay32.dll and libeay32. However, when OpenSSL is built with GCC then different library names are used like libssl-10.dll and libcrypto-10.dll (depending on the version of OpenSSL used) Change-Id: Icb79a5f82d2a511752bfc904f53a58423ce4b86b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | SSL: Use correct signature for SSL_get1_sessionMarcel Krems2013-02-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a compilation error with GCC 4.7 which was introduced in b5652df775efbd1c52eecee5f08e40e600e5d70b In function ‘SSL_SESSION* q_SSL_get1_session(const SSL*)’: invalid conversion from ‘const SSL* {aka const ssl_st*}’ to ‘SSL* {aka ssl_st*}’ [-fpermissive] Change-Id: I909f7fb4295b2019283a7af66a038d4711e5f7cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* | | QtNetwork: give started threads more verbose namingPeter Hartmann2013-02-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i.e. make it obvious that they come from Qt. This helps when debugging and trying to differ user created threads from Qt threads. Change-Id: Idd6804246d6676b17cf15de6b644a5be629aa023 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | SSL: Implement session sharing and use it from QNetworkAccessManagerPeter Hartmann2013-02-0615-214/+527
| | | | | | | | | | | | | | | | | | | | | | | | This improves performance since a network round trip can be avoided. Change-Id: I1aaff7e48ef9638cb137de0f43942c3a4dd2884a Initial-patch-by: Markus Goetz <markus@woboq.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Increase the size of the QHostInfo cache.Richard Moore2013-02-061-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. Change-Id: I34e32e9e0966473591c59ca5f222623a354650d2 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* | | Remove unused variables and functions from the source codeThiago Macieira2013-02-021-1/+0
| | | | | | | | | | | | | | | | | | Change-Id: I5f37414ee4846b4fe774361f49367bc0d5874039 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-297-12/+12
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-287-12/+12
| |\| | | | | | | | | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| | * | Doc: Fix module name formatSze Howe Koh2013-01-257-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2935-139/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* | | Switch to struct timespec everywhere instead of timevalThiago Macieira2013-01-282-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids an extra division by 1000 when getting the current time. This can't overflow, under normal circumstances, even on 32-bit: when adding two values less than 1 billion, the result is less than 2 billion, which is less than 2^31. Change-Id: I6f8e1aadfe2fcf6ac8da584eab4c1e61aee51cbb Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-244-1/+21
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: I4ca87d44129fa5c1d8541cd58b8d62bc69080688
| * | QSslConfiguration: toggle on demand loading of root certs properlyPeter Hartmann2013-01-234-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 Change-Id: I5146128aaa385dfcc0ad1e0ef81a92d9350ec5f2 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-22183-183/+183
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * | Update copyright year in Digia's license headersSergio Ahumada2013-01-18183-183/+183
| | | | | | | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-163-15/+13
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * | 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. Change-Id: Ic037e5075ec7ee50c132fe08dc69abbe585e32e4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Fix compile when verify is already definedAndy Shaw2013-01-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac if AssertMacros.h has already been included then it defines verify which conflicts with the verify static function. Therefore we just undef this if is already defined. Task-number: QTBUG-27316 Change-Id: I5960e504c4efa4fc4ff65ba66bbd7decb33ffc62 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * | Fix socket binding on mingw buildsShane Kearns2013-01-101-14/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mingw headers lack the IPV6_V6ONLY define, depending where you get them from. Currently the headers provided by mingw-builds are more complete than those from mingw.org itself. I have removed the compile time check, defined the macro if it is undefined, and it should be just a runtime check for if you are running on windows XP you get no dual stack binding. Task-number: QTBUG-28787 Task-number: QTBUG-28971 Task-number: QTBUG-28972 Change-Id: Iafadbb55d367c44ba9f812a24115e65591701b54 Reviewed-by: Ilya Sidorov Reviewed-by: Peter Hartmann <phartmann@rim.com>