Path: blob/master/test/jdk/javax/net/ssl/templates/SSLCapabilities.java
41152 views
/*1* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425import java.util.List;26import javax.net.ssl.SNIServerName;2728/**29* Encapsulates the security capabilities of an SSL/TLS connection.30* <P>31* The security capabilities are the list of ciphersuites to be accepted in32* an SSL/TLS handshake, the record version, the hello version, and server33* name indication, etc., of an SSL/TLS connection.34* <P>35* <code>SSLCapabilities</code> can be retrieved by exploring the network36* data of an SSL/TLS connection via {@link SSLExplorer#explore(ByteBuffer)}37* or {@link SSLExplorer#explore(byte[], int, int)}.38*39* @see SSLExplorer40*/41public abstract class SSLCapabilities {4243/**44* Returns the record version of an SSL/TLS connection45*46* @return a non-null record version47*/48public abstract String getRecordVersion();4950/**51* Returns the hello version of an SSL/TLS connection52*53* @return a non-null hello version54*/55public abstract String getHelloVersion();5657/**58* Returns a <code>List</code> containing all {@link SNIServerName}s59* of the server name indication.60*61* @return a non-null immutable list of {@link SNIServerName}s62* of the server name indication parameter, may be empty63* if no server name indication.64*65* @see SNIServerName66*/67public abstract List<SNIServerName> getServerNames();68}69707172