登录站点

用户名

密码

Windows Server 2008 R2 配置HTTPS TLS1.2

已有 275 次阅读  2021-01-24 00:21

确认当前服务器系统环境

windows2008R2在配置SSL做小程序开发时候提示小程序的TLS版本必须大于等于1.2。当前的系统环境支持如下:

检测你的域名是否安装SSL/TLS

你的域名是否允许https协议访问以及TLS1.2是都被开启,可通过下列网站做验证:
https://www.getssl.cn/sslchecker

Windows Server 2008 R2 添加对TLS1.2的支持

首先打开服务器组策略,命令行输入gpedit.msc,找到ssl配置设置,双击ssl密码套件顺序,选择已启用,并保存。准备工作完成!

将下列代码保存到后缀名为“.reg”的文件中,并双击执行,将下列配置添加到注册表中。

Windows Registry Editor Version 5.00  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols]  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello]  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Client]  
"Enabled"=dword:00000000  
"DisabledByDefault"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Server]  
"Enabled"=dword:00000000  
"DisabledByDefault"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0]  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Client]  
"Enabled"=dword:00000000  
"DisabledByDefault"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server]  
"Enabled"=dword:00000000  
"DisabledByDefault"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0]  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client]  
"DisabledByDefault"=dword:00000001  
"Enabled"=dword:00000000  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]  
"Enabled"=dword:00000000  
"DisabledByDefault"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0]  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]  
"Enabled"=dword:00000000  
"DisabledByDefault"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]  
"Enabled"=dword:00000000  
"DisabledByDefault"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0]  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]  
"Enabled"=dword:00000001  
"DisabledByDefault"=dword:00000000  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]  
"Enabled"=dword:00000001  
"DisabledByDefault"=dword:00000000  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1]  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]  
"DisabledByDefault"=dword:00000000  
"Enabled"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]  
"DisabledByDefault"=dword:00000000  
"Enabled"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2]  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]  
"DisabledByDefault"=dword:00000000  
"Enabled"=dword:00000001  
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]  
"Enabled"=dword:00000001  
"DisabledByDefault"=dword:00000000 

文件执行后,通过快捷键Win+R,在命令框中输入regedit 打开注册表。

打开以下目录:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols
如果看到的结果与下列截图一致,则表示注册表添加成功,TLS1.2已经添加支持。

注意:服务器需要重启才能生效。

分享 举报

发表评论 评论 (2 个评论)

涂鸦板