summaryrefslogtreecommitdiffstats
path: root/src/plugins/tls/openssl/qtlskey_openssl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* OpenSSL: fix implicit char* to QString constructionMårten Nordheim2025-08-231-2/+2
| | | | | | | | | | | The plugin is not yet built with the constructor disabled, so it is an easy thing to miss. Amends 1493a6e8841dcfb8354f841585ac08ed35e9363b. Change-Id: I4ed5c9ed2282b96b04603a7a8ff07f5964ff5f2d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSsl: Add support for the ML-DSA signature algorithmJan Grulich2025-08-151-7/+56
| | | | | | | | | | | | | | | | | | Introduce support for the post-quantum digital signature algorithm ML-DSA, which is selected by NIST for standardization as part of their post-quantum cryptography (PQC) project. It's designed to be secure against attacks from both classical and future quantum computers and is intended to replace traditional digital algorithms like RSA. The OpenSSL backend now handles the three security levels (ML-DSA-44, ML-DSA-65, and ML-DSA-87) when OpenSSL 3.5 or newer is used or when any provider (like oqsprovider) with ML-DSA support is configured. [ChangeLog][QtNetwork][QSsl] Added support for the ML-DSA signature algorithm. Change-Id: I96fa7e2c95d7c431229816aa9a9a14ebcf46ee40 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* CRA[plugins/tls]: Mark most of it criticalMårten Nordheim2025-07-281-0/+1
| | | | | | | | | | The files all deal with cryptography in one way or another, some more directly than others. Task-number: QTBUG-135730 Pick-to: 6.10 6.9 6.8 Change-Id: If4a7bba92de5f4577876623c403379008008643a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Return generic key from TlsKeyOpenSSL::handleTimur Pocheptsov2023-08-171-1/+1
| | | | | | | | We already return RSA/DSA/DH/EC, so we can also return generic. Fixes: QTBUG-115718 Change-Id: I2064c2bbce2df73985609d27a94857a0ee2e6b42 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | 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>
* Fix deprecated use of QBA/Q*String::countMårten Nordheim2022-03-151-2/+2
| | | | | | | 'Use size() or length() instead' Change-Id: I284fce29727c4c1ec9ea38a4e8ea13a9e0af5390 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Provide new code paths for OpenSSL v3Timur Pocheptsov2021-07-281-38/+98
| | | | | | | | | | | | | | | | 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>
* 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>
* Move plugin code from QtNetwork to qtbase/pluginsTimur Pocheptsov2021-04-221-0/+511
All TLS (and non-TLS) backends that QSsl classes rely on are now in plugins/tls (as openssl, securetransport, schannel and certonly plugins). For now, I have to disable some tests that were using OpenSSL calls - this to be refactored/re-thought. These include: qsslsocket auto-test (test-case where we work with private keys), qsslkey auto-test (similar to qsslsocket - test-case working with keys using OpenSSL calls). qasn1element moved to plugins too, so its auto-test have to be re-thought. Since now we can have more than one working TLS-backend on a given platform, the presence of OpenSSL also means I force this backend as active before running tests, to make sure features implemented only in OpenSSL-backend are tested. OCSP auto test is disabled for now, since it heavily relies on OpenSSL symbols (to be refactored). [ChangeLog][QtNetwork][QSslSocket] QSslSocket by default prefers 'openssl' backend if it is available. [ChangeLog][QtNetwork][QSslSocket] TLS-backends are not mutually exclusive anymore, depending on a platform, more than one TLS backend can be built. E.g., configuring Qt with -openssl does not prevent SecureTransport or Schannel plugin from being built. Fixes: QTBUG-91928 Change-Id: I4c05e32f10179066bee3a518bdfdd6c4b15320c3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>