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 e163587b98
commit 2f2aae15a4
1 changed files with 2 additions and 2 deletions

View File

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