553N/A * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 553N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * or visit www.oracle.com if you need additional information or have any * This class defines the <i>Service Provider Interface</i> (<b>SPI</b>) * for the <code>SSLContext</code> class. * <p> All the abstract methods in this class must be implemented by each * cryptographic service provider who wishes to supply the implementation * of a particular SSL context. * Initializes this context. * @param km the sources of authentication keys * @param tm the sources of peer authentication trust decisions * @param sr the source of randomness * @throws KeyManagementException if this operation fails * @see SSLContext#init(KeyManager [], TrustManager [], SecureRandom) * Returns a <code>SocketFactory</code> object for this * @return the <code>SocketFactory</code> object * @throws IllegalStateException if the SSLContextImpl requires * initialization and the <code>engineInit()</code> * @see javax.net.ssl.SSLContext#getSocketFactory() * Returns a <code>ServerSocketFactory</code> object for * @return the <code>ServerSocketFactory</code> object * @throws IllegalStateException if the SSLContextImpl requires * initialization and the <code>engineInit()</code> * @see javax.net.ssl.SSLContext#getServerSocketFactory() * Creates a new <code>SSLEngine</code> using this context. * Applications using this factory method are providing no hints * for an internal session reuse strategy. If hints are desired, * {@link #engineCreateSSLEngine(String, int)} should be used * Some cipher suites (such as Kerberos) require remote hostname * information, in which case this factory method should not be used. * @return the <code>SSLEngine</code> Object * @throws IllegalStateException if the SSLContextImpl requires * initialization and the <code>engineInit()</code> * @see SSLContext#createSSLEngine() * Creates a <code>SSLEngine</code> using this context. * Applications using this factory method are providing hints * for an internal session reuse strategy. * Some cipher suites (such as Kerberos) require remote hostname * information, in which case peerHost needs to be specified. * @param host the non-authoritative name of the host * @param port the non-authoritative port * @return the <code>SSLEngine</code> Object * @throws IllegalStateException if the SSLContextImpl requires * initialization and the <code>engineInit()</code> * @see SSLContext#createSSLEngine(String, int) * Returns a server <code>SSLSessionContext</code> object for * @return the <code>SSLSessionContext</code> object * @see javax.net.ssl.SSLContext#getServerSessionContext() * Returns a client <code>SSLSessionContext</code> object for * @return the <code>SSLSessionContext</code> object * @see javax.net.ssl.SSLContext#getClientSessionContext() * Returns a copy of the SSLParameters indicating the default * settings for this SSL context. * <p>The parameters will always have the ciphersuite and protocols * arrays set to non-null values. * <p>The default implementation obtains the parameters from an * SSLSocket created by calling the * {@linkplain javax.net.SocketFactory#createSocket * SocketFactory.createSocket()} method of this context's SocketFactory. * @return a copy of the SSLParameters object with the default settings * @throws UnsupportedOperationException if the default SSL parameters * Returns a copy of the SSLParameters indicating the maximum supported * settings for this SSL context. * <p>The parameters will always have the ciphersuite and protocols * arrays set to non-null values. * <p>The default implementation obtains the parameters from an * SSLSocket created by calling the * {@linkplain javax.net.SocketFactory#createSocket * SocketFactory.createSocket()} method of this context's SocketFactory. * @return a copy of the SSLParameters object with the maximum supported * @throws UnsupportedOperationException if the supported SSL parameters