Hello, I am testing the secure WebSocket connection.
The server will send an invalid certificate to test the client's disconnection behavior.
The following is the result I captured using Wireshark.
The Client immediately disconnected right after the Server Hello which contains a invalid certificate.
Therefore the Server didn't know the reason.
This is another capture with JAVA WebSocket Client.
Here I can see the Alert (Level: Fatal, Description: Certificate Expired) is sended before the disconnection.
This part are handled by Python's ssl module. I think you'd get the same result if you created a client socket directly, without involving websockets -- as shown here or there.
If so, it's a Python problem, not a websockets problem.
Hello, I am testing the secure WebSocket connection. The server will send an invalid certificate to test the client's disconnection behavior.
The following is the result I captured using Wireshark. The Client immediately disconnected right after the Server Hello which contains a invalid certificate. Therefore the Server didn't know the reason.
Accroding to the The TLS alert protocol https://gnutls.org/manual/html_node/The-TLS-Alert-Protocol.html I expect there to be an Alert Message before the disconnection.
This is another capture with JAVA WebSocket Client. Here I can see the Alert (Level: Fatal, Description: Certificate Expired) is sended before the disconnection.
How can I achieve this behavior as well?