New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mojo::IOLoop::TLS retries TLS handshake after it is already finished #1102
Comments
The following patch might fix the problem:
|
You make it sound like TLS should not work at all in |
I think the problem only happens if the upgrade callback does not remove or change the io handler, like in this example:
If a TLS client connects to this server the handshake is successful. If the client then sends some data (i.e. TLS application data) the io handler will be triggered. If the application did not setup its own handler the one setup in Since most code actually wants to deal with the data from the peer after the TLS handshake is done it will change the io handler away from the one setup in |
Thank you for the explanation. |
Steps to reproduce the behavior
see noxxi/p5-io-socket-ssl#59
Expected behavior
TLS handshake attempt should stop after accept_SSL in IO::Socket::SSL returned success
Actual behavior
The handler responsible for the TLS handshake is not removed. This means when new data arrive (i.e. application data) the handler will be called again and will again call accept_SSL even though the handshake was already done. This will result in failure in accept_SSL.
The text was updated successfully, but these errors were encountered: