summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2021-06-24 18:57:12 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2021-06-25 06:01:54 +0000
commit43a36dfd81ca5c01b6afe66c1ad3ddf505acae99 (patch)
tree53700b71475226362b762a72cb8f724a1e42e73d /src/plugins
parent773b37fb382059ff1deccc47251a907143b95f27 (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. Pick-to: 6.2 Change-Id: I9f2e7a58631064e573725705882a603e900c7e39 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/tls/schannel/qtls_schannel.cpp11
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 d1eec00234..0666dbc86e 100644
--- a/src/plugins/tls/schannel/qtls_schannel.cpp
+++ b/src/plugins/tls/schannel/qtls_schannel.cpp
@@ -289,8 +289,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;
}
@@ -632,15 +634,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) {
@@ -1323,7 +1320,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,