Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SuperSocket.WebScoket.Server 2.0,使用ssl证书报错 #742

Open
lovefather opened this issue Aug 8, 2024 · 0 comments
Open

SuperSocket.WebScoket.Server 2.0,使用ssl证书报错 #742

lovefather opened this issue Aug 8, 2024 · 0 comments

Comments

@lovefather
Copy link

lovefather commented Aug 8, 2024

程序集版本:2.0.0-beta.24

客户端每次重连的时候就会报如下错误

info: SuperSocketService[0]
The listener [Ip=any, Port=8080, Security=Tls12, Path=, BackLog=0, NoDelay=False] has been started.
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: D:\Code\Github\lovefather\GW\GWApp\GW.LivesServer\bin\Debug\net8.0
fail: IConnection[0]
Exception happened in ReceiveAsync
System.IO.IOException: The decryption operation failed, see inner exception.
---> System.ComponentModel.Win32Exception (0x80090327): 处理证书时,出现了一个未知错误。
--- End of inner exception stack trace ---
at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](Memory1 buffer, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) at SuperSocket.Connection.StreamPipeConnection.FillPipeWithDataAsync(Memory1 memory, CancellationToken cancellationToken)
at SuperSocket.Connection.PipeConnection.FillPipeAsync(PipeWriter writer, ISupplyController supplyController, CancellationToken cancellationToken)

image

配置代码如下:
`
builder.ConfigureSuperSocket(options =>
{
options.Name = "vtool.com.cn";

options.AddListener(new ListenOptions()
{
    Ip = "any",
    Port = 8080,
    Security = SslProtocols.Tls12,
    CertificateOptions = new CertificateOptions()
    {
        FilePath = "vtool.com.cn.pfx",
        Password = "4gx3gatr"
    }
});

});
`

证书是从阿里云生成的个人免费SSL证书,密码没问题,验证过
image

请问可能是什么原因导致的

@lovefather lovefather changed the title SuperSocket.WebScoket.Server,使用wss,采用Tls12时,报错 SuperSocket.WebScoket.Server 2.0,使用ssl证书报错 Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant