SSLSocketFactory.java revision 0
2362N/A * Copyright 1997-2007 Sun Microsystems, Inc. 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. Sun designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Sun 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, 2362N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A * <code>SSLSocketFactory</code>s create <code>SSLSocket</code>s. 0N/A * @author David Brownell 0N/A * Constructor is used only by subclasses. 0N/A * Returns the default SSL socket factory. 0N/A * <p>The first time this method is called, the security property 0N/A * "ssl.SocketFactory.provider" is examined. If it is non-null, a class by 0N/A * that name is loaded and instantiated. If that is successful and the 0N/A * object is an instance of SSLSocketFactory, it is made the default SSL 0N/A * <p>Otherwise, this method returns 0N/A * <code>SSLContext.getDefault().getSocketFactory()</code>. If that 0N/A * call fails, an inoperative factory is returned. 0N/A * @return the default <code>SocketFactory</code> 0N/A * @see SSLContext#getDefault 0N/A log(
"setting up default SSLSocketFactory");
* Returns the list of cipher suites which are enabled by default. * Unless a different list is enabled, handshaking on an SSL connection * will use one of these cipher suites. The minimum quality of service * for these defaults requires confidentiality protection and server * authentication (that is, no anonymous cipher suites). * @see #getSupportedCipherSuites() * @return array of the cipher suites enabled by default * Returns the names of the cipher suites which could be enabled for use * on an SSL connection. Normally, only a subset of these will actually * be enabled by default, since this list may include cipher suites which * do not meet quality of service requirements for those defaults. Such * cipher suites are useful in specialized applications. * @see #getDefaultCipherSuites() * @return an array of cipher suite names * Returns a socket layered over an existing socket connected to the named * host, at the given port. This constructor can be used when tunneling SSL * through a proxy or when negotiating the use of SSL over an existing * socket. The host and port refer to the logical peer destination. * This socket is configured using the socket options established for * @param s the existing socket * @param host the server host * @param port the server port * @param autoClose close the underlying socket when this socket is closed * @return a socket connected to the specified host and port * @throws IOException if an I/O error occurs when creating the socket * @throws NullPointerException if the parameter s is null