WebSocket客户端无法连接到WebSocket服务器并出现错误

时间:2020-04-01 11:53:44

标签: c# security websocket

Error:  System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

我已经使用SHA512算法创建了一个用于证书的Websocket服务器,并且定义的协议是TLS1.2

Client:  websocket4net

 new WebSocket(url, " ", version: WebSocketVersion.Rfc6455,sslProtocols:System.Security.Authentication.SslProtocols.Tls12);

当客户端尝试连接到服务器时,遇到的错误是:

ERROR SecureSuperWebSocket - Session: 5822bf8c-2a96-4fdc-95f8-63104d44efb3/127.0.0.1:57607
Unexpected error
Caller: OnBeginInitStream, file path: d:\WorkShop\SuperSocket\v1.6\SocketEngine\AsyncStreamSocketSession.cs, line number: 245
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at SuperSocket.SocketEngine.AsyncStreamSocketSession.OnBeginInitStream(IAsyncResult result, Boolean connect)

当我在注册表中签入SSL条目

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\00010003

我没有找到任何条目

RSA / SHA512和 ECDSA / SHA512

因此,通过在注册表中添加这些条目进行更改时,连接成功。

任何人都可以向我解释这个概念,为什么会这样?

0 个答案:

没有答案
相关问题