-
Notifications
You must be signed in to change notification settings - Fork 14
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
Stream Shutdown does not produce Error on incomplete protocol shutdown #75
Comments
The beast https server examples have a helpful comment on this topic. For example here. Altogether, i think it may be reasonable to keep the current shutdown functions as a more efficient variant to use with HTTP or other "self-terminated" protocols. |
As for a good reference implementation i have found https://github.com/steffengy/schannel-rs, which is rust but otherwise similar to wintls. |
Please complete the PR |
I guess it's up to you to complete this @jens-diewald :-) |
Hi, I will try to find some time to look into this again. |
As originally mentioned in #56, Asio.SSL has error::stream_truncated.
This StackOverflow Post does explain very well what it is good for: https://stackoverflow.com/questions/25587403/boost-asio-ssl-async-shutdown-always-finishes-with-an-error
(I think, that stream_truncated did not exist when that post was written and corresponds to the mentioned SSL_R_SHORT_READ.)
I have added #74 to show the current behavior of Asio.SSL and WinTLS in the relevant cases.
Looking at the Schannel Docs, i suspect that the sspi_shutdown class may have to be more complex than it currently is..?
As a sidenote: The StackOverflow post mentions that Asio should produce error::eof during shutdown in some cases.
I did not observe that in my tests. However, this is handled in the beast https sync/async examples and in the WinTLS async example, butn not in the WinTLS sync example.
Could it be, that the information is outdated and error::eof will not occur anymore?
At the very least, it seems inconsistent, that error::eof is handled in the async example, but not in the sync example.
The text was updated successfully, but these errors were encountered: