8262509: JSSE Server should check the legacy version in TLSv1.3 ClientHello

Reviewed-by: xuelei, wetmore
This commit is contained in:
John Jiang 2021-03-01 22:26:15 +00:00
parent 642f45f9dc
commit 353416ffca

View File

@ -1149,6 +1149,11 @@ final class ClientHello {
"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(