Skip to content

NetSSL_OpenSSL: non-blocking functions return value #4906

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

Open
obiltschnig opened this issue Mar 22, 2025 · 0 comments
Open

NetSSL_OpenSSL: non-blocking functions return value #4906

obiltschnig opened this issue Mar 22, 2025 · 0 comments
Assignees
Labels
breaking A breaking change bug fixed

Comments

@obiltschnig
Copy link
Member

Non-blocking functions currently can return special return values, ERR_SSL_WANT_READ (-1) and ERR_SSL_WANT_WRITE (-2). However, it turns out that also a third value, ERR_SSL_WOULD_BLOCK is needed.

New definitions should be:

ERR_SSL_WOULD_BLOCK = -1,
ERR_SSL_WANT_READ  = -2,
ERR_SSL_WANT_WRITE = -3

Currently in case of EWOULDBLOCK, functions would return ERR_SSL_WANT_WRITE, which is wrong.

Unfortunately, this breaks the API in a minor version, but given that non-blocking TLS functions weren't working properly before 1.4.0 anyway, this is acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking change bug fixed
Projects
Status: Done
Development

No branches or pull requests

1 participant