summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket_openssl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make it compile with openssl 1.0.0d, gcc 4.6Bernhard Rosenkraenzer2011-06-271-0/+4
| | | | | | | | | SSL_ctrl's prototype has changed slightly in openssl 1.0.0x - the 4th argument is now a void* as opposed to a const void*. gcc 4.6 doesn't allow this as an implicit cast. Merge-request: 1239 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Merge remote branch 'origin/4.7' into qt-4.8-from-4.7Jani Hautakangas2011-06-221-2/+2
|\ | | | | | | | | | | | | Conflicts: src/opengl/qgl.cpp src/opengl/qpixmapdata_symbiangl.cpp src/opengl/qwindowsurface_gl.cpp
| * SSL readbuffer 16->32 kBJaakko Koskenkorva2011-06-101-2/+2
| | | | | | | | | | | | | | | | Enlarge SSL readbuffer as per performance testing results. Checked from Shane Kearns that larger buffer is OK. Task-id: http://bugreports.qt.nokia.com/browse/QTBUG-18943 RC id: ou1cimx1#779022
* | Compile fix in network for iosIan2011-06-201-3/+3
| | | | | | | | Reviewed-by: Jørgen Lind
* | Merge remote branch 'origin/4.7' into 4.8-from-4.7Rohan McGovern2011-06-011-2/+2
|\ \ | |/ | | | | | | | | Conflicts: src/declarative/declarative.pro tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
| * Increase SSL readbuffer 1 -> 16 kBJaakko Koskenkorva2011-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | Reading incoming data in Symbian is slow when it is done from the native RSocket in 1kB blocks. Typically other native apps use 16 kB or even 24 kB (browser). This contributes (among other slow tasks such as writing to mass memory) to the TCP window filling up. This case, even though it should be recoverable, has proven to be problematic in some scenarios including downloading from Ovi Store via 3G. The fix just increases the amount of data read, which speeds things up and makes the problematic window fill-up less common. Reviewed-by: Shane Kearns Task-number: QTBUG-18943
| * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | SSL code: introduce new error value for blacklisted certificatesPeter Hartmann2011-04-071-7/+9
| | | | | | | | | | | | | | | | improve error reporting by introducing a new enum value in case the peer certificate is blacklisted. Reviewed-by: Markus Goetz Task-number: QTBUG-18338
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt into earth-masteraxis2011-04-071-0/+7
|\ \ | | | | | | | | | | | | Conflicts: src/corelib/thread/qthread_unix.cpp
| * \ Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-311-0/+7
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
| | * QSslSocket internals: abort on encountering blacklisted certificatesPeter Hartmann2011-03-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | tested manually with "openssl s_server -cert blacklisted.pem -key key.pem" and connecting a QSslSocket. Reviewed-by: Markus Goetz Task-number: QTBUG-18338
* | | SSL: send SNI extension only if not connecting to an IPPeter Hartmann2011-03-221-1/+2
|/ / | | | | | | | | | | | | | | | | otherwise the host name and the name we send in the SNI header (the IP) would not match. Reviewed-by: Thiago Macieira Reviewed-by: Richard J. Moore Task-number: QTBUG-18258
* | Merge remote-tracking branch 'origin/4.7' into HEADThiago Macieira2011-03-161-2/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/symbian-gcce/qmake.conf qmake/generators/metamakefile.cpp qmake/generators/win32/mingw_make.cpp src/corelib/global/global.pri src/corelib/global/qglobal.h src/opengl/qgl.cpp src/opengl/qwindowsurface_gl.cpp src/plugins/platforms/wayland/qwaylandbuffer.h tests/auto/qnetworkreply/tst_qnetworkreply.cpp tools/designer/src/components/formeditor/qdesigner_resource.cpp
| * SSL: Fix certification loading on Mac OS X 10.5Martin Petersson2011-03-141-2/+11
| | | | | | | | | | | | | | Do not add the expired certificates on Mac OS X 10.5. Task-number: QTBUG-14520 Reviewed-by: Markus Goetz
* | SSL: give protocol enum SecureProtocols an own valuePeter Hartmann2011-03-151-2/+4
| | | | | | | | | | | | | | | | ... so that an application that uses SecureProtocols can make use of updates to a Qt version without being recompiled. Reviewed-by: Markus Goetz Reviewed-by: Richard J. Moore
* | SSL backend: avoid setting SNI hostname for old SSL versionsPeter Hartmann2011-03-141-1/+4
| | | | | | | | | | | | | | | | With this patch, we only use SNI functionality when the SSL version supports it (meaning when using TLS), otherwise the function call would trigger a warning. Reviewed-by: Markus Goetz
* | SSL: introduce new option TlsV1SslV3 for SSL communicationPeter Hartmann2011-03-141-1/+6
| | | | | | | | | | | | | | | | | | | | currently there are 3 supported protocols: SSL2, SSL3 and TLS1. SSL2 is considered insecure and should not be used anymore. This commit offers an option to use both TLS1 and SSL3, leaving SSL2 out. Part-of-the-patch-by: Darren Lissimore Reviewed-by: Markus Goetz Task-number: QTBUG-12338
* | SSL backend: check at runtime for the right OpenSSL version for SNIPeter Hartmann2011-03-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | SNI = Server Name Indication. The function "SSL_ctrl()" has been there since always in OpenSSL, but not with the specific enum SSL_CTRL_SET_TLSEXT_HOSTNAME, so let's avoid the call for older versions. Additionally, fix the resolving of SSL_CTX_load_verify_locations for Symbian (is not used in Symbian yet). Reviewed-by: Markus Goetz
* | SSL TLS extension on Symbian: work around missing symbolPeter Hartmann2011-02-281-0/+6
| | | | | | | | | | | | | | ... by defining it ourselves. That symbol is missing in the header files for Symbian. Reviewed-by: Shane Kearns
* | QSslSocket SNI: prefer verificationPeerName then peerName then hostNameDavid Faure2011-02-281-2/+5
| | | | | | | | | | | | | | | | | | As suggested by p--hartmann in a comment for MR 1574. Task-number: QTBUG-1352 Merge-request: 1110 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* | Add Server Name Identification (RFC4366 section 3.1)Daniel Black2011-02-281-0/+10
| | | | | | | | | | | | | | | | ...to client QSslSocket connections when supported by openssl as per task tracker id #188841 Merge-request: 1574 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* | Merge remote branch 'earth/master' into masterJoão Abecasis2011-02-281-10/+24
|\ \ | |/ |/|
| * SSL backend: loat root certificates on demand on Unix (excluding Mac)Peter Hartmann2011-02-231-10/+24
| | | | | | | | | | | | | | | | | | | | Previously, on initializing the first QSslSocket, we read all root certificates into memory (~ 150 files). Now, we tell OpenSSL where to find the root certificates, so that they can be loaded on demand (if supported, see 'man c_rehash' for details). Reviewed-by: Markus Goetz Task-number: QTBUG-14016
* | SSL: fix memory leak when loading certificates on Mac OS XMartin Petersson2011-02-161-0/+1
|/ | | | Reviewed-by: Markus Goetz
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-11-191-2/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: (21 commits) Fixed handling of QInputMethodEvents with nonzero replacementLength. Fixed namespace issues related to epocroot.cpp Corrected ASCII comparison and removed extra braces Add symbian scope for qfiledialog_symbian.cpp Resolve EPOCROOT in qt.conf using same logic as in .pro Make epocroot resolving compatible with more build environments Fix for QtOpenGL RVCT4 compilation error Removed extra cpp and done changes based on comments Correct flags for Symbian file dialogs Fix for WServ 64 crash on Symbian. Use include(original mkspec) instead of copying of mkspec to default Fixed code style of d92cbfc5, reported by git push. Switched qdesktopservices to use SchemeHandler for Symbian^3 and later. Removed unnecessary Q_OS_SYMBIAN flags from qdesktopservices_s60.cpp. Documented usage of dialogs on Symbian Native file dialog on Symbian^3 Add Location as self signable capability in patch_capabilities.pl Localize .loc and .pkg content based on TRANSLATIONS Bump Qt version to 4.7.2. SSL: Fix for systemCaCertificates being called first on symbian ...
| * Merge remote branch 'qt/4.7' into 4.7Jason McDonald2010-11-181-17/+27
| |\ | | | | | | | | | | | | | | | Conflicts: tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
| * | SSL: Fix for systemCaCertificates being called first on symbianShane Kearns2010-11-111-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On symbian, thread names must be unique (actually kernel object names) When a thread exits, there may still be open handles, for example a debugger or RUndertaker so the thread name cannot be reused immediately. S60 has an RUndertaker instance in a background thread, which is used to display the "application closed" messages when a crash happens. Until that thread has run and checked the thread exit to see if it was a crash or not, the thread remains open. When systemCaCertificates is called as the first API call, it calls itself via ensureinitialised() to set the default CA certs. This double call should be addressed by QTBUG-15218. In any case, QSslSocket::systemCaCertificates() is intended to refresh from the system - if application code calls it too quickly in succession it could also trigger this bug. Task-number: QTBUG-15126 Reviewed-by: Markus Goetz
* | | Doc: Fixing typoSergio Ahumada2010-11-161-1/+1
| |/ |/|
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-11-111-17/+27
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Minor adjustments to merge-request 915 Implement brush transformations for directfb. Add FreeBSD's certificate bundle to the certificates list. SSL internals: upon error, read all errors from OpenSSL Added an example for QTest::touchEvent to the documentation. Push and pop the thread-default context for the current thread Fix compilation by s/intptr_t/quintptr/
| * Add FreeBSD's certificate bundle to the certificates list.Raphael Kubo da Costa2010-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The FreeBSD base system does not ship a certificate bundle, but the ca_root_nss port provides one extracted from Mozilla's root CA list. As discussed in QTBUG-14013, it should be preferrable to have bundle files than separate certificate files, so the path for the certificate has been added directly. Signed-off-by: Raphael Kubo da Costa <kubito@gmail.com> Merge-request: 896 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * SSL internals: upon error, read all errors from OpenSSLPeter Hartmann2010-11-111-17/+26
| | | | | | | | | | | | | | | | | | | | | | ... and not only the last one. One call to OpenSSL can produce several errors, which we should always read all. Otherwise, malicious clients could intentionally poison the error queue. Inspired-by: Merge request 2290 Reviewed-by: Olivier Goffart Reviewed-by: Markus Goetz Task-number: QTBUG-14513
* | SSL: Fix crashes/hangs when retrieving CA certificatesShane Kearns2010-11-111-16/+59
|/ | | | | | | | | | | | | | | | | Added error handling to the certificate retrieval thread Made the certificate retrieval thread process critical (so if it crashes the process will crash instead of hang) Filter the certificate list to only fetch CA certificates which are in X.509 format (symbian also allows WAP formats, but Qt does not support these). Put the TPtr8 for asynch function parameter in the class data so it does not go out of scope while the function is in progress. Previously it was on the stack so it could be corrupted before the certificate server had finished using it. Task-number: QTBUG-15005 Task-number: QTBUG-15126 Reviewed-by: Markus Goetz
* Fixed many spelling errors.Rohan McGovern2010-10-251-1/+1
|
* QSslSocket speed up loading of system certificates on Unix (not Mac)Peter Hartmann2010-09-281-8/+29
| | | | | | | | | | ... by only reading in a certificate once. Before, we were adding all files from all directories; since they often contained symlinks, the same certificate was added several times. Reviewed-by: Markus Goetz Reviewed-by: Thiago Macieira Task-number: QTBUG-14013
* QSslSocketPrivate::systemCaCertificates() hangs sometimes on SymbianJuha Turunen2010-09-091-90/+103
| | | | | | | | | | | | | | The patch fixes the hanging issues on some Symbian devices that occurs while retrieving certificates from the Symbian certificate store. The hanging was caused by the certificate info array not being closed before exiting the thread. This alone wouldn't make the existing implementation work, so the patch replaces it with a pure Symbian style implementation which doesn't seem to be affected (probably some OpenC threads issue). Merge-request: 808 Reviewed-by: Shane Kearns Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Task: QTBUG-13033
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-08-101-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (32 commits) Fix memory leak in QtScript variable object doc: Changed some titles so lists of contents sort better. QSslSocket: fix security vulnerability with wildcard IP addresses doc: Some reorganization of top page topic hierarchy. Mac: Fix crash when using style to draw on other things than widgets Doc: Adding radius support for CSS3 and webkit Correct spelling (UNKOWN -> UNKNOWN) to fix recent test regression add performance comparisons to qregexp benchmark configure: fix error message when calling config.status Fix invalid memory write during recursive timer activation Added comment about calendarPopup in setCalendarWidget function documentation. doc: Fixed some qdoc errors. Correcting spelling mistakes in documentation. Part of fix for QTBUG-11938. CreateFileMapping returns NULL on error , only tested with INVALID_HANDLE_VALUE. XmlListModel doc fixes Mention QML_IMPORT_TRACE in Modules docs Merge sections about when property and default state Explain Flipable example further PathView required some diagonal movement before a drag was initiated. doc: Fixed some qdoc errors. ...
| * QSslSocket: fix security vulnerability with wildcard IP addressesPeter Hartmann2010-08-101-0/+5
| | | | | | | | | | | | | | | | | | This fixes Westpoint Security issue with Advisory ID#: wp-10-0001. Before, we would allow wildcards in IP addresses like *.2.3.4 ; now, IP addresses must match excatly. Patch-by: Richard J. Moore <rich@kde.org> Task-number: QT-3704
* | Fix regression with SSL connections failing on symbianShane Kearns2010-08-101-1/+1
|/ | | | | | | | Due to a wrong ifdef sequence, the unix code was being compiled instead of the symbian code for retrieving the system certificates. Task-number: QTBUG-12718 Reviewed-by: Peter Hartmann
* Qt does not build with qt_namespace on macosCarlos Manuel Duclos Vergara2010-07-201-2/+2
| | | | | | | | The problem was that the QT_BEGIN_NAMESPACE was in the wrong place. I moved it 10 lines before and the problem is gone. Task-number: QTBUG-12262 Reviewed-by: Prasanth
* QSslSocket: Improve error handlingPeter Hartmann2010-07-131-1/+13
| | | | | Reviewed-by: Markus Goetz Task-number: QT-3567
* fix build for -no-qt3supportPeter Hartmann2010-07-121-2/+2
| | | | | QString::lower() is QT3_SUPPORT, the correct method is QString::toLower().
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-101-20/+55
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (59 commits) Doc: Cleaning style and adding support for Creator Add NTLMv2 authentication support to QAuthenticator. QIODPLB: Sync behavior of ungetBlock() and ungetChar() QFileIconProvider: Load icons on demand. Doc: fixing offline style Fix handling of SSL certificates with wildcard domain names Doc: fixing examples link doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. SSL library loading: load system libs only once Revert "SSL backend: load libraries for certificates only once" doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. Doc: Adding support for Qt Creator style doc: Fixed last of the declarative/QML qdoc warnings. qdoc: Marked some missing declarative properties and functions as \internal. qhelpgenerator: Fix namespace syntax checking. ...
| * Fix handling of SSL certificates with wildcard domain namesRichard J. Moore2010-07-091-4/+38
| | | | | | | | | | | | Merge-request: 731 Task-number: QTBUG-4455 Reviewed-by: Peter Hartmann
| * SSL library loading: load system libs only oncePeter Hartmann2010-07-091-16/+17
| | | | | | | | | | | | | | | | | | | | ... and make the loading thread-safe. The global methods for loading the OpenSSL libraries and the system libraries are accessed from within different QSslSocket and QSslConfiguration instances, so they need to be thread-safe. Reviewed-by: Markus Goetz
| * Revert "SSL backend: load libraries for certificates only once"Peter Hartmann2010-07-091-22/+20
| | | | | | | | | | | | This reverts commit f2187e31de13a6ab8631a9067487dab555f7c2e7. Reviewed-by: Markus Goetz
| * SSL backend: load libraries for certificates only oncePeter Hartmann2010-07-071-20/+22
| | | | | | | | Reviewed-by: Olivier Goffart
* | Add exception barrier to QCertificateRetriever::RunL()Shane Kearns2010-07-081-3/+8
|/ | | | | | | This translates stl exceptions into Symbian OS Leaves, to prevent an assertion failure in the active scheduler. Reviewed-by: mread
* Support QSslSocket::systemCaCertificates() on SymbianSimon Hausmann2010-07-061-0/+134
| | | | | | | | | Implemented access to the unified certificate store on Symbian with Shane and Peter's help. Task-number: QTBUG-11399 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>