author | xuelei |
Fri, 08 Jun 2018 11:59:34 -0700 | |
branch | JDK-8145252-TLS13-branch |
changeset 56708 | 25178bb3e8f5 |
parent 56707 | 929ac4f1cddd |
child 56709 | 789118dc46c6 |
--- a/src/java.base/share/classes/sun/security/ssl/AlpnExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/AlpnExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -57,7 +57,7 @@ static final ExtensionConsumer eeOnLoadConsumer = new SHAlpnConsumer(); static final HandshakeAbsence eeOnLoadAbsence = new SHAlpnAbsence(); - static final SSLStringize alpnStringize = new AlpnStringize(); + static final SSLStringizer alpnStringizer = new AlpnStringizer(); /** * The "application_layer_protocol_negotiation" extension. @@ -111,7 +111,7 @@ } } - private static final class AlpnStringize implements SSLStringize { + private static final class AlpnStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/CertSignAlgsExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/CertSignAlgsExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -50,11 +50,11 @@ static final HandshakeConsumer crOnTradeConsumer = new CRCertSignatureSchemesUpdate(); - static final SSLStringize ssStringize = - new CertSignatureSchemesStringize(); + static final SSLStringizer ssStringizer = + new CertSignatureSchemesStringizer(); private static final - class CertSignatureSchemesStringize implements SSLStringize { + class CertSignatureSchemesStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/CertStatusExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/CertStatusExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -69,8 +69,8 @@ static final ExtensionConsumer ctOnLoadConsumer = new CTCertStatusResponseConsumer(); - static final SSLStringize certStatusReqStringize = - new CertStatusRequestStringize(); + static final SSLStringizer certStatusReqStringizer = + new CertStatusRequestStringizer(); static final HandshakeProducer chV2NetworkProducer = new CHCertStatusReqV2Producer(); @@ -82,11 +82,11 @@ static final ExtensionConsumer shV2OnLoadConsumer = new SHCertStatusReqV2Consumer(); - static final SSLStringize certStatusReqV2Stringize = - new CertStatusRequestsStringize(); + static final SSLStringizer certStatusReqV2Stringizer = + new CertStatusRequestsStringizer(); - static final SSLStringize certStatusRespStringize = - new CertStatusRespStringize(); + static final SSLStringizer certStatusRespStringizer = + new CertStatusRespStringizer(); /** * The "status_request" extension. @@ -214,7 +214,7 @@ } private static final - class CertStatusRequestStringize implements SSLStringize { + class CertStatusRequestStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try { @@ -227,7 +227,7 @@ } private static final - class CertStatusRespStringize implements SSLStringize { + class CertStatusRespStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try { @@ -875,7 +875,7 @@ } private static final - class CertStatusRequestsStringize implements SSLStringize { + class CertStatusRequestsStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/CookieExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/CookieExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -54,8 +54,8 @@ static final HandshakeProducer hrrNetworkReproducer = new HRRCookieReproducer(); - static final CookieStringize cookieStringize = - new CookieStringize(); + static final CookieStringizer cookieStringizer = + new CookieStringizer(); /** * The "cookie" extension. @@ -88,7 +88,7 @@ } } - private static final class CookieStringize implements SSLStringize { + private static final class CookieStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/ECPointFormatsExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/ECPointFormatsExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -48,8 +48,8 @@ static final ExtensionConsumer shOnLoadConsumer = new SHECPointFormatsConsumer(); - static final SSLStringize epfStringize = - new ECPointFormatsStringize(); + static final SSLStringizer epfStringizer = + new ECPointFormatsStringizer(); /** * The "ec_point_formats" extension. @@ -115,7 +115,7 @@ } } - private static final class ECPointFormatsStringize implements SSLStringize { + private static final class ECPointFormatsStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/ExtendedMasterSecretExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/ExtendedMasterSecretExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -53,8 +53,8 @@ static final HandshakeAbsence shOnLoadAbsence = new SHExtendedMasterSecretAbsence(); - static final SSLStringize emsStringize = - new ExtendedMasterSecretStringize(); + static final SSLStringizer emsStringizer = + new ExtendedMasterSecretStringizer(); /** * The "extended_master_secret" extension. @@ -84,7 +84,7 @@ } private static final - class ExtendedMasterSecretStringize implements SSLStringize { + class ExtendedMasterSecretStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/KeyShareExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/KeyShareExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -59,8 +59,8 @@ new CHKeyShareProducer(); static final ExtensionConsumer chOnLoadConsumer = new CHKeyShareConsumer(); - static final SSLStringize chStringize = - new CHKeyShareStringize(); + static final SSLStringizer chStringizer = + new CHKeyShareStringizer(); static final HandshakeProducer shNetworkProducer = new SHKeyShareProducer(); @@ -68,8 +68,8 @@ new SHKeyShareConsumer(); static final HandshakeAbsence shOnLoadAbsence = new SHKeyShareAbsence(); - static final SSLStringize shStringize = - new SHKeyShareStringize(); + static final SSLStringizer shStringizer = + new SHKeyShareStringizer(); static final HandshakeProducer hrrNetworkProducer = new HRRKeyShareProducer(); @@ -77,8 +77,8 @@ new HRRKeyShareConsumer(); static final HandshakeProducer hrrNetworkReproducer = new HRRKeyShareReproducer(); - static final SSLStringize hrrStringize = - new HRRKeyShareStringize(); + static final SSLStringizer hrrStringizer = + new HRRKeyShareStringizer(); /** * The key share entry used in "key_share" extensions. @@ -195,7 +195,7 @@ } } - private static final class CHKeyShareStringize implements SSLStringize { + private static final class CHKeyShareStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try { @@ -463,7 +463,7 @@ } } - private static final class SHKeyShareStringize implements SSLStringize { + private static final class SHKeyShareStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try { @@ -763,7 +763,7 @@ } } - private static final class HRRKeyShareStringize implements SSLStringize { + private static final class HRRKeyShareStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/MaxFragExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/MaxFragExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -58,8 +58,8 @@ static final HandshakeConsumer eeOnTradeConsumer = new EEMaxFragmentLengthUpdate(); - static final SSLStringize maxFragLenStringize = - new MaxFragLenStringize(); + static final SSLStringizer maxFragLenStringizer = + new MaxFragLenStringizer(); /** * The "max_fragment_length" extension [RFC 6066]. @@ -86,7 +86,7 @@ } } - private static final class MaxFragLenStringize implements SSLStringize { + private static final class MaxFragLenStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/PreSharedKeyExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/PreSharedKeyExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -53,8 +53,8 @@ new CHPreSharedKeyAbsence(); static final HandshakeConsumer chOnTradeConsumer = new CHPreSharedKeyUpdate(); - static final SSLStringize chStringize = - new CHPreSharedKeyStringize(); + static final SSLStringizer chStringizer = + new CHPreSharedKeyStringizer(); static final HandshakeProducer shNetworkProducer = new SHPreSharedKeyProducer(); @@ -62,8 +62,8 @@ new SHPreSharedKeyConsumer(); static final HandshakeAbsence shOnLoadAbsence = new SHPreSharedKeyAbsence(); - static final SSLStringize shStringize = - new SHPreSharedKeyStringize(); + static final SSLStringizer shStringizer = + new SHPreSharedKeyStringizer(); private static final class PskIdentity { final byte[] identity; @@ -238,7 +238,7 @@ } private static final - class CHPreSharedKeyStringize implements SSLStringize { + class CHPreSharedKeyStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try { @@ -299,7 +299,7 @@ } private static final - class SHPreSharedKeyStringize implements SSLStringize { + class SHPreSharedKeyStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/PskKeyExchangeModesExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/PskKeyExchangeModesExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -47,8 +47,8 @@ static final HandshakeAbsence chOnTradeAbsence = new PskKeyExchangeModesOnTradeAbsence(); - static final SSLStringize pkemStringize = - new PskKeyExchangeModesStringize(); + static final SSLStringizer pkemStringizer = + new PskKeyExchangeModesStringizer(); enum PskKeyExchangeMode { PSK_KE ((byte)0, "psk_ke"), @@ -149,7 +149,7 @@ } private static final - class PskKeyExchangeModesStringize implements SSLStringize { + class PskKeyExchangeModesStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/RenegoInfoExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/RenegoInfoExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -56,8 +56,8 @@ static final HandshakeAbsence shOnLoadAbsence = new SHRenegotiationInfoAbsence(); - static final SSLStringize rniStringize = - new RenegotiationInfoStringize(); + static final SSLStringizer rniStringizer = + new RenegotiationInfoStringizer(); /** * The "renegotiation_info" extension. @@ -103,7 +103,7 @@ } private static final - class RenegotiationInfoStringize implements SSLStringize { + class RenegotiationInfoStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/SSLExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/SSLExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -35,7 +35,7 @@ import sun.security.ssl.SSLHandshake.HandshakeMessage; import sun.security.util.HexDumpEncoder; -enum SSLExtension implements SSLStringize { +enum SSLExtension implements SSLStringizer { // Extensions defined in RFC 6066 CH_SERVER_NAME (0x0000, "server_name", SSLHandshake.CLIENT_HELLO, @@ -45,7 +45,7 @@ null, null, null, - ServerNameExtension.chStringize), + ServerNameExtension.chStringizer), SH_SERVER_NAME (0x0000, "server_name", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_TO_12, @@ -54,7 +54,7 @@ null, null, null, - ServerNameExtension.shStringize), + ServerNameExtension.shStringizer), EE_SERVER_NAME (0x0000, "server_name", SSLHandshake.ENCRYPTED_EXTENSIONS, ProtocolVersion.PROTOCOLS_OF_13, @@ -63,7 +63,7 @@ null, null, null, - ServerNameExtension.shStringize), + ServerNameExtension.shStringizer), CH_MAX_FRAGMENT_LENGTH (0x0001, "max_fragment_length", SSLHandshake.CLIENT_HELLO, ProtocolVersion.PROTOCOLS_TO_13, @@ -72,7 +72,7 @@ null, null, null, - MaxFragExtension.maxFragLenStringize), + MaxFragExtension.maxFragLenStringizer), SH_MAX_FRAGMENT_LENGTH (0x0001, "max_fragment_length", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_TO_12, @@ -81,7 +81,7 @@ null, MaxFragExtension.shOnTradeConsumer, null, - MaxFragExtension.maxFragLenStringize), + MaxFragExtension.maxFragLenStringizer), EE_MAX_FRAGMENT_LENGTH (0x0001, "max_fragment_length", SSLHandshake.ENCRYPTED_EXTENSIONS, ProtocolVersion.PROTOCOLS_OF_13, @@ -90,7 +90,7 @@ null, MaxFragExtension.eeOnTradeConsumer, null, - MaxFragExtension.maxFragLenStringize), + MaxFragExtension.maxFragLenStringizer), CLIENT_CERTIFICATE_URL (0x0002, "client_certificate_url"), TRUSTED_CA_KEYS (0x0003, "trusted_ca_keys"), TRUNCATED_HMAC (0x0004, "truncated_hmac"), @@ -103,7 +103,7 @@ null, null, null, - CertStatusExtension.certStatusReqStringize), + CertStatusExtension.certStatusReqStringizer), SH_STATUS_REQUEST (0x0005, "status_request", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_TO_12, @@ -112,7 +112,7 @@ null, null, null, - CertStatusExtension.certStatusReqStringize), + CertStatusExtension.certStatusReqStringizer), CR_STATUS_REQUEST (0x0005, "status_request"), CT_STATUS_REQUEST (0x0005, "status_request", @@ -123,7 +123,7 @@ null, null, null, - CertStatusExtension.certStatusRespStringize), + CertStatusExtension.certStatusRespStringizer), // extensions defined in RFC 4681 USER_MAPPING (0x0006, "user_mapping"), @@ -143,7 +143,7 @@ null, null, null, - SupportedGroupsExtension.sgsStringize), + SupportedGroupsExtension.sgsStringizer), EE_SUPPORTED_GROUPS (0x000A, "supported_groups", SSLHandshake.ENCRYPTED_EXTENSIONS, ProtocolVersion.PROTOCOLS_OF_13, @@ -152,7 +152,7 @@ null, null, null, - SupportedGroupsExtension.sgsStringize), + SupportedGroupsExtension.sgsStringizer), CH_EC_POINT_FORMATS (0x000B, "ec_point_formats", SSLHandshake.CLIENT_HELLO, @@ -162,7 +162,7 @@ null, null, null, - ECPointFormatsExtension.epfStringize), + ECPointFormatsExtension.epfStringizer), SH_EC_POINT_FORMATS (0x000B, "ec_point_formats", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_TO_12, @@ -171,7 +171,7 @@ null, null, null, - ECPointFormatsExtension.epfStringize), + ECPointFormatsExtension.epfStringizer), // extensions defined in RFC 5054 SRP (0x000C, "srp"), @@ -185,7 +185,7 @@ SignatureAlgorithmsExtension.chOnLoadAbsence, SignatureAlgorithmsExtension.chOnTradeConsumer, SignatureAlgorithmsExtension.chOnTradeAbsence, - SignatureAlgorithmsExtension.ssStringize), + SignatureAlgorithmsExtension.ssStringizer), CR_SIGNATURE_ALGORITHMS (0x000D, "signature_algorithms", SSLHandshake.CERTIFICATE_REQUEST, ProtocolVersion.PROTOCOLS_OF_13, @@ -194,7 +194,7 @@ SignatureAlgorithmsExtension.crOnLoadAbsence, SignatureAlgorithmsExtension.crOnTradeConsumer, null, - SignatureAlgorithmsExtension.ssStringize), + SignatureAlgorithmsExtension.ssStringizer), CH_SIGNATURE_ALGORITHMS_CERT (0x0032, "signature_algorithms_cert", SSLHandshake.CLIENT_HELLO, @@ -204,7 +204,7 @@ null, CertSignAlgsExtension.chOnTradeConsumer, null, - CertSignAlgsExtension.ssStringize), + CertSignAlgsExtension.ssStringizer), CR_SIGNATURE_ALGORITHMS_CERT (0x0032, "signature_algorithms_cert", SSLHandshake.CERTIFICATE_REQUEST, ProtocolVersion.PROTOCOLS_OF_13, @@ -213,7 +213,7 @@ null, CertSignAlgsExtension.crOnTradeConsumer, null, - CertSignAlgsExtension.ssStringize), + CertSignAlgsExtension.ssStringizer), // extensions defined in RFC 5764 USE_SRTP (0x000E, "use_srtp"), @@ -230,7 +230,7 @@ AlpnExtension.chOnLoadAbsence, null, null, - AlpnExtension.alpnStringize), + AlpnExtension.alpnStringizer), SH_ALPN (0x0010, "application_layer_protocol_negotiation", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_TO_12, @@ -239,7 +239,7 @@ AlpnExtension.shOnLoadAbsence, null, null, - AlpnExtension.alpnStringize), + AlpnExtension.alpnStringizer), EE_ALPN (0x0010, "application_layer_protocol_negotiation", SSLHandshake.ENCRYPTED_EXTENSIONS, ProtocolVersion.PROTOCOLS_OF_13, @@ -248,7 +248,7 @@ AlpnExtension.shOnLoadAbsence, null, null, - AlpnExtension.alpnStringize), + AlpnExtension.alpnStringizer), // extensions defined in RFC 6961 CH_STATUS_REQUEST_V2 (0x0011, "status_request_v2", @@ -259,7 +259,7 @@ null, null, null, - CertStatusExtension.certStatusReqV2Stringize), + CertStatusExtension.certStatusReqV2Stringizer), SH_STATUS_REQUEST_V2 (0x0011, "status_request_v2", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_TO_12, @@ -268,7 +268,7 @@ null, null, null, - CertStatusExtension.certStatusReqV2Stringize), + CertStatusExtension.certStatusReqV2Stringizer), // extensions defined in RFC 6962 SIGNED_CERT_TIMESTAMP (0x0012, "signed_certificate_timestamp"), @@ -292,7 +292,7 @@ ExtendedMasterSecretExtension.chOnLoadAbsence, null, null, - ExtendedMasterSecretExtension.emsStringize), + ExtendedMasterSecretExtension.emsStringizer), SH_EXTENDED_MASTER_SECRET (0x0017, "extended_master_secret", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_TO_12, @@ -301,7 +301,7 @@ ExtendedMasterSecretExtension.shOnLoadAbsence, null, null, - ExtendedMasterSecretExtension.emsStringize), + ExtendedMasterSecretExtension.emsStringizer), // extensions defined in RFC draft-ietf-tokbind-negotiation TOKEN_BINDING (0x0018, "token_binding "), @@ -325,7 +325,7 @@ null, null, null, - SupportedVersionsExtension.chStringize), + SupportedVersionsExtension.chStringizer), SH_SUPPORTED_VERSIONS (0x002B, "supported_versions", SSLHandshake.SERVER_HELLO, // and HelloRetryRequest @@ -335,7 +335,7 @@ null, null, null, - SupportedVersionsExtension.shStringize), + SupportedVersionsExtension.shStringizer), HRR_SUPPORTED_VERSIONS (0x002B, "supported_versions", SSLHandshake.HELLO_RETRY_REQUEST, ProtocolVersion.PROTOCOLS_OF_13, @@ -344,14 +344,14 @@ null, null, null, - SupportedVersionsExtension.hrrStringize), + SupportedVersionsExtension.hrrStringizer), MH_SUPPORTED_VERSIONS (0x002B, "supported_versions", SSLHandshake.MESSAGE_HASH, ProtocolVersion.PROTOCOLS_OF_13, SupportedVersionsExtension.hrrReproducer, null, null, null, null, - SupportedVersionsExtension.hrrStringize), + SupportedVersionsExtension.hrrStringizer), CH_COOKIE (0x002C, "cookie", SSLHandshake.CLIENT_HELLO, @@ -361,7 +361,7 @@ null, CookieExtension.chOnTradeConsumer, null, - CookieExtension.cookieStringize), + CookieExtension.cookieStringizer), HRR_COOKIE (0x002C, "cookie", SSLHandshake.HELLO_RETRY_REQUEST, ProtocolVersion.PROTOCOLS_OF_13, @@ -369,14 +369,14 @@ CookieExtension.hrrOnLoadConsumer, null, null, null, - CookieExtension.cookieStringize), + CookieExtension.cookieStringizer), MH_COOKIE (0x002C, "cookie", SSLHandshake.MESSAGE_HASH, ProtocolVersion.PROTOCOLS_OF_13, CookieExtension.hrrNetworkReproducer, null, null, null, null, - CookieExtension.cookieStringize), + CookieExtension.cookieStringizer), PSK_KEY_EXCHANGE_MODES (0x002D, "psk_key_exchange_modes", SSLHandshake.CLIENT_HELLO, @@ -386,7 +386,7 @@ PskKeyExchangeModesExtension.chOnLoadAbsence, null, PskKeyExchangeModesExtension.chOnTradeAbsence, - PskKeyExchangeModesExtension.pkemStringize), + PskKeyExchangeModesExtension.pkemStringizer), CERTIFICATE_AUTHORITIES (0x002F, "certificate_authorities"), OID_FILTERS (0x0030, "oid_filters"), POST_HANDSHAKE_AUTH (0x0030, "post_handshake_auth"), @@ -397,7 +397,7 @@ KeyShareExtension.chNetworkProducer, KeyShareExtension.chOnLoadConsumer, null, null, null, - KeyShareExtension.chStringize), + KeyShareExtension.chStringizer), SH_KEY_SHARE (0x0033, "key_share", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_OF_13, @@ -406,20 +406,20 @@ KeyShareExtension.shOnLoadAbsence, null, null, - KeyShareExtension.shStringize), + KeyShareExtension.shStringizer), HRR_KEY_SHARE (0x0033, "key_share", SSLHandshake.HELLO_RETRY_REQUEST, ProtocolVersion.PROTOCOLS_OF_13, KeyShareExtension.hrrNetworkProducer, KeyShareExtension.hrrOnLoadConsumer, null, null, null, - KeyShareExtension.hrrStringize), + KeyShareExtension.hrrStringizer), MH_KEY_SHARE (0x0033, "key_share", SSLHandshake.MESSAGE_HASH, ProtocolVersion.PROTOCOLS_OF_13, KeyShareExtension.hrrNetworkReproducer, null, null, null, null, - KeyShareExtension.hrrStringize), + KeyShareExtension.hrrStringizer), // Extensions defined in RFC 5746 CH_RENEGOTIATION_INFO (0xff01, "renegotiation_info", @@ -430,7 +430,7 @@ RenegoInfoExtension.chOnLoadAbsence, null, null, - RenegoInfoExtension.rniStringize), + RenegoInfoExtension.rniStringizer), SH_RENEGOTIATION_INFO (0xff01, "renegotiation_info", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_TO_12, @@ -439,7 +439,7 @@ RenegoInfoExtension.shOnLoadAbsence, null, null, - RenegoInfoExtension.rniStringize), + RenegoInfoExtension.rniStringizer), // TLS 1.3 PSK extension must be last CH_PRE_SHARED_KEY (0x0029, "pre_shared_key", @@ -450,7 +450,7 @@ PreSharedKeyExtension.chOnLoadAbsence, PreSharedKeyExtension.chOnTradeConsumer, null, - PreSharedKeyExtension.chStringize), + PreSharedKeyExtension.chStringizer), SH_PRE_SHARED_KEY (0x0029, "pre_shared_key", SSLHandshake.SERVER_HELLO, ProtocolVersion.PROTOCOLS_OF_13, @@ -458,7 +458,7 @@ PreSharedKeyExtension.shOnLoadConsumer, PreSharedKeyExtension.shOnLoadAbsence, null, null, - PreSharedKeyExtension.shStringize); + PreSharedKeyExtension.shStringizer); final int id; final SSLHandshake handshakeType; @@ -469,7 +469,7 @@ final HandshakeAbsence onLoadAbsence; final HandshakeConsumer onTradeConsumer; final HandshakeAbsence onTradeAbsence; - final SSLStringize stringize; + final SSLStringizer stringizer; // known but unsupported extension private SSLExtension(int id, String name) { @@ -482,7 +482,7 @@ this.onLoadAbsence = null; this.onTradeConsumer = null; this.onTradeAbsence = null; - this.stringize = null; + this.stringizer = null; } // supported extension @@ -491,7 +491,7 @@ HandshakeProducer producer, ExtensionConsumer onLoadConsumer, HandshakeAbsence onLoadAbsence, HandshakeConsumer onTradeConsumer, HandshakeAbsence onTradeAbsence, - SSLStringize stringize) { + SSLStringizer stringize) { this.id = id; this.handshakeType = handshakeType; this.name = name; @@ -501,7 +501,7 @@ this.onLoadAbsence = onLoadAbsence; this.onTradeConsumer = onTradeConsumer; this.onTradeAbsence = onTradeAbsence; - this.stringize = stringize; + this.stringizer = stringize; } static SSLExtension valueOf(SSLHandshake handshakeType, int extensionType) { @@ -600,12 +600,12 @@ Locale.ENGLISH); String extData; - if (stringize == null) { + if (stringizer == null) { HexDumpEncoder hexEncoder = new HexDumpEncoder(); String encoded = hexEncoder.encode(byteBuffer.duplicate()); extData = encoded; } else { - extData = stringize.toString(byteBuffer); + extData = stringizer.toString(byteBuffer); } Object[] messageFields = {
--- a/src/java.base/share/classes/sun/security/ssl/SSLStringize.java Fri Jun 08 09:40:28 2018 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package sun.security.ssl; - -import java.nio.ByteBuffer; - -/** - * Interface to decode a {@code ByteBuffer} into legible {@code String}. - */ -interface SSLStringize { - /** - * Returns a legible string representation of a {@code ByteBuffer}. - */ - String toString(ByteBuffer buffer); -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/share/classes/sun/security/ssl/SSLStringizer.java Fri Jun 08 11:59:34 2018 -0700 @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2018, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.security.ssl; + +import java.nio.ByteBuffer; + +/** + * Interface to decode a {@code ByteBuffer} into legible {@code String}. + */ +interface SSLStringizer { + /** + * Returns a legible string representation of a {@code ByteBuffer}. + * + * Note that the implementation MUST not change the internal status of + * the {@code buffer}. + */ + String toString(ByteBuffer buffer); +}
--- a/src/java.base/share/classes/sun/security/ssl/SSLTransport.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/SSLTransport.java Fri Jun 08 11:59:34 2018 -0700 @@ -92,7 +92,7 @@ * accessed; it must be non-negative and no larger than * {@code dsts.length} - {@code dstsOffset}. * - * @return a {@code Ciphertext} describing the result of + * @return a {@code Plaintext} describing the result of * the operation * @throws IOException if a problem was encountered while receiving or * decoding networking data
--- a/src/java.base/share/classes/sun/security/ssl/ServerNameExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/ServerNameExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -55,15 +55,15 @@ new CHServerNameProducer(); static final ExtensionConsumer chOnLoadConsumer = new CHServerNameConsumer(); - static final SSLStringize chStringize = - new CHServerNamesStringize(); + static final SSLStringizer chStringizer = + new CHServerNamesStringizer(); static final HandshakeProducer shNetworkProducer = new SHServerNameProducer(); static final ExtensionConsumer shOnLoadConsumer = new SHServerNameConsumer(); - static final SSLStringize shStringize = - new SHServerNamesStringize(); + static final SSLStringizer shStringizer = + new SHServerNamesStringizer(); static final HandshakeProducer eeNetworkProducer = new EEServerNameProducer(); @@ -175,7 +175,7 @@ } } - private static final class CHServerNamesStringize implements SSLStringize { + private static final class CHServerNamesStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try { @@ -398,7 +398,7 @@ } } - private static final class SHServerNamesStringize implements SSLStringize { + private static final class SHServerNamesStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/SignatureAlgorithmsExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/SignatureAlgorithmsExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -61,8 +61,8 @@ static final HandshakeConsumer crOnTradeConsumer = new CRSignatureSchemesUpdate(); - static final SSLStringize ssStringize = - new SignatureSchemesStringize(); + static final SSLStringizer ssStringizer = + new SignatureSchemesStringizer(); /** * The "signature_algorithms" extension. @@ -142,7 +142,7 @@ } private static final - class SignatureSchemesStringize implements SSLStringize { + class SignatureSchemesStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/SupportedGroupsExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/SupportedGroupsExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -62,8 +62,8 @@ new CHSupportedGroupsProducer(); static final ExtensionConsumer chOnLoadConsumer = new CHSupportedGroupsConsumer(); - static final SSLStringize sgsStringize = - new SupportedGroupsStringize(); + static final SSLStringizer sgsStringizer = + new SupportedGroupsStringizer(); static final HandshakeProducer eeNetworkProducer = new EESupportedGroupsProducer(); @@ -146,7 +146,7 @@ } private static final - class SupportedGroupsStringize implements SSLStringize { + class SupportedGroupsStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {
--- a/src/java.base/share/classes/sun/security/ssl/SupportedVersionsExtension.java Fri Jun 08 09:40:28 2018 -0700 +++ b/src/java.base/share/classes/sun/security/ssl/SupportedVersionsExtension.java Fri Jun 08 11:59:34 2018 -0700 @@ -45,15 +45,15 @@ new CHSupportedVersionsProducer(); static final ExtensionConsumer chOnLoadConsumer = new CHSupportedVersionsConsumer(); - static final SSLStringize chStringize = - new CHSupportedVersionsStringize(); + static final SSLStringizer chStringizer = + new CHSupportedVersionsStringizer(); static final HandshakeProducer shNetworkProducer = new SHSupportedVersionsProducer(); static final ExtensionConsumer shOnLoadConsumer = new SHSupportedVersionsConsumer(); - static final SSLStringize shStringize = - new SHSupportedVersionsStringize(); + static final SSLStringizer shStringizer = + new SHSupportedVersionsStringizer(); static final HandshakeProducer hrrNetworkProducer = new HRRSupportedVersionsProducer(); @@ -61,8 +61,8 @@ new HRRSupportedVersionsConsumer(); static final HandshakeProducer hrrReproducer = new HRRSupportedVersionsReproducer(); - static final SSLStringize hrrStringize = - new SHSupportedVersionsStringize(); + static final SSLStringizer hrrStringizer = + new SHSupportedVersionsStringizer(); /** * The "supported_versions" extension in ClientHello. */ @@ -134,7 +134,7 @@ } private static final - class CHSupportedVersionsStringize implements SSLStringize { + class CHSupportedVersionsStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try { @@ -274,7 +274,7 @@ } private static final - class SHSupportedVersionsStringize implements SSLStringize { + class SHSupportedVersionsStringizer implements SSLStringizer { @Override public String toString(ByteBuffer buffer) { try {