summaryrefslogtreecommitdiffstats
path: root/src/plugins/tls
Commit message (Collapse)AuthorAgeFilesLines
* De-pessimize QTlsBackendOpenSSL::clearErrorQueue()Marc Mutz2022-05-191-2/+2
| | | | | | | | | | | We don't need to format the error messages into a QString just to clear the error queue. Just looping over q_ERR_get_error() does the trick, too, and isn't less readable. Pick-to: 6.3 Change-Id: Idc42f8c4ae4374d952cb357fca6c0fca0e04d086 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QTlsBackendOpenSSL: don't allocate memory for a QString appendeeMarc Mutz2022-05-171-1/+1
| | | | | | | | Use the QLatin1String overload of QString::append(). Pick-to: 6.3 Change-Id: Id8ddfd72199cfb627c2d6648ce3011979f92094e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1651-1950/+114
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QTlsBackendCertOnlyPlugin: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 Task-number: QTBUG-102886 Change-Id: I0d8d41b095e7633606fe51126789bc6160583fd4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QTlsBackendOpenSSLPlugin: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 Task-number: QTBUG-102886 Change-Id: I4390ba334e6d29c8ad600270d96112251e0392f7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: replace remaining uses of QLatin1String by QLatin1StringViewSona Kurazyan2022-04-215-7/+7
| | | | | | | Task-number: QTBUG-98434 Change-Id: I0bb9d534ee42ccbf7d353e251ef58901a86923b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-218-140/+156
| | | | | | Task-number: QTBUG-98434 Change-Id: Ic235b92377203f7a1429ae7fd784c4a1fa893e9f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-211-7/+5
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I121f87214b77aeab1dfd3e62dc5adaa6255cc0e0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add a test and remove a work-around for a fixed bugEdward Welbourne2022-03-291-7/+0
| | | | | | | | | | | | The ASN.1 parser for a date-time had to check the date-time string was all digits to catch the case of a sign in the month field, which used to be accepted when it should not be. That bug has now been fixed, so remove the work-around and add a second date-time test-case, renaming (and modernising) the existing one for consistency. Task-number: QTBUG-84349 Change-Id: I649c5129312b6865af08b22ba6893cb4e29243f8 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* TLS backend (OpenSSL): add warning messageTimur Pocheptsov2022-03-281-2/+3
| | | | | | | | | To make a failure to load libssl or libcrypto more obvious (so that, for example, failing auto-tests are immediately correctly diagnosed). Pick-to: 6.3 6.2 Change-Id: I2b1874cc6a04005d286382bb9cd28ee3681aa4e4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Short live Q_CONSTINIT!Marc Mutz2022-03-261-3/+3
| | | | | | | | | | | | | | | | | | It expands to the first available of - constinit (C++20) - [[clang::require_constant_initialization]] (Clang) - __constinit (GCC >= 10) Use it around the code (on and near static QBasicAtomic; this patch makes no attempt to find all statics in qtbase). [ChangeLog][QtCore][QtGlobal] Added macro Q_CONSTINIT. Fixes: QTBUG-100484 Change-Id: I11e0363a7acb3464476859d12ec7f94319d82be7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Misc: Do not depend on transitive includesFabian Kosmale2022-03-173-0/+4
| | | | | | | | As a drive-by, remove superfluous includes from qnetworkmanagerservice.h and obey the coding conventions for includes in a few more places. Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix deprecated use of QBA/Q*String::countMårten Nordheim2022-03-153-5/+5
| | | | | | | 'Use size() or length() instead' Change-Id: I284fce29727c4c1ec9ea38a4e8ea13a9e0af5390 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix compiling with C++20 on macOSAllan Sandfeld Jensen2022-02-101-2/+2
| | | | | | | | | | | This code triggers warnings about mixing enums of different types, which breaks compiling with warnings-are-errors. 'bitwise operation between different enumeration types is deprecated' Pick-to: 6.3 6.2 Change-Id: Ib6c19f02f7c7593c9e22da5e648ea1f2f2ae757b Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSslSocket (SecureTransport) add TLS 1.3 ciphersuitesTimur Pocheptsov2022-01-122-0/+78
| | | | | | | | | | | | | | | | | | | At some point we decided to support a custom set of ciphersuites specified by QSslConfiguration (which if you ask me was never a good idea). The law of unforseen consequiences bit us again: since we now give a set of ciphesuites to QSslConfiguration and set ciphesuites from the configuration a socket has, we are limited by the ciphersuites we know about at the moment of 'coding'. Meaning if an SDK was updated and CipherSuite.h later adds more ciphersuites, we miss them and 'don't support them', while we ... actually do. This patch tries to add some more ciphersuites introduced in TLS 1.3 (interesting, SecureTransport does not support TLS 1.3, but TLS 1.3 suites can be used in TLS 1.2 session). Pick-to: 6.2 6.3 5.15 Task-number: QTBUG-99368 Change-Id: I439b63845c4893e5621cffaf3bcaf62e2b643c74 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: link OpenSSL to openssl tls backend instead of QtNetworkFrank Su2022-01-061-2/+11
| | | | | | | | | | | | | TLS backend has become plugins since Qt 6.2. QtNetwork does not need these links anymore. Also removes unnecessary condition since openssl tls backend is enabled only if OpenSSL is enabled. Pick-to: 6.2 6.3 Change-Id: I4cc0422531d567ad015f9648fbb2bcd51f634cb9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* OpenSSL: handle renegotiate errors by comparing certsMårten Nordheim2021-12-022-2/+52
| | | | | | | | | | | | If the certificate didn't change then our trust in it didn't either. Sadly, cannot have an autotest because we don't have any way to facilitate a renegotiation at the moment and with TLS 1.3 not having them at all it's unlikely we ever will. Pick-to: 6.2 5.15 Task-number: QTBUG-92231 Change-Id: Ibaa9b2f627daca05021c574e69526710aacdadae Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Openssl backend: reinsert a missing C in qCDebugMårten Nordheim2021-12-011-1/+1
| | | | | | Pick-to: 6.2 5.15 Change-Id: I2b13d2f88517abea7e015bfba4fe71dcbada86c0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* TLS plugin (OpenSSL): don't use the deprecated functionsTimur Pocheptsov2021-10-214-26/+58
| | | | | | | | | | | If we have OPENSSL_NO_DEPRECATED_3_0 defined. This includes RSA, DSA, EC and DH-related APIs. As of now, we only make sure the code still compiles. Pick-to: 6.2 5.15 Fixes: QTBUG-83733 Change-Id: Id455b851421ce0dcdfb0229fa515ba2b2ed690b1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QOpenSSLBackend: Properly load 3.0 when compiled with 3.0Mårten Nordheim2021-10-151-3/+10
| | | | | | | | | | The naming updated but the version suffix is hardcoded on windows and it was overlooked when work was done to support OpenSSL 3. Fixes: QTBUG-97116 Pick-to: 6.2 5.15 6.2.1 Change-Id: Iec15d772c54ed214940ec5634a0929485478f771 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tls: Fix typos in source code commentsJonas Kvinge2021-10-124-4/+4
| | | | | | Change-Id: Iec42e4d0f3476bd421861a0139731ff89788ee23 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QTlsBackend (OpenSSL) : detect incompatible versionsTimur Pocheptsov2021-10-061-1/+13
| | | | | | | | | | | | | OpenSSL v3 among other nice things brought some nasty crashes (essentially, finally breaking what was already not so nice in 1.x: see, e.g. ASN1_ITEM_free and ASN1_ITEM_ptr that we have to use to free resources allocated by openssl). Let's, at least, not use v3 from Qt built with 1.1.1 and vice versa. Pick-to: 6.2 5.15 Change-Id: If14a2a0ce2189a1b7967b7ab7248d11d0f2fc423 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix loading certificates on Android with OpenSSLMårten Nordheim2021-09-211-2/+3
| | | | | | | | Fixes: QTBUG-96606 Change-Id: Ic2a55fa65c5dc3c057a4da25c218af5a9861410e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 504df6b135d4ac17aa2290e1aa943d216fb7ef55)
* Remove conditioning on Android embeddedEdward Welbourne2021-09-172-2/+2
| | | | | | | | It is no longer handled separately from Android. This effectively reverts commit 6d50f746fe05a7008b63818e77784dd0c99270a1 Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix loading of OpenSSL on macOS versions that ship its own OpenSSLTor Arne Vestbø2021-09-171-0/+5
| | | | | | | | | | | The unversioned libcrypto.dylib that's shipped with macOS 10.15 will result in a crash if loaded, with a message saying that the unversioned library should not be loaded, as it doesn't provide a stable ABI. Task-number: QTBUG-95249 Pick-to: 6.2 5.15 Change-Id: I49325e5d675155e90840cc93623549f725bc77b4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* OpenSSL: Let people opt-in to use TLS 1.3 PSK callbackMårten Nordheim2021-09-081-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a workaround for the workaround... If TLS 1.3 was explicitly chosen and the PSK callback is set then without this patch the callback is never called since, with TLS 1.3, PSK would only be queried once at the start of a connection. It can now be re-enabled with an environment variable. A new API should be added to address the new requirements of PSK with TLS 1.3: For session resumption the connection MUST use the same hash algorithm as in the original session. For new sessions the hash algorithm must be decided ahead of time, or a default will be used (as defined by the standard). A user can also pass along multiple identity+key pairs and the server will pick one it recognizes. This is not something we can currently do with the preSharedKeyAuthenticationRequired callback. [ChangeLog][Network][QSslSocket][OpenSSL] When using TLS 1.3 we suppress the first callback from OpenSSL about pre-shared keys, as it doesn't conform to the past behavior which preSharedKeyAuthenticationRequired provided. With this update you can opt-out of that workaround by setting the QT_USE_TLS_1_3_PSK environment variable Pick-to: 6.2 6.1 5.15 Task-number: QTBUG-95670 Change-Id: Ia7454bbbf394cbcb859de333b371d0890b42a1c3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QSslCertificate(OpenSSL plugin): fix memory leaks in extension 'parser'Timur Pocheptsov2021-09-043-12/+63
| | | | | | | | | | They went unnoticed previously because of lazy evaluation, which is not the case anymore. Fixes: QTBUG-96155 Pick-to: 6.2 5.15 Change-Id: I46026a24b354c1db7c10d84fceae06c4ab7cc0fc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* TLS plugins: Prefix with 'q'Mårten Nordheim2021-08-304-4/+4
| | | | | | | | For consistency with other plugins. Pick-to: 6.2 Change-Id: I45507389a42e645c94f1ca3f32262a2181f282f7 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Rename qt6_add_plugin TYPE option to PLUGIN_TYPEAlexandru Croitor2021-08-064-4/+4
| | | | | | | | | | | | | The intention is to remove TYPE as a keyword completely before 6.2.0 release, but in case if that's not possible due to the large amount of repositories and examples, just print a deprecation warning for now and handle both TYPE and PLUGIN_TYPE. Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: If0c18345483b9254b0fc21120229fcc2a2fbfbf5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Provide new code paths for OpenSSL v3Timur Pocheptsov2021-07-285-157/+275
| | | | | | | | | | | | | | | | With OpenSSL v3 it would be possible to compile-out functions, directly working with entities like RSA, DSA, DH and EC_KEY. For this you have to define OPENSSL_API_COMPAT >= 0x30000000L. This would break QSslKey and QSslContext. To mitigate this potential problem, we switch to the 'generic' API, that works with EVP_PKEY instead. All functionality will be preserved, except inability of QSslKey::handle() to get pointers to RSA, DSA, DH or EC_KEY. Fixes: QTBUG-95122 Pick-to: 6.2 Change-Id: Ic85b48502421c4330cf4877b52850539c855fa74 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDirIterator: add nextFileInfo()Marc Mutz2021-07-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Before this change, next() was the only way to advance the iterator, whether the caller was ultimately interested in just the filePath() (good) or not (bad luck, had to call .fileInfo()). Add a new function, nextFileInfo(), with returns fileInfo() instead. Incidentally, the returned object has already been constructed as part of advance()ing the iterator, so the new function is faster than next() even if the result is ignored, because we're not calculating a QString result the caller may not be interested in. Use the new function around the code. Fix a couple of cases of next(); fileInfo().filePath() (just use next()'s return value) as a drive-by. [ChangeLog][QtCore][QDirIterator] Added nextFileInfo(), which is like next(), but returns fileInfo() instead of filePath(). Change-Id: I601220575961169b44139fc55b9eae6c3197afb4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* doCrypt() - check the error codesTimur Pocheptsov2021-07-231-1/+7
| | | | | | | | | Disabled (moved into the legacy provider) DES-CBC results in a crash, when setting key length. Pick-to: 6.2 6.1 5.15 Change-Id: Ie0b49424f11d8042ebecebfd3b6346263f730551 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Fix incorrect default plugin conditions on WindowsAlexandru Croitor2021-07-221-1/+1
| | | | | | | | | | | | | | The correct variable to check is WIN32 rather than WINDOWS. This affects which plugins get automatically linked in a static Qt build. Amends a3b58a7844f77bd416fad8307f8333ff7c0efacf Amends d385158d5213ef568b7629e2aa4a818016bbffac Pick-to: 6.1 6.2 Fixes: QTBUG-95283 Change-Id: Idf78c78a1029f4d13fb460c07bef3d2669e55b09 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix lcTlsBackend redefined in several places (plugins, static build)Timur Pocheptsov2021-07-208-53/+48
| | | | | | | | With -static build lcTlsBackend was duplicated. Pick-to: 6.2 Change-Id: I20ee0f9c7e2027a7033c9fbae628d0d91672e719 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Schannel: Fix ODR violation in static programsMårten Nordheim2021-07-203-39/+58
| | | | | | | | | The Q_LOGGING_CATEGORY macro defines a function, and for each backend the function would be defined (and defined differently). Pick-to: 6.2 Change-Id: I6522b5e3baf731e5ead0e21da009c970d580fa02 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Hold QSslContext in shared_ptrMarc Mutz2021-07-185-13/+13
| | | | | | | | | | | ... instead of QSharedPointer. QSharedPointer performs twice as many atomic operations per pointer copy as std::shared_ptr, and this is private API, we're not bound by BC constraints, so we can port to the more efficient version. Change-Id: I2e2a02493565a7ca51c86ec0ed66b6ce7c763e41 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* SSL: port QSharedPointer<QSslContext> uses to std-compatible API subsetMarc Mutz2021-07-162-8/+8
| | | | | | | | | | | In preparation of porting to shared_ptr. Add a few strategic moves and remove a rather pointless comment stating the obvious. Change-Id: Ie1c0f3431af79bdb204e00d99323bf9f2d100d0d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Tidy up systemCaCertificates() function in OpenSSL backendEdward Welbourne2021-07-161-18/+11
| | | | | | | | | | | | | | | | | | As pointed out by Marc Mutz in another review, the Android branches of its #if-ery amounted to a complicated no-op, so simplify the #if-ery, add a TODO and then simplify the code thereby freed of the need to accommodate the #if-ery. In the process, initialize a set of filenames with the two filenames that we read certificates from after looping over the set, which might have left those files being read twice. Change-Id: I2ee4ee3c3cf40226ee6a50afd6127fa4a71d2834 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QCryptographicHash: use a std::array to hold result (was: QByteArray)Marc Mutz2021-07-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | The maximum size for a hash result is 64 atm. Even if, and esp when, we'll get to 128 and 256 bytes in the future, there's no reason to use dynamic memory, because the sizes will always be statically known. So use, essentially, a std::array<char, 64> to hold the result internally. Add a bit of convenience API on top to limit impact on the rest of the code and add a few static_asserts that ensure this is large enough. Then give users access to the internal buffer by adding QByteArrayView resultView() const noexcept. The documentation snippet is taken from QString::data(), suitably adjusted. Use resultView() in a few places instead of result(). [ChangeLog][QtCore][QCryptographicHash] Changed to use a statically-sized buffer internally. Added resultView() to access it. Change-Id: I96c35e55acacbe94529446d720c18325273ffd2f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Don't give plugins PUBLIC usage requirements part 2Alexandru Croitor2021-07-152-4/+2
| | | | | | | | | | | | | Plugins shouldn't have public usage requirements. Amends 434ada8dcb6132b3a597ea56b57a66c627f51728 Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: Iffb3def07ea428b1c3c5b9873e259a4d5168b7a1 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Make some lists const and use ranged-for to iterate themEdward Welbourne2021-07-151-8/+9
| | | | | Change-Id: Ib43a9b165deb6f3141700961469acf2eb60862ec Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QSslContext: remove unused fromConfiguration()Marc Mutz2021-07-133-10/+1
| | | | | | | | | | All callers use the shared-ptr version these days. Change-Id: I77e9fc9ccb8a57bfebcad7883e9eaff3780748f0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Don't use a deprecated function if built/linked with OpenSSL v3Timur Pocheptsov2021-07-132-1/+20
| | | | | | | | | | SSL_get_peer_certificate was deprecated in OpenSSL v3 and can be 'compiled-out' using OPENSSL_API_COMPAT. Use SSL_get1_peer_certificate instead. Pick-to: 6.2 Task-number: QTBUG-94596 Change-Id: Iedb2e06e673e981cab79d4bf0147ac6f5f90089a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Diffie-Hellman parameters: remove useless 'fix'Timur Pocheptsov2021-07-093-58/+0
| | | | | | | | | | | | | | The workaround I had implemented based on alpha version of OpenSSL v3 and what developers (OpenSSL) said about DH back then is not going to work in the end - they do remove all DH (struct and related functions) stuff if you set a proper OPENSSL_API_COMPAT level. A proper re-write is required to support OpenSSL v3, but then there is no reason to keep dead useless code. Pick-to: 6.2 Task-number: QTBUG-94596 Change-Id: Iae092dd08148521649a684879d30e190736e1abe Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Dont's use DTLS_MAX_VERSION when setting SSL_CTXTimur Pocheptsov2021-07-091-2/+2
| | | | | | | | | | | It was fixed quite some time ago for TLS counterpart (TLS_MAX_VERSION), but somehow the similar fix was missing for DTLS. OpenSSL v3 deprecated those constants and they can be compiled out by OPENSSL_API_COMPAT. Pick-to: 6.2 Task-number: QTBUG-94596 Change-Id: Ia0246170a003db900c430b2fbfc177caf05a395a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use QCryptographicHash::hash() more widelyMarc Mutz2021-07-071-6/+2
| | | | | | | | | | ... instead of the "usual" rule of three: ctor, addData(), result(). Not only does it generate less code in the caller, it's now also faster. Change-Id: I67c7eeb01f527b90e80a08f60c1c7f2ec1e49dd4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Don't give plugins PUBLIC usage requirementsJoerg Bornemann2021-07-072-3/+2
| | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: Ibc7c2bcd3b6a9dc77df40c4c0c22ff254a80f33d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove ministro codeAssam Boudjelthia2021-07-011-14/+0
| | | | | | | | | | | | | | Since Ministro no longer work on recent Android versions (Android 8+), and it hasn't been maintained and the repos are not updated, the existing code is practically a dead code. [ChangeLog][Android] Remove ministro code since it's been unmaintained and not working with recent Android versions. Task-number: QTBUG-85201 Pick-to: 6.2 Change-Id: I18d7b1e209cba3cfd04674060e9bf39aa5a5510f Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Schannel: Get rid of Windows < 10 codeMårten Nordheim2021-06-251-7/+4
| | | | | | | | | No need to check if we're running on windows 8.1 or above. We always are. Pick-to: 6.2 Change-Id: I9f2e7a58631064e573725705882a603e900c7e39 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* TLS: Mark TLS 1.0, 1.1 and DTLS 1.0 deprecatedMårten Nordheim2021-06-258-7/+70
| | | | | | | | | | | | As per the best practice laid forth in RFC-8996. TLS 1.2 was recommended from 2008 until TLS 1.3 was released in 2018. [ChangeLog][QtNetwork][QSslSocket] TLS 1.0, 1.1 and DTLS 1.0 are now deprecated, as recommended by RFC-8996. Fixes: QTBUG-92880 Change-Id: I90cebcfb07cfce623af7ac9f2b66ce9d02586b54 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>