WINHTTP_OPTION_SECURE_PROTOCOLS
Sets an unsigned long integer value that specifies which secure protocols are acceptable. By default only SSL3 and TLS1 are enabled in Windows 7 and Windows 8. By default only SSL3, TLS1.0, TLS1.1, and TLS1.2 are enabled in Windows 8.1 and Windows 10. The value can be a combination of one or more of the following values.

所以对于 Winhttp 来说,官方给的解释是, TLS1.2 只有在 Win8.1 和 Win 10 上才默认支持

让windows7支持

补丁地址:http://www.catalog.update.microsoft.com/search.aspx?q=kb3140245
下载自己的版本对应的,安装之后重启,然后要设置注册表,以 win7x64 为例:

  1. Windows Registry Editor Version 5.00
  2. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp]
  3. “DefaultSecureProtocols”=dword:00000a00
  4. [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp]
  5. “DefaultSecureProtocols”=dword:00000a00
  6. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings]
  7. “SecureProtocols”=dword:00000a80
  8. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
  9. “SecureProtocols”=dword:00000a80

如果自己添加不来,微软也提供了工具:http://download.microsoft.com/download/0/6/5/0658B1A7-6D2E-474F-BC2C-D69E5B9E9A68/MicrosoftEasyFix51044.msi

运行完成后重启即可。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系贝贝进行处理。
本站默认解压密码:www.hibbba.com