diff options
author | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2021-06-24 18:57:12 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-25 10:39:56 +0000 |
commit | e642a3456db05c0b58b90621217c0efc1455b1d8 (patch) | |
tree | 65a56c2167cf0787c464eb24e83a77f1abc6e0e8 | |
parent | 84679beee9485ff963131d65fe4ebcf55d95bd14 (diff) |
Schannel: Get rid of Windows < 10 code
No need to check if we're running on windows 8.1 or above.
We always are.
Change-Id: I9f2e7a58631064e573725705882a603e900c7e39
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 43a36dfd81ca5c01b6afe66c1ad3ddf505acae99)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/plugins/tls/schannel/qtls_schannel.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/tls/schannel/qtls_schannel.cpp b/src/plugins/tls/schannel/qtls_schannel.cpp index 2ba0651cba..47b7ff9b8c 100644 --- a/src/plugins/tls/schannel/qtls_schannel.cpp +++ b/src/plugins/tls/schannel/qtls_schannel.cpp @@ -283,8 +283,10 @@ QList<QSsl::SupportedFeature> QSchannelBackend::supportedFeatures() const { QList<QSsl::SupportedFeature> features; +#ifdef SUPPORTS_ALPN features << QSsl::SupportedFeature::ClientSideAlpn; features << QSsl::SupportedFeature::ServerSideAlpn; +#endif return features; } @@ -614,15 +616,10 @@ Required const_reinterpret_cast(Actual *p) } #ifdef SUPPORTS_ALPN -bool supportsAlpn() -{ - return QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows8_1; -} - QByteArray createAlpnString(const QByteArrayList &nextAllowedProtocols) { QByteArray alpnString; - if (!nextAllowedProtocols.isEmpty() && supportsAlpn()) { + if (!nextAllowedProtocols.isEmpty()) { const QByteArray names = [&nextAllowedProtocols]() { QByteArray protocolString; for (QByteArray proto : nextAllowedProtocols) { @@ -1305,7 +1302,7 @@ bool TlsCryptographSchannel::verifyHandshake() #ifdef SUPPORTS_ALPN const auto allowedProtos = configuration.allowedNextProtocols(); - if (!allowedProtos.isEmpty() && supportsAlpn()) { + if (!allowedProtos.isEmpty()) { SecPkgContext_ApplicationProtocol alpn; status = QueryContextAttributes(&contextHandle, SECPKG_ATTR_APPLICATION_PROTOCOL, |