mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8207009: TLS 1.3 half-close and synchronization issues
Reviewed-by: jnimeh, mullan, wetmore
This commit is contained in:
parent
d8ce7f36e2
commit
611c53c860
36 changed files with 1467 additions and 621 deletions
|
@ -235,13 +235,22 @@ enum Alert {
|
|||
Level level = Level.valueOf(am.level);
|
||||
Alert alert = Alert.valueOf(am.id);
|
||||
if (alert == Alert.CLOSE_NOTIFY) {
|
||||
if (tc.handshakeContext != null) {
|
||||
tc.isInputCloseNotified = true;
|
||||
tc.closeInbound();
|
||||
|
||||
if (tc.peerUserCanceled) {
|
||||
tc.closeOutbound();
|
||||
} else if (tc.handshakeContext != null) {
|
||||
tc.fatal(Alert.UNEXPECTED_MESSAGE,
|
||||
"Received close_notify during handshake");
|
||||
}
|
||||
|
||||
tc.isInputCloseNotified = true;
|
||||
tc.closeInbound();
|
||||
} else if (alert == Alert.USER_CANCELED) {
|
||||
if (level == Level.WARNING) {
|
||||
tc.peerUserCanceled = true;
|
||||
} else {
|
||||
tc.fatal(alert,
|
||||
"Received fatal close_notify alert", true, null);
|
||||
}
|
||||
} else if ((level == Level.WARNING) && (alert != null)) {
|
||||
// Terminate the connection if an alert with a level of warning
|
||||
// is received during handshaking, except the no_certificate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue