mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8229728: Implement negotiation parameters
Reviewed-by: jnimeh, ahgross, rhalade
This commit is contained in:
parent
6cb8dfa9e3
commit
10b010d0f5
1 changed files with 9 additions and 0 deletions
|
@ -1140,6 +1140,15 @@ final class ClientHello {
|
|||
ServerHandshakeContext shc = (ServerHandshakeContext)context;
|
||||
ClientHelloMessage clientHello = (ClientHelloMessage)message;
|
||||
|
||||
// [RFC 8446] TLS 1.3 forbids renegotiation. If a server has
|
||||
// negotiated TLS 1.3 and receives a ClientHello at any other
|
||||
// time, it MUST terminate the connection with an
|
||||
// "unexpected_message" alert.
|
||||
if (shc.conContext.isNegotiated) {
|
||||
throw shc.conContext.fatal(Alert.UNEXPECTED_MESSAGE,
|
||||
"Received unexpected renegotiation handshake message");
|
||||
}
|
||||
|
||||
// The client may send a dummy change_cipher_spec record
|
||||
// immediately after the first ClientHello.
|
||||
shc.conContext.consumers.putIfAbsent(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue