Skip to content

Commit

Permalink
8262509: JSSE Server should check the legacy version in TLSv1.3 Clien…
Browse files Browse the repository at this point in the history
…tHello

Reviewed-by: xuelei, wetmore
  • Loading branch information
John Jiang committed Mar 1, 2021
1 parent 642f45f commit 353416f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/java.base/share/classes/sun/security/ssl/ClientHello.java
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,11 @@ public void consume(ConnectionContext context,
"Received unexpected renegotiation handshake message");
}

if (clientHello.clientVersion != ProtocolVersion.TLS12.id) {
throw shc.conContext.fatal(Alert.PROTOCOL_VERSION,
"The ClientHello.legacy_version field is not TLS 1.2");
}

// The client may send a dummy change_cipher_spec record
// immediately after the first ClientHello.
shc.conContext.consumers.putIfAbsent(
Expand Down

0 comments on commit 353416f

Please sign in to comment.