制作小程序时,发现无法通过,ssl证书显示是tls1.0 ,如何windows2008 r2 安装tls1.2呢?今天郑州科技给你讲解下,其实很简单。只需要运行几行命令就行。
windows 2008 R2如何实现tls1.2
1、程序–》运行–》输入 powershell
2、复制下方内容,粘贴到到 powershell 窗口(右键即可粘贴)
# Enables TLS 1.2 on windows Server 2008 R2 and Windows 7
# These keys do not exist so they need to be created prior to setting values.
md
"HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2"
md
"HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server"
md
"HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client"
# Enable TLS 1.2 for client and server SCHANNEL communications
new-itemproperty
-path
"HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server"
-name
"Enabled"
-value
1
-PropertyType
"DWord"
new-itemproperty
-path
"HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server"
-name
"DisabledByDefault"
-value
0
-PropertyType
"DWord"
new-itemproperty
-path
"HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client"
-name
"Enabled"
-value
1
-PropertyType
"DWord"
new-itemproperty
-path
"HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client"
-name
"DisabledByDefault"
-value
0
-PropertyType
"DWord"
# Disable SSL 2.0 (PCI Compliance)
md
"HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server"
new-itemproperty
-path
"HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server"
-name
Enabled
-value
0
-PropertyType
"DWord"
# Enables TLS 1.2 on Windows Server 2008 R2 and Windows 7 # These keys do
3、重启服务器,发现tls升级到1.2版本