Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Incorrect usage of non blocking io with openssl #60
Comments
|
The actual symptoms here are
...in the middle of streaming lots of initial sync data through to the IRC client over SSL. I probably never noticed this before because I was either talking SSL over localhost from my irc client to my PTO, or just not speaking SSL at all given localhost stuff is no longer SSL'd. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
erikjohnston commentedMar 15, 2016
•
edited by tdfischer
Currently PTO uses the
Read + Writetraits ofSslStreamwith MIO, however OpenSSL may return error conditions that require special handling when used with non-blocking sockets. These are not exposed via theRead + Writetraits (due to them returningio::Result), which eventually causes PTO to panic.To use OpenSSL with non-blocking sockets correctly, PTO should use
SslStream::{ssl_read, ssl_write}and handle thessl::Error::{WantRead, WantWrite}conditions correctly.An alternative may be to use the Telos library instead of rust-openssl.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/31917956-incorrect-usage-of-non-blocking-io-with-openssl?utm_campaign=plugin&utm_content=tracker%2F27545356&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F27545356&utm_medium=issues&utm_source=github).