lior.i
lior.i

Reputation: 747

TLS handshake fail, but communication is not closed

I have TLS program and I did some experiments on it.

I start confidential TLS server session and try to connect to it with pure Telnet client.

As expected, the handshake failed and the server is available to the next client but on the Telnet client side I didn't receive any indication that the handshake failed and that the server is accepting other clients. I can see in Wireshark that even after the handshake failed the Telnet client can send strings; I see [PSH, ACK] from the client answered by [ACK] from the server.

Adding Wireshark snapshot, Telnet failed the handshake, Telnet keep sending messages, followed by success in the TLS handshake and more Telnet messages:

wireshark snap

Why is the server ACKing the Telnet client if the handshake failed and he is accepting other clients?

Upvotes: 0

Views: 807

Answers (1)

Steffen Ullrich
Steffen Ullrich

Reputation: 123521

As expected, the handshake failed ...

I cannot see a failed TLS handshake in the packet capture and I'm not sure how you come to this conclusion.

All I can see that the client on source port 60198 (presumable your telnet) is sending 3 bytes several times and the server just ACK'ing these without sending anything back and without closing the connection. Likely the server is still expecting data in the hope that at some time it will be a complete TLS record. Only then it will be processed by the TLS stack and then it might realize that something is wrong with the client.

... the server is available to the next client

It is pretty normal for a server to handle multiple clients in parallel. In contrary, it would be unusual if the server could not do this.

Upvotes: 2

Related Questions