using SSL with websocket4net

Nov 1, 2015 at 11:03 AM
We are planning to use SSL with websocket4net. Right now we are using "wss" in our implementation but allowing untrusted certificate. Now we want to validate the certificate and then do the secure communication.

Is there already a way in websocket to implement SSL certification validation and use a secure communication. Please provide it as we would need to implement the same.

Nov 4, 2015 at 1:15 AM
Hi, you can hook the global event ServicePointManager.ServerCertificateValidationCallback, which is checked by WebSocket4Net too.
Marked as answer by abhirajgandhi on 1/25/2016 at 12:44 PM
Nov 9, 2015 at 3:55 PM
Could you please share an example to hook websocket4net DLL with this static callback to validate certificate based on our defined condition.

Nov 12, 2015 at 12:28 PM
Hi Kerry,

I understood what you have mentioned. But is there any way to verify that my websocket connection is getting certified. Actually, I have bunch of webservice calls before the websocket connection. My validation callback gets is invoked many times for the webservices, as I see the webservice uri in that callback but for websocket I am not able to make out when our callback was hit.
I will highly appreciate any pointers which will help to validate the websocket is also validated.