74

我对 C# PayTrace 网关有疑问。下面的代码一直运行良好,直到昨天我相信他们由于 Poodle Exploit 而关闭了 SSL3。运行下面的代码时,我们收到以下消息。远程服务器已强制关闭连接。在对问题进行了一些研究后,我们确定因为我们的 IIS Server 7.5 配置为仍然使用 SSL3,所以 C# 默认为 SSL3,PayTrace 会强制关闭连接。然后我们从服务器中删除了 SSL3。然后导致以下错误:

客户端和服务器无法通信,因为它们没有共同的算法。

我的猜测是,既然 SSL 3 被删除,我们需要在服务器上安装额外的 SSL 算法。我们的 IT 人员声称 TLS 1.1 和 TLS 1.2 正在运行,并且 ASP.NET 现在应该默认使用这些。但我觉得我们还必须在服务器上安装其他东西,我不了解 SSL 算法,所以我不知道从哪里开始。

var postUrl = new StringBuilder();

//Initialize url with configuration and parameter values...
postUrl.AppendFormat("UN~{0}|", this.MerchantLoginID);
postUrl.AppendFormat("PSWD~{0}|", this.MerchantTransactionKey);
postUrl.Append("TERMS~Y|METHOD~ProcessTranx|TRANXTYPE~Sale|"); 
postUrl.AppendFormat("CC~{0}|", cardNumber);
postUrl.AppendFormat("EXPMNTH~{0}|", expirationMonth.PadLeft(2, '0'));
postUrl.AppendFormat("EXPYR~{0}|", expirationYear);
postUrl.AppendFormat("AMOUNT~{0}|", transactionAmount);
postUrl.AppendFormat("BADDRESS~{0}|", this.AddressLine1);
postUrl.AppendFormat("BADDRESS2~{0}|", this.AddressLine2);
postUrl.AppendFormat("BCITY~{0}|", this.City);
postUrl.AppendFormat("BSTATE~{0}|", this.State);
postUrl.AppendFormat("BZIP~{0}|", this.Zip);
postUrl.AppendFormat("SADDRESS~{0}|", this.AddressLine1);
postUrl.AppendFormat("SADDRESS2~{0}|", this.AddressLine2);
postUrl.AppendFormat("SCITY~{0}|", this.City);
postUrl.AppendFormat("SSTATE~{0}|", this.State);
postUrl.AppendFormat("SZIP~{0}|", this.Zip);
if (!String.IsNullOrEmpty(this.Country))
{
    postUrl.AppendFormat("BCOUNTRY~{0}|", this.Country);
}
if (!String.IsNullOrEmpty(this.Description))
{
    postUrl.AppendFormat("DESCRIPTION~{0}|", this.Description);
}
if (!String.IsNullOrEmpty(this.InvoiceNumber))
{
    postUrl.AppendFormat("INVOICE~{0}|", this.InvoiceNumber);
}
if (this.IsTestMode)
{
    postUrl.AppendFormat("TEST~Y|");
}

//postUrl.Append();

WebClient wClient = new WebClient();
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
String sRequest = "PARMLIST=" + Url.Encode(postUrl.ToString());
wClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
string sResponse = "";
sResponse = wClient.UploadString(PayTraceUrl, sRequest);

此外,仅供参考,当我们连接到 First Data E4 网关时也会发生此问题,因此这不仅仅是 PayTrace 的事情。我的猜测是,随着更多网关关闭对 SSL3 的访问,我们将继续遇到其他网关的问题,直到可以在服务器上解决此问题。另外,我确实在网上找到了一些建议,一些建议在发出出站请求之前放置以下代码:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;

不幸的是,这也不起作用,同样的错误。这就是为什么我认为需要在 IIS7.5 服务器上安装一些额外的东西。我只是不确定是什么。

4

12 回答 12

107

现在还有其他几篇关于此的帖子,它们都指向启用 TLS 1.2。少一点都是不安全的。

您可以使用补丁在 .NET 3.5 中执行此操作。
您可以在 .NET 4.0 和 4.5 中使用一行代码执行此操作

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // .NET 4.5
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; // .NET 4.0

在 .NET 4.6 中,它自动使用 TLS 1.2。

有关更多详细信息,请参见此处: .NET support for TLS

于 2017-02-08T22:36:13.960 回答
19

在我的情况下,即使项目的目标框架是 4.7.1,我仍然得到同样的错误,解决方案是将 system.web 下的 web.config 中的 httpRuntime 更改为 4.7.1!

于 2018-10-11T15:14:17.040 回答
16

在先前的答案中,建议将这行代码用于 .Net 4.5:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // .NET 4.5

我鼓励您将该值与现有的值进行或,如下所示:

ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12; // .NET 4.5

如果您查看值列表,您会注意到它们是 2 的幂。这样,将来当事情转移到 TLS 2.0 时,您的代码仍然可以工作。

于 2018-06-28T19:15:06.903 回答
8

有两种可能的情况,就我而言,我使用了第二点。

  1. 如果您在生产环境中遇到此问题,并且可以轻松地将新代码部署到生产环境中,那么您可以使用以下解决方案。

    您可以在进行 api 调用之前添加以下代码行,

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // .NET 4.5

  2. 如果您无法部署新代码并且希望使用生产中存在的相同代码解决此问题,则可以通过更改某些配置设置文件来解决此问题。您可以在配置文件中添加其中任何一个。

<runtime>
    <AppContextSwitchOverrides value="Switch.System.Net.DontEnableSchUseStrongCrypto=false"/>
  </runtime>

或者

<runtime>
  <AppContextSwitchOverrides value="Switch.System.Net.DontEnableSystemDefaultTlsVersions=false"/>
</runtime>
于 2020-09-15T19:46:59.747 回答
7

这已解决。事实证明,我们的 IT 人员是正确的。TLS 1.1 和 TLS 1.2 都安装在服务器上。但是,问题在于我们的站点以 ASP.NET 4.0 运行,您必须拥有 ASP.NET 4.5 才能运行 TLS 1.1 或 TLS 1.2。因此,为了解决这个问题,我们的 IT 人员必须重新启用 TLS 1.0 以允许与 PayTrace 建立连接。

所以简而言之,错误消息“客户端和服务器无法通信,因为它们没有共同的算法”,是因为服务器上没有可用的 SSL 协议与 PayTrace 的服务器通信。

更新:请不要在您的服务器上启用 TLS 1.0,这是一个临时修复,不再适用,因为现在有更好的解决方法可以确保强大的安全实践。请参阅已接受的答案以获取解决方案。仅供参考,我将在网站上保留此答案,因为它提供了有关问题所在的信息,请不要投反对票。

于 2014-11-07T21:44:24.653 回答
6

启用 TLS 1.0 也解决了我们的问题(在禁用 SSL v3 之后)。(Server 2012 R2 与 ASP.net 4.0 网站处理针对 PPI 付费服务)。这是我用来按我想要的方式设置所有内容的 RegEdit 脚本。我们只为客户端而不是服务器禁用 SSL v3,因为这样做会破坏我们尚未准备好处理的其他事情。在我们将站点升级到 .Net 4.5.2 之后,我们将再次禁用 TLS 1.0。

此脚本为客户端启用除 SSL v3 之外的所有协议、服务器和客户端。

请务必备份您的注册表!

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"DisabledByDefault"=dword:00000000
于 2015-02-02T20:25:04.200 回答
5

我的应用程序在 .net 4.7.2 中运行。最简单的解决方案是将其添加到配置中:

  <system.web>
    <httpRuntime targetFramework="4.7.2"/>
  </system.web>
于 2020-08-24T20:41:02.683 回答
3

就我而言,我通过在 .Net Framework 中启用最后一个 TLS 版本来解决问题,如本文所述:

https://docs.microsoft.com/it-it/dotnet/framework/network-programming/tls

设置这些注册表项:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] "SystemDefaultTlsVersions"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319] "SystemDefaultTlsVersions"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319] " SchUseStrongCrypto"=dword:00000001
于 2021-10-26T10:18:31.497 回答
2

在搞砸了几天之后,我对我们问题的最终解决需要两件事;

1) 我们将这行代码添加到我们所有的 .Net 库中,这些库向也禁用了 SSL v3 的其他供应商发出绑定 api 调用。

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls; // (.Net 4 and below)

2) 这是您在运行 ASP.Net 4.0 站点时需要的最终和完整的注册表更改,升级到 ASP.Net 4.5 后需要稍作更改。

在我们重新启动服务器后 - 此后所有问题都消失了。

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client]
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client]
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"DisabledByDefault"=dword:00000000
于 2015-02-05T16:57:06.837 回答
2

我通过将应用程序从 .Net Framework 4.5 升级到 4.6.2 来修复此错误。

TLS-1.2 已正确安装在服务器上,并且像 TLS-1.1 这样的旧版本已被禁用。但是,.Net 4.5 不支持 TLS-1.2。

于 2019-11-25T14:00:12.997 回答
2

您需要检查与此相关的几件事。

每当出现与建立安全连接相关的此类错误时,请尝试在 Powershell 中使用机器名称或 uri(如“www.google.com”)运行如下脚本,以获取每个脚本的结果不同的协议类型:

 function Test-SocketSslProtocols {
    
    [CmdletBinding()] 
    param(
        [Parameter(Mandatory=$true)][string]$ComputerName,
        [int]$Port = 443,
        [string[]]$ProtocolNames = $null
        )

    #set results list    
    $ProtocolStatusObjArr = [System.Collections.ArrayList]@()


    if($ProtocolNames -eq $null){

        #if parameter $ProtocolNames empty get system list
        $ProtocolNames = [System.Security.Authentication.SslProtocols] | Get-Member -Static -MemberType Property | Where-Object { $_.Name -notin @("Default", "None") } | ForEach-Object { $_.Name }

    }
 
    foreach($ProtocolName in $ProtocolNames){

        #create and connect socket
        #use default port 443 unless defined otherwise
        #if the port specified is not listening it will throw in error
        #ensure listening port is a tls exposed port
        $Socket = New-Object System.Net.Sockets.Socket([System.Net.Sockets.SocketType]::Stream, [System.Net.Sockets.ProtocolType]::Tcp)
        $Socket.Connect($ComputerName, $Port)

        #initialize default obj
        $ProtocolStatusObj = [PSCustomObject]@{
            Computer = $ComputerName
            Port = $Port 
            ProtocolName = $ProtocolName
            IsActive = $false
            KeySize = $null
            SignatureAlgorithm = $null
            Certificate = $null
        }

        try {

            #create netstream
            $NetStream = New-Object System.Net.Sockets.NetworkStream($Socket, $true)

            #wrap stream in security sslstream
            $SslStream = New-Object System.Net.Security.SslStream($NetStream, $true)
            $SslStream.AuthenticateAsClient($ComputerName, $null, $ProtocolName, $false)
         
            $RemoteCertificate = [System.Security.Cryptography.X509Certificates.X509Certificate2]$SslStream.RemoteCertificate
            $ProtocolStatusObj.IsActive = $true
            $ProtocolStatusObj.KeySize = $RemoteCertificate.PublicKey.Key.KeySize
            $ProtocolStatusObj.SignatureAlgorithm = $RemoteCertificate.SignatureAlgorithm.FriendlyName
            $ProtocolStatusObj.Certificate = $RemoteCertificate

        } 
        catch  {

            $ProtocolStatusObj.IsActive = $false
            Write-Error "Failure to connect to machine $ComputerName using protocol: $ProtocolName."
            Write-Error $_

        }   
        finally {
            
            $SslStream.Close()
        
        }

        [void]$ProtocolStatusObjArr.Add($ProtocolStatusObj)

    }

    Write-Output $ProtocolStatusObjArr

}

Test-SocketSslProtocols -ComputerName "www.google.com"

它将尝试建立套接字连接并为每次尝试和成功连接返回完整的对象。

看到返回的内容后,通过 regedit 检查您的计算机注册表(将“regedit”放入运行或查找“注册表编辑器”),放置

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL

在文件路径中,并确保为您尝试连接的任何服务器启用了适当的 TLS 协议(根据您从脚本返回的结果)。根据需要进行调整,然后重置您的计算机(这是必需的)。再次尝试连接 powershell 脚本,看看你得到了什么结果。如果仍然不成功,请确保需要启用的算法、哈希和密码正在缩小需要启用的范围(IISCrypto 是一个很好的应用程序,并且可以免费使用。它会给你一个实时视图在所有这些东西所在的 SChannel 注册表中启用或禁用)。

还要记住您当前安装的 Windows 版本、DotNet 版本和更新,因为尽管在 Windows 10 中默认启用了许多 TLS 选项,但以前的版本需要补丁才能启用该选项。

最后一件事:TLS 是一条双向街道(请记住这一点),其理念是服务器拥有可用的东西与客户端一样重要。如果服务器只提供使用某些算法通过 TLS 1.2 进行连接,那么客户端将无法连接其他任何东西。此外,如果客户端不与某个协议或密码套件以外的任何其他东西连接,则连接将无法工作。浏览器也需要考虑到这一点,因为它们在 HTTP2 上强制错误对于使用低于 TLS 1.2 完成的任何事情,尽管实际上没有错误(他们抛出它试图让人们升级但注册表设置确实存在修改此行为)。

于 2021-01-05T21:01:39.023 回答
1

在以前的答案中,一些可能不存在的注册表项被遗漏了。它们是 SchUseStrongCrypto,必须存在才能让 TLS 协议正常工作。

将注册表项导入注册表后,不应要求对代码进行更改,例如

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;

下面是 x64 Windows 操作系统所需的所有注册表项和值。如果您有 32 位操作系统 (x86),只需删除最后两行。注册表脚本将禁用 TLS 1.0。需要重新启动操作系统。

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:00000001
"enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\server]
"disabledbydefault"=dword:00000001
"enabled"=dword:00000000

[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]
"disabledbydefault"=dword:00000001
"enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\ssl 3.0\server]
"disabledbydefault"=dword:00000001
"enabled"=dword:00000000

[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]
"disabledbydefault"=dword:00000001
"enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\tls 1.0\server]
"disabledbydefault"=dword:00000001
"enabled"=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]
"disabledbydefault"=dword:00000000
"enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001
于 2018-07-24T09:07:21.340 回答