Don't specially handle unauthenticated close_notify alerts

This commit is contained in:
Joseph Birr-Pixton 2024-04-18 09:01:36 +01:00 committed by Joe Birr-Pixton
parent 1f5146cdfa
commit f45664fbde
1 changed files with 2 additions and 2 deletions

View File

@ -431,8 +431,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(());
}