--- a/src/java.base/share/classes/sun/security/ssl/SSLExtension.java Thu Oct 17 20:27:44 2019 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/SSLExtension.java Thu Oct 17 20:53:35 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -309,8 +309,28 @@
// extensions defined in RFC 7924
CACHED_INFO (0x0019, "cached_info"),
- // extensions defined in RFC 4507/5077
- SESSION_TICKET (0x0023, "session_ticket"),
+ // extensions defined in RFC 5077
+ CH_SESSION_TICKET (0x0023, "session_ticket",
+ SSLHandshake.CLIENT_HELLO,
+ ProtocolVersion.PROTOCOLS_10_12,
+ SessionTicketExtension.chNetworkProducer,
+ SessionTicketExtension.chOnLoadConsumer,
+ null,
+ null,
+ null,
+ SessionTicketExtension.steStringizer),
+ //null),
+
+ SH_SESSION_TICKET (0x0023, "session_ticket",
+ SSLHandshake.SERVER_HELLO,
+ ProtocolVersion.PROTOCOLS_10_12,
+ SessionTicketExtension.shNetworkProducer,
+ SessionTicketExtension.shOnLoadConsumer,
+ null,
+ null,
+ null,
+ SessionTicketExtension.steStringizer),
+ //null),
// extensions defined in TLS 1.3
CH_EARLY_DATA (0x002A, "early_data"),
@@ -464,6 +484,25 @@
final SSLHandshake handshakeType;
final String name;
final ProtocolVersion[] supportedProtocols;
+
+ /*
+ * networkProducer: produces outbound handshake data.
+ *
+ * onLoadConsumer: parses inbound data. It may not be appropriate
+ * to act until all of the message inputs have
+ * been parsed. (e.g. parsing keyShares and choosing
+ * a local value without having seen the SupportedGroups
+ * extension.)
+ *
+ * onLoadAbsence: if a missing message needs special handling
+ * during the load phase.
+ *
+ * onTradeConsumer: act on the parsed message once all inbound data has
+ * been traded and parsed.
+ *
+ * onTradeAbsence: if a missing message needs special handling
+ * during the trade phase.
+ */
final HandshakeProducer networkProducer;
final ExtensionConsumer onLoadConsumer;
final HandshakeAbsence onLoadAbsence;