我正在创建自定义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
.
发布评论