Don't specially handle unauthenticated close_notify alerts

(cherry picked from commit 2f2aae15a4)

# Conflicts:
#	rustls/src/common_state.rs
This commit is contained in:
Joseph Birr-Pixton 2024-04-18 09:01:36 +01:00 committed by Jiahao Liang
parent d1345fc39a
commit dc143e369e
1 changed files with 2 additions and 2 deletions

View File

@ -1307,8 +1307,8 @@ impl CommonState {
}
// If we get a CloseNotify, make a note to declare EOF to our
// caller.
if alert.description == AlertDescription::CloseNotify {
// caller. But do not treat unauthenticated alerts like this.
if self.may_receive_application_data && alert.description == AlertDescription::CloseNotify {
self.has_received_close_notify = true;
return Ok(());
}