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_shutdown error codes are un-discoverable #91

Closed
glyph opened this issue Apr 5, 2014 · 1 comment · Fixed by #183
Closed

SSL_shutdown error codes are un-discoverable #91

glyph opened this issue Apr 5, 2014 · 1 comment · Fixed by #183

Comments

@glyph
Copy link
Contributor

glyph commented Apr 5, 2014

The _raise_current_error in Connection.shutdown is incorrect because SSL_shutdown can result in SSL_ERR_WANT_WRITE or SSL_ERR_WANT_READ. The way you discover this, according to the official documentation, is:

If the underlying BIO is non-blocking, SSL_shutdown() will also return when the underlying BIO could not satisfy the needs of SSL_shutdown() to continue the handshake. In this case a call to SSL_get_error() with the return value of SSL_shutdown() will yield SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE.

The current behavior is that the error code is masked because the return code is lost.

@exarkun
Copy link
Member

exarkun commented Apr 5, 2014

(stupid comment deleted)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants