如何在当前操作系统上编程检测是否支持TLS 1.3

发布于 2025-02-07 17:44:06 字数 990 浏览 2 评论 0 原文

我正在创建自定义UI,以启用/禁用OS级别(Windows)TLS 1.0/1.1/1.2/1.2/1.3的支持。

我需要确定当前的操作系统是否支持不同版本的TLS。我已经看过表描述 version-support“ rel =” nofollow noreferrer”> tls支持,但请按照操作系统版本

识别当前操作系统通常不是确定是否存在特定操作系统功能的最佳方法。[...]而不是使用版本API助手功能来确定操作系统平台或版本号,而是测试功能本身的存在。

我不想在代码中使用硬码特定版本的名称,因此我正在寻找是否支持此特定功能的方法(例如,通过Windows API或类似)。

ps似乎很难检测到实际 Windows 如今,EG Windows Server 2019和Windows Server 2022都将返回 10.0

I am creating custom UI for enabling/disabling the support for TLS 1.0/1.1/1.2/1.3 on OS level (for Windows).

I need to determine whether the current OS supports the different versions of TLS. I've seen the table describing TLS support by Windows version, but following the guideline in Operating System Version:

Identifying the current operating system is usually not the best way to determine whether a particular operating system feature is present.[...] Rather than using the Version API Helper functions to determine the operating system platform or version number, test for the presence of the feature itself.

I don't want to hard code specific version names in my code, so I am looking for way to query whether this particular feature is supported, (e.g. through the Windows API or similar).

P.S. It even seems hard to detect the actual version of the Windows these days, as e.g. both Windows Server 2019 and Windows Server 2022 would return 10.0.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文