You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the WebSocketListener lib, it's very good, works fine when the scheme is ws://. But the server won't work when register for Secure WebSocket.
Whats happens is:
I start the server, well configured, with a certificate in .pfx format, associeted the private key.
The server starts without error. But when the client try to connect, I receive an exception with the message:
"Unknown error while processing the certificate"
The code in C#:
//generate cancellation Token
CancellationTokenSource cancellation = new CancellationTokenSource();
var endpoint = new IPEndPoint(IPAddress.Any, porta);
var rfc6455 = new WebSocketFactoryRfc6455();
var options = new WebSocketListenerOptions();
if (File.Exists(server_Config.CertificatePath))
{
THREAD_MOD("Certificado carregado");
cert = new X509Certificate2(server_Config.CertificatePath, server_Config.CertPassword);
}
else
{
THREAD_MOD("Certificado ausente");
}
if (cert != null)
{
WebSocketSecureConnectionExtension tls = new WebSocketSecureConnectionExtension(cert);
server.ConnectionExtensions.RegisterExtension(tls);
THREAD_MOD("Certificado registrado no wss://");
certificate_str = cert.ToString();
button_check_cert.Enabled = true;
}
else
{
THREAD_MOD("Falha ao gerar/carregar certificado");
}
server.StartAsync(cancellation.Token);
task = AcceptWebSocketClientsAsync(server, cancellation.Token);
Sorry if I'm disturbing, cut it's been days since I start to try to use the wss:// scheme.
The text was updated successfully, but these errors were encountered:
Pablo-Jean
changed the title
Try to Secure WebSocket: Inknow error while processing the certificate
Try to Secure WebSocket: Unknow error while processing the certificate
Jan 12, 2021
Hello,
I'm using the WebSocketListener lib, it's very good, works fine when the scheme is
ws://
. But the server won't work when register for Secure WebSocket.Whats happens is:
I start the server, well configured, with a certificate in
.pfx
format, associeted the private key.The server starts without error. But when the client try to connect, I receive an exception with the message:
"Unknown error while processing the certificate"
The code in C#:
Sorry if I'm disturbing, cut it's been days since I start to try to use the
wss://
scheme.The text was updated successfully, but these errors were encountered: