Skip to content
Permalink
Browse files

8229728: Implement negotiation parameters

Reviewed-by: jnimeh, ahgross, rhalade
  • Loading branch information
XueleiFan committed Sep 11, 2019
1 parent 6cb8dfa commit 10b010d0f594b8910f70e1b2f5c5045bc5962065
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/java.base/share/classes/sun/security/ssl/ClientHello.java
@@ -1140,6 +1140,15 @@ public void consume(ConnectionContext context,
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(

0 comments on commit 10b010d

Please sign in to comment.