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
.