Skip to content
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

SSL client handshake check not called #951

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sonnin
Copy link

@sonnin sonnin commented Aug 26, 2019

With the former ACE 6.1.7, I have observed that a SSL client sometimes fails to establish connection. It looks like a chicken-and-egg problem where the SSL handshake sometimes is completed when SSL_connect returns and sometimes it is not. Resulting in client post_handshake_check first being called later on when client attempts to read/write some data.
This may be a result of how we use ACE to initiate a connection.
But I found that when a ACE SSL client calls SSL_connect as part of do_SSL_state_machine and this returns 1 meaning:
"The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been established."
see https://www.openssl.org/docs/man1.0.2/man3/SSL_connect.html
The do_SSL_handshake will also return 1 which according to the code comments means"SSL handshake is finished already, success". But this is not entirely true from a ACE perspective, as it did not call post_handshake_check.

Ensuring that post_handshake_check is called within the function, resolves the issue I observe.

SSL handshake must be done once connected
@jwillemsen jwillemsen added the needs review Needs to be reviewed label May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Needs to be reviewed
Development

Successfully merging this pull request may close these issues.

2 participants