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

openSSL 1.1.1n handhshake returning error code 2 #648

Open
venugchary opened this issue Nov 24, 2023 · 3 comments
Open

openSSL 1.1.1n handhshake returning error code 2 #648

venugchary opened this issue Nov 24, 2023 · 3 comments

Comments

@venugchary
Copy link

I am using OpenSSL 1.1.1n version with Azure C SDK and facing below error code 2 while handshaking with iothub end point. Looks like below code inside adaptor/tlsio_openssl.c is not handled for Error Code 2 (SSL_ERROR_WANT_READ). Can you help how to handle this please?

// Non-NULL tls_io_instance is guaranteed by callers.
// We are in TLSIO_STATE_IN_HANDSHAKE when entering this method.
static void send_handshake_bytes(TLS_IO_INSTANCE* tls_io_instance)
{
int hsret;
// ERR_clear_error must be called before any call that might set an
// SSL_get_error result
ERR_clear_error();
hsret = SSL_do_handshake(tls_io_instance->ssl);
if (hsret != SSL_DO_HANDSHAKE_SUCCESS)
{

@venugchary
Copy link
Author

venugchary commented Nov 28, 2023

Any input is really appreciated.

@RLeclair
Copy link
Member

Hi @venugchary, we are looking into the issue at the moment, we appreciate your patience

@RLeclair
Copy link
Member

RLeclair commented Nov 28, 2023

Hi @venugchary, I looked at the portion of code you mentioned above and attempted to repro with my debugger but have not found a way to replicate a failure stemming from SSL_ERROR_WANT_READ.

What error message are you seeing? Can you provide logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants