簡體   English   中英

客戶端和服務器無法通信,因為它們沒有共同的算法 - ASP.NET C# IIS TLS 1.0 / 1.1 / 1.2 - Win32

[英]The client and server cannot communicate, because they do not possess a common algorithm - ASP.NET C# IIS TLS 1.0 / 1.1 / 1.2 - Win32Exception

我對 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 服務器上安裝一些額外的東西。 我只是不確定是什么。

現在還有其他幾篇關於此的帖子,它們都指向啟用 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

在我的情況下,即使項目的目標框架是 4.7.1,我仍然得到同樣的錯誤,解決方案是將 system.web 下的 web.config 中的 httpRuntime 更改為 4.7.1!

在先前的答案中,建議將這行代碼用於 .Net 4.5:

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

我鼓勵您將該值與現有的值進行或,如下所示:

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

如果您查看值列表,您會注意到它們是 2 的冪。 這樣,將來當事情轉移到 TLS 2.0 時,您的代碼仍然可以工作。

有兩種可能的情況,就我而言,我使用了第二點。

  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>

這已解決。 事實證明,我們的 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,這是一個臨時修復,不再適用,因為現在有更好的解決方法可以確保強大的安全實踐。 請參閱已接受的答案以獲取解決方案。 僅供參考,我將在網站上保留此答案,因為它提供了有關問題所在的信息,請不要投反對票。

啟用 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

我的應用程序在 .net 4.7.2 中運行。 最簡單的解決方案是將其添加到配置中:

  <system.web>
    <httpRuntime targetFramework="4.7.2"/>
  </system.web>

就我而言,我通過在 .Net Framework 中啟用最后一個 TLS 版本來解決問題,如本文所述:

https://docs.microsoft.com/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

您需要檢查與此相關的幾件事。

每當出現與建立安全連接相關的此類錯誤時,請嘗試在 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 完成的任何事情,盡管實際上沒有錯誤(他們拋出它試圖讓人們升級但注冊表設置確實存在修改此行為)。

在搞砸了幾天之后,我對我們問題的最終解決需要兩件事;

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

我通過將應用程序從 .Net Framework 4.5 升級到 4.6.2 來修復此錯誤。

TLS-1.2 已正確安裝在服務器上,並且像 TLS-1.1 這樣的舊版本已被禁用。 但是,.Net 4.5 不支持 TLS-1.2。

在以前的答案中,一些可能不存在的注冊表項被遺漏了。 它們是 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

從 Windows Server 2012 連接時,我遇到了同樣的錯誤。我通過使用 IIS Crypto 可執行文件更改 TLS 和 SSL 設置解決了問題。 具體來說,我禁用了服務器協議 SSL 3.0 和 TLS 1.0。 我還禁用了客戶端協議 SSL 3.0(我相信這就是訣竅)。 我使用了一個正常工作的服務器作為確定理想設置的基礎。 屏幕截圖 - IIS 加密設置

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM