Skip to content

Return error at end of plaintext stream if we saw an EOF on the TLS stream - #790

Merged
ctz merged 2 commits into
mainfrom
jbp-no-alert-eof
Jul 24, 2021
Merged

Return error at end of plaintext stream if we saw an EOF on the TLS stream#790
ctz merged 2 commits into
mainfrom
jbp-no-alert-eof

Conversation

@ctz

@ctz ctz commented Jul 24, 2021

Copy link
Copy Markdown
Member

This incorporates #779

djc and others added 2 commits July 8, 2021 23:18
The peer is not required to send us `CloseNotify`, but if the socket has
shutdown we should act accordingly.
The only way to see an Ok(0) from Connection::read() is via a close_notify alert.

Unclean closure (ie, just a TCP EOF without a close_notify) leads
to an `UnexpectedEof` from Connection::read().  Applications which
want to accept that can do so -- bogo_shim is such an example.

Add tests for this and IoState::peer_has_closed()
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

Successfully merging this pull request may close these issues.

2 participants