jdk/src/java.base/share/classes/sun/security/ssl/HelloExtensions.java
changeset 45064 b1b45177051b
parent 37814 844e590a011a
equal deleted inserted replaced
45063:0909d3bcbacb 45064:b1b45177051b
     1 /*
     1 /*
     2  * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    47  *
    47  *
    48  *  . UnknownExtension: used to represent all parsed extensions that we do not
    48  *  . UnknownExtension: used to represent all parsed extensions that we do not
    49  *      explicitly support.
    49  *      explicitly support.
    50  *  . ServerNameExtension: the server_name extension.
    50  *  . ServerNameExtension: the server_name extension.
    51  *  . SignatureAlgorithmsExtension: the signature_algorithms extension.
    51  *  . SignatureAlgorithmsExtension: the signature_algorithms extension.
    52  *  . EllipticCurvesExtension: the ECC supported curves extension.
    52  *  . SupportedGroupsExtension: the supported groups extension.
    53  *  . EllipticPointFormatsExtension: the ECC supported point formats
    53  *  . EllipticPointFormatsExtension: the ECC supported point formats
    54  *      (compressed/uncompressed) extension.
    54  *      (compressed/uncompressed) extension.
    55  *  . ALPNExtension: the application_layer_protocol_negotiation extension.
    55  *  . ALPNExtension: the application_layer_protocol_negotiation extension.
    56  *
    56  *
    57  * @since   1.6
    57  * @since   1.6
    77             HelloExtension extension;
    77             HelloExtension extension;
    78             if (extType == ExtensionType.EXT_SERVER_NAME) {
    78             if (extType == ExtensionType.EXT_SERVER_NAME) {
    79                 extension = new ServerNameExtension(s, extlen);
    79                 extension = new ServerNameExtension(s, extlen);
    80             } else if (extType == ExtensionType.EXT_SIGNATURE_ALGORITHMS) {
    80             } else if (extType == ExtensionType.EXT_SIGNATURE_ALGORITHMS) {
    81                 extension = new SignatureAlgorithmsExtension(s, extlen);
    81                 extension = new SignatureAlgorithmsExtension(s, extlen);
    82             } else if (extType == ExtensionType.EXT_ELLIPTIC_CURVES) {
    82             } else if (extType == ExtensionType.EXT_SUPPORTED_GROUPS) {
    83                 extension = new EllipticCurvesExtension(s, extlen);
    83                 extension = new SupportedGroupsExtension(s, extlen);
    84             } else if (extType == ExtensionType.EXT_EC_POINT_FORMATS) {
    84             } else if (extType == ExtensionType.EXT_EC_POINT_FORMATS) {
    85                 extension = new EllipticPointFormatsExtension(s, extlen);
    85                 extension = new EllipticPointFormatsExtension(s, extlen);
    86             } else if (extType == ExtensionType.EXT_RENEGOTIATION_INFO) {
    86             } else if (extType == ExtensionType.EXT_RENEGOTIATION_INFO) {
    87                 extension = new RenegotiationInfoExtension(s, extlen);
    87                 extension = new RenegotiationInfoExtension(s, extlen);
    88             } else if (extType == ExtensionType.EXT_ALPN) {
    88             } else if (extType == ExtensionType.EXT_ALPN) {