Skip to content

Commit 0c6cd7e

Browse files
committed
Don't specially handle unauthenticated close_notify alerts
1 parent a1e28cd commit 0c6cd7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rustls/src/common_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ impl CommonState {
439439
}
440440

441441
// If we get a CloseNotify, make a note to declare EOF to our
442-
// caller.
443-
if alert.description == AlertDescription::CloseNotify {
442+
// caller. But do not treat unauthenticated alerts like this.
443+
if self.may_receive_application_data && alert.description == AlertDescription::CloseNotify {
444444
self.has_received_close_notify = true;
445445
return Ok(());
446446
}

0 commit comments

Comments
 (0)