Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/net/ssl/ExtendedSSLSession.java
38918 views
/*1* Copyright (c) 2010, 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*/2425package javax.net.ssl;2627import java.util.List;2829/**30* Extends the <code>SSLSession</code> interface to support additional31* session attributes.32*33* @since 1.734*/35public abstract class ExtendedSSLSession implements SSLSession {36/**37* Obtains an array of supported signature algorithms that the local side38* is willing to use.39* <p>40* Note: this method is used to indicate to the peer which signature41* algorithms may be used for digital signatures since TLS 1.2. It is42* not meaningful for TLS versions prior to 1.2.43* <p>44* The signature algorithm name must be a standard Java Security45* name (such as "SHA1withRSA", "SHA256withECDSA", and so on).46* See Appendix A in the <a href=47* "{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html#AppA">48* Java Cryptography Architecture API Specification & Reference </a>49* for information about standard algorithm names.50* <p>51* Note: the local supported signature algorithms should conform to52* the algorithm constraints specified by53* {@link SSLParameters#getAlgorithmConstraints getAlgorithmConstraints()}54* method in <code>SSLParameters</code>.55*56* @return An array of supported signature algorithms, in descending57* order of preference. The return value is an empty array if58* no signature algorithm is supported.59*60* @see SSLParameters#getAlgorithmConstraints61*/62public abstract String[] getLocalSupportedSignatureAlgorithms();6364/**65* Obtains an array of supported signature algorithms that the peer is66* able to use.67* <p>68* Note: this method is used to indicate to the local side which signature69* algorithms may be used for digital signatures since TLS 1.2. It is70* not meaningful for TLS versions prior to 1.2.71* <p>72* The signature algorithm name must be a standard Java Security73* name (such as "SHA1withRSA", "SHA256withECDSA", and so on).74* See Appendix A in the <a href=75* "{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html#AppA">76* Java Cryptography Architecture API Specification & Reference </a>77* for information about standard algorithm names.78*79* @return An array of supported signature algorithms, in descending80* order of preference. The return value is an empty array if81* the peer has not sent the supported signature algorithms.82*83* @see X509KeyManager84* @see X509ExtendedKeyManager85*/86public abstract String[] getPeerSupportedSignatureAlgorithms();8788/**89* Obtains a {@link List} containing all {@link SNIServerName}s90* of the requested Server Name Indication (SNI) extension.91* <P>92* In server mode, unless the return {@link List} is empty,93* the server should use the requested server names to guide its94* selection of an appropriate authentication certificate, and/or95* other aspects of security policy.96* <P>97* In client mode, unless the return {@link List} is empty,98* the client should use the requested server names to guide its99* endpoint identification of the peer's identity, and/or100* other aspects of security policy.101*102* @return a non-null immutable list of {@link SNIServerName}s of the103* requested server name indications. The returned list may be104* empty if no server name indications were requested.105* @throws UnsupportedOperationException if the underlying provider106* does not implement the operation107*108* @see SNIServerName109* @see X509ExtendedTrustManager110* @see X509ExtendedKeyManager111*112* @since 1.8113*/114public List<SNIServerName> getRequestedServerNames() {115throw new UnsupportedOperationException();116}117}118119120