jdk/src/java.base/share/classes/sun/security/ssl/ProtocolVersion.java
author avstepan
Wed, 06 May 2015 21:15:07 +0400
changeset 30374 2abaf49910ea
parent 28555 c7bf34f7b215
child 30904 ec0224270f90
permissions -rw-r--r--
8079478: some docs cleanup for sun.security Summary: some docs cleanup Reviewed-by: weijun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
24263
f95477ce56e4 8042449: Issue for negative byte major record version
xuelei
parents: 22068
diff changeset
     2
 * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4236
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4236
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4236
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4236
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4236
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.security.ssl;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
28555
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
    28
import java.util.*;
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
    29
import java.security.CryptoPrimitive;
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
    30
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * Type safe enum for an SSL/TLS protocol version. Instances are obtained
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * using the static factory methods or by referencing the static members
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * in this class. Member variables are final and can be accessed without
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * accessor methods.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * There is only ever one instance per supported protocol version, this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * means == can be used for comparision instead of equals() if desired.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * Checks for a particular version number should generally take this form:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 *
30374
2abaf49910ea 8079478: some docs cleanup for sun.security
avstepan
parents: 28555
diff changeset
    42
 * <pre>{@code
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * if (protocolVersion.v >= ProtocolVersion.TLS10) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 *   // TLS 1.0 code goes here
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 *   // SSL 3.0 code here
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * }
30374
2abaf49910ea 8079478: some docs cleanup for sun.security
avstepan
parents: 28555
diff changeset
    48
 * }</pre>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * @author  Andreas Sterbenz
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * @since   1.4.1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 */
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    53
public final class ProtocolVersion implements Comparable<ProtocolVersion> {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    55
    // The limit of maximum protocol version
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    56
    final static int LIMIT_MAX_VALUE = 0xFFFF;
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    57
7043
5e2d1edeb2c7 6916074: Add support for TLS 1.2
xuelei
parents: 7039
diff changeset
    58
    // The limit of minimum protocol version
5e2d1edeb2c7 6916074: Add support for TLS 1.2
xuelei
parents: 7039
diff changeset
    59
    final static int LIMIT_MIN_VALUE = 0x0000;
5e2d1edeb2c7 6916074: Add support for TLS 1.2
xuelei
parents: 7039
diff changeset
    60
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    61
    // Dummy protocol version value for invalid SSLSession
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    final static ProtocolVersion NONE = new ProtocolVersion(-1, "NONE");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    // If enabled, send/ accept SSLv2 hello messages
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    final static ProtocolVersion SSL20Hello = new ProtocolVersion(0x0002,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
                                                                "SSLv2Hello");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    // SSL 3.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    final static ProtocolVersion SSL30 = new ProtocolVersion(0x0300, "SSLv3");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    // TLS 1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    final static ProtocolVersion TLS10 = new ProtocolVersion(0x0301, "TLSv1");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    // TLS 1.1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    final static ProtocolVersion TLS11 = new ProtocolVersion(0x0302, "TLSv1.1");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    77
    // TLS 1.2
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    78
    final static ProtocolVersion TLS12 = new ProtocolVersion(0x0303, "TLSv1.2");
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    79
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    private static final boolean FIPS = SunJSSE.isFIPS();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    // minimum version we implement (SSL 3.0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    final static ProtocolVersion MIN = FIPS ? TLS10 : SSL30;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
7043
5e2d1edeb2c7 6916074: Add support for TLS 1.2
xuelei
parents: 7039
diff changeset
    85
    // maximum version we implement (TLS 1.2)
5e2d1edeb2c7 6916074: Add support for TLS 1.2
xuelei
parents: 7039
diff changeset
    86
    final static ProtocolVersion MAX = TLS12;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
22068
95a7a3cd72a0 7093640: Enable client-side TLS 1.2 by default
xuelei
parents: 14664
diff changeset
    88
    // ProtocolVersion to use by default (TLS 1.2)
95a7a3cd72a0 7093640: Enable client-side TLS 1.2 by default
xuelei
parents: 14664
diff changeset
    89
    final static ProtocolVersion DEFAULT = TLS12;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    // Default version for hello messages (SSLv2Hello)
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    92
    final static ProtocolVersion DEFAULT_HELLO = FIPS ? TLS10 : SSL30;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
28555
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
    94
    // Available protocols
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
    95
    //
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
    96
    // Including all supported protocols except the disabled ones.
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
    97
    final static Set<ProtocolVersion> availableProtocols;
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
    98
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    // version in 16 bit MSB format as it appears in records and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    // messages, i.e. 0x0301 for TLS 1.0
4236
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
   101
    public final int v;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    // major and minor version
4236
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
   104
    public final byte major, minor;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    // name used in JSSE (e.g. TLSv1 for TLS 1.0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    final String name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
28555
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   109
    // Initialize the available protocols.
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   110
    static {
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   111
        Set<ProtocolVersion> protocols = new HashSet<>(5);
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   112
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   113
        ProtocolVersion[] pvs = new ProtocolVersion[] {
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   114
                SSL20Hello, SSL30, TLS10, TLS11, TLS12};
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   115
        EnumSet<CryptoPrimitive> cryptoPrimitives =
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   116
            EnumSet.<CryptoPrimitive>of(CryptoPrimitive.KEY_AGREEMENT);
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   117
        for (ProtocolVersion p : pvs) {
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   118
            if (SSLAlgorithmConstraints.DEFAULT_SSL_ONLY.permits(
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   119
                    cryptoPrimitives, p.name, null)) {
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   120
                protocols.add(p);
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   121
            }
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   122
        }
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   123
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   124
        availableProtocols =
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   125
                Collections.<ProtocolVersion>unmodifiableSet(protocols);
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   126
    }
c7bf34f7b215 8061210: Issues in TLS
xuelei
parents: 25859
diff changeset
   127
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
    // private
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    private ProtocolVersion(int v, String name) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        this.v = v;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        this.name = name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        major = (byte)(v >>> 8);
24263
f95477ce56e4 8042449: Issue for negative byte major record version
xuelei
parents: 22068
diff changeset
   133
        minor = (byte)(v & 0xFF);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    // private
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    private static ProtocolVersion valueOf(int v) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        if (v == SSL30.v) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            return SSL30;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        } else if (v == TLS10.v) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
            return TLS10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        } else if (v == TLS11.v) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
            return TLS11;
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   144
        } else if (v == TLS12.v) {
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   145
            return TLS12;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        } else if (v == SSL20Hello.v) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
            return SSL20Hello;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        } else {
24263
f95477ce56e4 8042449: Issue for negative byte major record version
xuelei
parents: 22068
diff changeset
   149
            int major = (v >>> 8) & 0xFF;
f95477ce56e4 8042449: Issue for negative byte major record version
xuelei
parents: 22068
diff changeset
   150
            int minor = v & 0xFF;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            return new ProtocolVersion(v, "Unknown-" + major + "." + minor);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * Return a ProtocolVersion with the specified major and minor version
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * numbers. Never throws exceptions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     */
4236
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
   159
    public static ProtocolVersion valueOf(int major, int minor) {
24263
f95477ce56e4 8042449: Issue for negative byte major record version
xuelei
parents: 22068
diff changeset
   160
        return valueOf(((major & 0xFF) << 8) | (minor & 0xFF));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * Return a ProtocolVersion for the given name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * @exception IllegalArgumentException if name is null or does not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * identify a supported protocol
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    static ProtocolVersion valueOf(String name) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        if (name == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
            throw new IllegalArgumentException("Protocol cannot be null");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        }
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   173
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   174
        if (FIPS && (name.equals(SSL30.name) || name.equals(SSL20Hello.name))) {
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   175
            throw new IllegalArgumentException
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   176
                ("Only TLS 1.0 or later allowed in FIPS mode");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
        }
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   178
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
        if (name.equals(SSL30.name)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
            return SSL30;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        } else if (name.equals(TLS10.name)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
            return TLS10;
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   183
        } else if (name.equals(TLS11.name)) {
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   184
            return TLS11;
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   185
        } else if (name.equals(TLS12.name)) {
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   186
            return TLS12;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        } else if (name.equals(SSL20Hello.name)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
            return SSL20Hello;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            throw new IllegalArgumentException(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
14664
e71aa0962e70 8003950: Adds missing Override annotations and removes unnecessary imports in sun.security.ssl
xuelei
parents: 7043
diff changeset
   194
    @Override
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        return name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   199
    /**
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   200
     * Compares this object with the specified object for order.
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   201
     */
14664
e71aa0962e70 8003950: Adds missing Override annotations and removes unnecessary imports in sun.security.ssl
xuelei
parents: 7043
diff changeset
   202
    @Override
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   203
    public int compareTo(ProtocolVersion protocolVersion) {
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   204
        return this.v - protocolVersion.v;
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
   205
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
}