diff options
-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, |