今天要给微信小程序提供ajax,但小程序端却显示服务器TLS只是1.0,它要1.2的,如何配置TLS1.2: 首先我们要确定系统是否支持TLS1.2 ,参考如下配置图↓↓↓↓↓↓↓↓↓↓↓↓↓↓ windows server 2003不支持 windows sever 2008R2是支持的。
第一个方法 操作注册表 打开注册表 cmd 运行 regedit 1.找到HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols 然后 右键->新建->项->直接新建TLS 1.2 2.再文件TLS 1.2分别 右键->新建->项->新建Server, Client 3.在新建的Server和Client中都新建如下的项(DWORD 32位值),总共4个 DisabledByDefault [Value = 0] Enabled [Value = 1]
第二种方法 直接导入注册表文件 1.新建文本文件,将一下代码复制进去,后缀改为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\SSL 2.0] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client] “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 “Enable”=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server] “DisabledByDefault”=dword:00000000 “Enable”=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 “Enable”=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server] “DisabledByDefault “=dword:00000000 “Enable”=dword:00000001 2.禁用老SSL配置 打开HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client 配置如下 DisabledByDefault [Value = 0] Enabled [Value = 0] 然后重启系统。
|