diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2024-03-11 16:58:24 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2024-03-17 07:55:03 +0000 |
commit | d86a93ba21342997f54f8ff2d7b14e5e42ac3ce3 (patch) | |
tree | dfb329fd6163ce178392e5da5528cbecfff345f1 | |
parent | b45d7cc24cf85bcb4225db57a5282e1b9427cc35 (diff) |
Schannel: fix handling of empty ciphers list
Contrary to OpenSSL the new ciphers support in Schannel
would disallow all ciphers when the list was empty.
The pre-existing behavior was to use the default list.
Amends f7792d2b6d3d1e5dd47a8f6429b817b793bcfb9b
Change-Id: I0e79013ac86261c4afa4affb28cb1838177c12de
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 2d521002ca024b71525036a0a6f5d02bb09b3ed7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 58991ca2ae2b92a96760fb781360caebc6c6fdc8)
-rw-r--r-- | src/plugins/tls/schannel/qtls_schannel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/tls/schannel/qtls_schannel.cpp b/src/plugins/tls/schannel/qtls_schannel.cpp index eba152d159..a244a90ebc 100644 --- a/src/plugins/tls/schannel/qtls_schannel.cpp +++ b/src/plugins/tls/schannel/qtls_schannel.cpp @@ -1145,10 +1145,12 @@ bool TlsCryptographSchannel::acquireCredentialsHandle() } const QList<QSslCipher> ciphers = configuration.ciphers(); - if (!containsTls13Cipher(ciphers)) + if (!ciphers.isEmpty() && !containsTls13Cipher(ciphers)) protocols &= ~SP_PROT_TLS1_3; - QList<CRYPTO_SETTINGS> cryptoSettings = cryptoSettingsForCiphers(ciphers); + QList<CRYPTO_SETTINGS> cryptoSettings; + if (!ciphers.isEmpty()) + cryptoSettings = cryptoSettingsForCiphers(ciphers); TLS_PARAMETERS tlsParameters = { 0, |