Closed chachew closed 4 years ago
I'm having this same issue in C#.
In the connection handler I'm reading the message like this:
var msg = await ws.ReadStringAsync( cancellation ).ConfigureAwait( false );
Without using an SSL certificate it works fine. I can read the message and processes it without a problem. When using SSL the return value is "Ep\0Q\0+..." and I am unable to deserialize it.
This is how the server is set up:
var options = new WebSocketListenerOptions()
{
NegotiationQueueCapacity = 128,
ParallelNegotiations = 16,
PingTimeout = Timeout.InfiniteTimeSpan,
PingMode = PingModes.LatencyControl,
UseNagleAlgorithm = false
};
var server = new WebSocketListener( new IPEndPoint( IPAddress.Any, 8181 ), options );
server.Standards.RegisterStandard( new WebSocketFactoryRfc6455() );
server.ConnectionExtensions.RegisterExtension( new WebSocketSecureConnectionExtension( certificate ) );
server.StartAsync();
So before when i was having this issue i was using a developer cert using mkcert and i was having this problem. Now i'm using a real cert from godaddy and i'm no longer having this problem... I also followed the vtortola documentation to setup the certificate as mentioned.
Ahh, thanks! I am using a dev certificate too! Thank you for passing along the information!
Ahh, thanks! I am using a dev certificate too! Thank you for passing along the information!
Im not 100% sure this was my original issue because that was months ago, but everything is working now with a real cert.
I am adding SSL to my websocket connection and i'm having issues on the server side deserializing the request sent over the socket. The frontend is Vue and it creates a websocket connection with a backend api that is VB.net.
Without SSL on the websocket the data is sent/received/deserialized just fine but once the websocket uses SSL i can no longer deserialize it on the backend, i'm sure because its now encrypted. How do i decrypt it?
Frontend:
Backend API: