summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-031-1/+1
|\| | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-02-281-5/+5
|\| | | | | | | Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
| * QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' insteadAlexander Akulich2020-02-271-1/+1
| | | | | | | | | | | | | | [ChangeLog][Deprecation Notice] QAbstractSocket::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I11e9c774d7c6096d1e9b37c451cf0b99188b6aad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Revert "QAbstractSocket: deprecate 'error' member-function"Alexander Akulich2020-02-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94b3dd77f29a00ebbd1efdc66d75f57e1c75b152. The patch fixes ambiguity between a getter and a signal by changing the getter name, but we still have to rename the signal to follow the signals naming convention. Revert the commit to keep the getter as is and change the signal name instead. Change-Id: I0dd60cf1ae9d1bd95beeb8ad58661ca4b1fb63b9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-131-1/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * QNetworkAccessManager: deprecate bearer related functionsMårten Nordheim2020-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In Qt6 QNAM will no longer use bearer in any way so we deprecate it now. Also mark bearermanagement-conditioned sections for removal in Qt6, the _q_networksession property is part of how QNAM passes the QNetworkSession around. Task-number: QTBUG-81609 Change-Id: I04aad9dd96482c6822dffba1b9af7aa58961149c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Implement/fix session resumption with TLS 1.3Timur Pocheptsov2020-01-291-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The session we cache at the end of a handshake is non-resumable in TLS 1.3, since NewSessionTicket message appears quite some time after the handshake was complete. OpenSSL has a callback where we can finally obtain a resumable session and inform an application about session ticket updated by emitting a signal. Truism: OpenSSL-only. [ChangeLog][QtNetwork] A new signal introduced to report when a valid session ticket received (TLS 1.3) Fixes: QTBUG-81591 Change-Id: I4d22fad5cc082e431577e20ddbda2835e864b511 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Remove some usage of deprecated QSslCertificate::fromPathMårten Nordheim2020-01-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | The changed function was added in September 2019 in 5.15 branch before the new overload was added and the old one was deprecated, so we can freely change it. Amends 1068d579ee848edf08db5ac611b292c76c30a39b Change-Id: Iff9d72c26ce557c28b188e1754daa03fd061d531 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-131-7/+28
|\| | | | | | | | | | | | | Conflicts: tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: I4d3041fa291a918c774ffa5eb5c8792a0966451d
| * QSslSocket: deprecate sslErrors() getterTimur Pocheptsov2020-01-101-3/+24
| | | | | | | | | | | | | | | | | | | | | | To disambiguate &QSslSocket::sslErrors() expression. Add a new getter - sslHandshakeErrors(). [ChangeLog][Deprecation Notice] QSslSocket::sslErrors() (the getter) was deprecated and superseded by sslHandshakeErrors() Task-number: QTBUG-80369 Change-Id: I9dcca3c8499800c122db230753dc19b07654f8a2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * QAbstractSocket: deprecate 'error' member-functionTimur Pocheptsov2020-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The one that is a getter for the last error found. This is to disambiguate the expression '&QAbstractSocket::error'. Introduce a new member-function socketError as a replacement. [ChangeLog][Deprecation Notice] QAbstractSocket::error() (the getter) is deprecated; superseded by socketError(). Task-number: QTBUG-80369 Change-Id: Ia2e3d108657aaa7929ab0810babe2ede309740ba Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-041-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * Fix some qdoc warningsFriedemann Kleint2020-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/serialization/qjsonvalue.cpp:174: (qdoc) warning: No such parameter 'n' in QJsonValue::QJsonValue() ... examples/widgets/doc/src/icons.qdoc:584: (qdoc) warning: Command '\snippet (//! [24])' failed at end of file 'widgets/icons/mainwindow.cpp' src/corelib/text/qbytearray.cpp:5177: (qdoc) warning: clang found diagnostics parsing \fn QByteArray::FromBase64Result::operator QByteArray() const error: out-of-line definition of 'operator QByteArray' does not match any declaration in 'QByteArray::FromBase64Result' src/corelib/serialization/qjsonarray.cpp:178: (qdoc) warning: Overrides a previous doc src/corelib/serialization/qjsonarray.cpp:140: (qdoc) warning: (The previous doc is here) src/corelib/serialization/qjsonobject.cpp:1016: (qdoc) warning: clang found diagnostics parsing \fn QJsonValueRef QJsonObject::iterator::operator[](int j) const error: out-of-line definition of 'operator[]' does not match any declaration in 'QJsonObject::iterator' src/corelib/serialization/qjsonobject.cpp:1267: (qdoc) warning: clang found diagnostics parsing \fn QJsonValue QJsonObject::const_iterator::operator[](int j) const error: out-of-line definition of 'operator[]' does not match any declaration in 'QJsonObject::const_iterator' src/corelib/tools/qhash.cpp:2641: (qdoc) warning: Overrides a previous doc src/corelib/tools/qhash.cpp:1492: (qdoc) warning: (The previous doc is here) src/corelib/tools/qhash.cpp:2659: (qdoc) warning: Can't link to 'unit()' src/corelib/text/qchar.cpp:274: (qdoc) warning: Undocumented enum item 'Script_Sundanese' in QChar::Script src/corelib/text/qchar.cpp:274: (qdoc) warning: No such enum item 'Script_Sundaneseo' in QChar::Script src/network/ssl/qsslsocket.cpp:1514: (qdoc) warning: Can't link to 'QSslConfiguration::addDefaultCaCertificate()' src/widgets/widgets/qtabwidget.cpp:581: (qdoc) warning: Undocumented parameter 'visible' in QTabWidget::setTabVisible() Change-Id: I05c2a4884873850b684fa94036cd90db1a6e7726 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-161-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket.cpp src/widgets/kernel/qapplication.cpp Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
| | * Doc: Fix qdoc compilation errors qtbaseNico Vertriest2019-12-121-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I6557de598de1931fc30556951d35783d02b83abe Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | QSslSocket (OpenSSL) improve alert messages handlingTimur Pocheptsov2019-12-031-1/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add a new verification callback. This gives an option to report errors directly from this callback (by emitting handshakeInterruptedOnError()). This allows an application to explain to its peer why the handshake was interrupted (by sending a corresponding alert message). 2. This also means we want to notice such alerts (in Qt, from the application's point of view, they are mostly informational only, no interaction is required). So we also introduce a new 'info callback', that can notice alert messages read or written. We also introduce two new enums describing the level and type of an alert message. QSslSocket gets three new signals (for incoming/outgoing alerts and verification errors found early). 3. In case we requested a certificate, but the peer provided none, we would previously abruptly close the connection without a proper alert message (and such a situation is not handled by any verification callbacks, since there is no certificate(s) to verify essentially). So we now introduce a new verification option that maps to what OpenSSL calls 'SSL_VERIFY_FAIL_IF_NO_PEER_CERT'. This way, the proper alert will be generated. Fixes: QTBUG-68419 Change-Id: I5d1e9298b4040a2d4f867f5b1a3567a2253927b8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QSsl - delete all mentions of SslV2 and SslV3Timur Pocheptsov2019-11-281-3/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change the notion of 'unsupported protocol' for QSslSocket, previously it was SslV2 and SslV3, now instead it's all versions of DTLS and UnknownProtocol: - makes no sense at all to connect using TCP socket and then suddenly start using DTLS_client/server_method - UnknownProtocol is not to be set in a configuration, unknown means that some ciphersuite's protocol version cannot be established. - 'disabledProtocols' auto-test becomes 'unsupportedProtocols' and tests that QSslSocket fails to start encryption if the protocol version is wrong. Handling these enumerators (SslV2 and SslV2) as errors not needed anymore. Removed from QSslContext and our existing backends (qsslsocket_whatever). TlsV1SslV3 enumerator is not making any sense at all (previously was [SSL v3, TLS 1.0], then became "the same as TLS v. 1.0", but now this name is very confusing. Removed. Task-number: QTBUG-75638 Task-number: QTBUG-76501 Change-Id: I2781ba1c3051a7791b476266d4561d956948974a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* / QSslSocket: Deprecate add[Default]CaCertificate[s]Mårten Nordheim2019-09-251-6/+41
|/ | | | | | | | | As a separation of concerns the QSslSocket should not be dealing what is QSslConfiguration's job. The other related functions (e.g. setCaCertificates) was deprecated in Qt 5.5. Change-Id: I3f214148adc5270ae651d0b27d83fe374b1516b8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix qdoc warningsFriedemann Kleint2019-09-101-1/+1
| | | | | | | | | | | | | src/corelib/global/qnamespace.qdoc:3279: (qdoc) warning: Can't link to 'QGuiApplication::setHighDdpiScaleFactorRoundingPolicy()' src/corelib/time/qislamiccivilcalendar.cpp:49: (qdoc) warning: Can't link to 'QJijriCalendar' src/network/ssl/qsslsocket.cpp:1510: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/access/qhttp2configuration.cpp:49: (qdoc) warning: '\brief' statement does not end with a full stop. src/gui/text/qtextformat.cpp:532: (qdoc) warning: Undocumented enum item 'TableBorderCollapse' in QTextFormat::Property src/gui/text/qtextdocument.cpp:2066: (qdoc) warning: Undocumented enum item 'UnknownResource' in QTextDocument::ResourceType src/gui/kernel/qguiapplication.cpp:3500: (qdoc) warning: Undocumented parameter 'policy' in QGuiApplication::setHighDpiScaleFactorRoundingPolicy() Change-Id: I3573ef98cf9b58d16525c356270fe009fdffcf45 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-2/+2
| | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QSslSocket: do not bypass the base class' overridesGiuseppe D'Angelo2019-05-141-6/+6
| | | | | | | | | | | | | Change-Id: Ifd0842c70af764827a7e815efbc96da6cad99672 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-161-4/+4
|\ | | | | | | Change-Id: Ief0a0b754c104d5348fee9ee15e967bd37c526f8
| * Fix some qdoc warningsFriedemann Kleint2019-03-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/network/ssl/qsslsocket.cpp:1501: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/ssl/qsslsocket.cpp:1482: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/ssl/qsslsocket.cpp:1513: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/ssl/qsslsocket.cpp:1119: (qdoc) warning: Can't link to 'QSslConfiguration::setDefaultCiphers()' src/network/ssl/qsslsocket.cpp:1119: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCiphers()' src/gui/opengl/qopengltexture.cpp:4137: (qdoc) warning: Can't link to 'setComparisonFunction()' src/widgets/dialogs/qfilesystemmodel.cpp:1215: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/widgets/graphicsview/qgraphicswidget.cpp:1229: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/widgets/graphicsview/qgraphicsscene.cpp:3313: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/gui/painting/qpaintengine_raster.cpp:3438: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/widgets/widgets/qtextedit.cpp:2544: (qdoc) warning: Overrides a previous doc src/widgets/widgets/qplaintextedit.cpp:2932: (qdoc) warning: (The previous doc is here) Change-Id: I0c68c59a87eb6a5d9e974f857af6aca0c6e0672d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Add input check for QSslSocket::setPrivateKeyKonstantin Shegunov2019-03-051-4/+13
|/ | | | | | | | | | | [ChangeLog][QtNetwork][QSslSocket] Added runtime validation of the SSL private key when it is loaded through a file path. Task-number: QTBUG-72016 Change-Id: Ie92c3a2fbf3ba896c4c838e03d677426be56a5db Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QtNetwork: compile with QT_DISABLE_DEPRECATED_BEFORE=0x050d00Christian Ehrlicher2019-02-181-0/+6
| | | | | | | | Don't call or implement functions which are not available when compiling with QT_DISABLE_DEPRECATED_BEFORE=0x050d00 Change-Id: I9e059cfa6d5e70c5672d50d7d4dae7483314ad17 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-081-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * Normalize some SIGNAL/SLOT signaturesJoerg Bornemann2019-02-061-2/+2
| | | | | | | | | | | | | | ...for a minor performance gain. Change-Id: I4bef867055e069926fdc24fa98a6f94b6a0630e2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | QSslSocket: Fix isMatchingHostname when the CN is an IP AddressMårten Nordheim2019-01-281-2/+0
| | | | | | | | | | | | | | Change-Id: Id083c1434fcb3a64af40e6f8df720719c1029ca7 Fixes: QTBUG-73289 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QSslSocket - make ocsp response into ... ocsp responseSTimur Pocheptsov2019-01-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | If later we try to introduce multiple ocsp support, the API returning a single response will be somewhat broken and illogical/not clear how to use at all. Let's return a vector of responses (for now it's one, can change in future). This makes isNull() redundant on a response, also, we now need 'subject' - a cert that response was for. Change-Id: Ibbd9dec163b53906b2fd61fa31c43db7d08adc4d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Ssl: Add support for IP-address in alternate subject nameMårten Nordheim2019-01-241-0/+13
| | | | | | | | | | | | | | | | | | | | While it's not common it still occurs, perhaps especially with 127.0.0.1 Can be tested by attempting to connect to https://1.1.1.1/ using Qt. Change-Id: Idad56476597ab570b8347236ff700fa66ab5b1f4 Fixes: QTBUG-71828 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Add class QOcspResponse, providing a bit more detailsTimur Pocheptsov2019-01-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | about why a certificate was revoked (if it was) and the responder's certificate, if we managed to verify a signature, as was previously shortly discussed in the 'OCSP stapling' patch-set. Auto-test update will be in a separate patch. [ChangeLog][QtNetwork][Ssl] Added class QOcspResponse as a part of OCSP stapling support. Change-Id: I4e17fb6fc4c3dae0b8ad04ff2897a4823736d16e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Schannel supportMårten Nordheim2019-01-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for Schannel, an SSL backend for Windows, as an alternative to OpenSSL. [ChangeLog][QtNetwork][Ssl] Added support for Schannel on Desktop Windows. To build Qt with Schannel support use '-schannel' during configure. Task-number: QTBUG-62637 Change-Id: Ic4fb8ed3657dab994f9f4a4ac5cbddc7001a0a46 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QSsl: do not wait for 'connected'/'encrypted' if a protocol is disabledTimur Pocheptsov2018-12-211-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since we'll refuse to continue with a handshake, failing in initSslContext() on a disabled protocol versions. Then, functions like waitForEncrypted, connectToHostEncrypted, startServerEncryption and startClientEncryption should either bail out early (who needs a TCP connection which we'll abort anyway?) or bail out whenever we can, as soon as a disabled protocol was found in a configuration. This change also makes the behavior of different back-ends consistent, since it's a general code-path that reports the same SslInvalidUserData error. Update auto-test to ... actually test what it claims it tests. Task-number: QTBUG-72196 Task-number: QTBUG-72179 Change-Id: I548468993410f10c07ce5773b78f38132be8e3e0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QSslSocket Doc: Don't refer to obsoleted functionsMårten Nordheim2018-12-141-10/+17
| | | | | | | | | | | | | | | | | | Update references in documentation from the obsoleted/deprecated version because it doesn't make sense here to refer to these versions. Change-Id: I5e9bdf46191e3ba0c7d91855cb3ccc30097cd412 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add a means to specify the protocol type, to aid websockets over proxyAndy Shaw2018-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | When a PAC script is used on macOS, it will only allow connections for http/https, although a proxy can be used for ws/wss. Therefore we need to add a means of setting the protocol type for this sort of connection so that we can pass on the necessary information to the PAC script. Change-Id: I3fa29fa85a529bd88d9565daa58fe9d748b61a92 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Enable OCSP stapling in QSslSocketTimur Pocheptsov2018-12-031-0/+6
|/ | | | | | | | | | | | | | | | This patch enables OCSP stapling in QSslSocket::SslClientMode (OpenSSL back-end only). OCSP stapling is described by RFC6066 and based on the original OCSP as defined by RFC2560. At the moment multiple certificate status protocol is not supported (not implemented in OpenSSL). SecureTransport does not support OCSP stapling at the moment. [ChangeLog][QtNetwork][TLS] Added OCSP-stapling support for OpenSSL backend Task-number: QTBUG-12812 Task-number: QTBUG-17158 Change-Id: Id2e0f4cc861311d1ece462864e5e30c76184af8c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-171-0/+4
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| * Ssl: Fix contrived crash when calling resumeMårten Nordheim2018-10-101-0/+4
| | | | | | | | | | | | | | | | | | | | If you, directly after connecting, call "ignoreSslErrors()" followed by "resume()" then you will most likely crash. It is very contrived and there's no reason to do this. Change-Id: I949a303238f5012296d0e84eb76173764eb9de2e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Ssl: clang-tidy modernize-use-nullptrMårten Nordheim2018-08-091-3/+3
| | | | | | | | | | | | | | | | And reflow the text where it exceeds the 100 column limit. Change-Id: I0d270c6a74a4c6ecba30e4e4d38a5d8f2cf81040 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Extend the feature 'dtls' to handle missing DTLS support in OpenSSLTimur Pocheptsov2018-07-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | OpenSSL has 'no-dtls' configure option (or can be too ancient to properly support it), we shall respect such builds. This patch extends configure.json with a 'dtls' test and adds protection against linkage/compile-time issues in the QtNetwork's code. Change-Id: I0c0dd94f5c226115cee4285b82c83aa546555aea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QSslSocket - bail out early if TLS initialization failsTimur Pocheptsov2018-06-051-0/+23
| | | | | | | | | | | | | | | | | | | | No need to start with 'connectToHost' from 'connectToHostEncrytped' - we will fail to start client encryption later anyway. This can happen if we, for example, fail to resolve some symbols or libraries are missing. Task-number: QTBUG-65142 Change-Id: I0614d5cdf875aaf5b992d8ab6024bcaf3f84b915 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add a new (D)TLS configurationTimur Pocheptsov2018-04-061-1/+60
|/ | | | | | | | | | | | | Namespace QSsl: introduce DtlsV1_0/DtlsV1_2/DtlsV1_2OrLater enumerators into SslProtocol. Implement QSslConfiguration::defaultDtlsConfiguration. Make some functions shared - now not only QSslSocket needs them, but also DTLS-related code. This patch-set also enables protocol-specific set of ciphers (so for DTLS we are using the correct method - 'DTLS_method'). Change-Id: I828fc898674aa3c0a471e8e5b94575bb50538601 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Expand Config to Configuration in method namesEdward Welbourne2018-03-131-1/+1
| | | | | | | | Commit f55c73ede28d4455f555a28e401407326ac9b954 added various backendConfig methods; API review for 5.11 pointed out that Config should not be abbreviated. Change-Id: I3b294b44a030b2a6e4cdd034fa27583c228dfe42 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Introduce QSslConfiguration::backendConfigLars Schmertmann2018-01-261-0/+2
| | | | | | | | With this change it is possible to use all supported configurations in different backends without any new interfaces. Change-Id: Ib233539a970681d30ae3907258730e491f8d3531 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* doc: Add more missing return types to \fn commandsMartin Smith2018-01-241-3/+3
| | | | | | | | Added missing return types to \fn commands and removed some unnecessary \internal comments. Change-Id: Ie6691f83a1c510134d1e83c3d98758360a67217e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-231-1/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-301-1/+13
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowswindow.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
| | * QSslSocket::waitForDisconnected(): flush write buffer before waitingAlex Trotsenko2017-10-271-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, the plain socket might be blocked indefinitely on waiting for socket activity. This issue is tested by tst_QSslSocket::disconnectFromHostWhenConnected() which was unstable in CI. Task-number: QTBUG-64016 Change-Id: I6a1a111dea4d1d1adaf55e6a90c0c5f995a270af Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QSslSocket: implement skip() overloadAlex Trotsenko2017-10-071-0/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | As QAbstractSocket does not handle most cases for this socket type, we should override skip() in QSslSocketPrivate implementation. In unencrypted mode, QSslSocket should forward skipping to the plain socket. If a connection is secure, we just need to check the connection state. Change-Id: I56602c6427b8617e8a9f453809a30fb2914ad798 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>