Methods Summary |
---|
public abstract java.net.Socket | createSocket(java.net.Socket s, java.lang.String host, int port, boolean autoClose)Creates an {@code SSLSocket} over the specified socket that is connected
to the specified host at the specified port.
|
public static javax.net.SocketFactory | getDefault()Returns the default {@code SSLSocketFactory} instance. The default is
defined by the security property {@code 'ssl.SocketFactory.provider'}.
synchronized (SSLSocketFactory.class) {
if (defaultSocketFactory != null) {
// BEGIN android-added
log("SSLSocketFactory", "Using factory " + defaultSocketFactory);
// END android-added
return defaultSocketFactory;
}
if (defaultName == null) {
AccessController.doPrivileged(new java.security.PrivilegedAction(){
public Object run() {
defaultName = Security.getProperty("ssl.SocketFactory.provider");
if (defaultName != null) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) {
cl = ClassLoader.getSystemClassLoader();
}
try {
defaultSocketFactory = (SocketFactory) Class.forName(
defaultName, true, cl).newInstance();
} catch (Exception e) {
return e;
}
}
return null;
}
});
}
if (defaultSocketFactory == null) {
// Try to find in providers
SSLContext context = DefaultSSLContext.getContext();
if (context != null) {
defaultSocketFactory = context.getSocketFactory();
}
}
if (defaultSocketFactory == null) {
// Use internal implementation
defaultSocketFactory = new DefaultSSLSocketFactory("No SSLSocketFactory installed");
}
// BEGIN android-added
log("SSLSocketFactory", "Using factory " + defaultSocketFactory);
// END android-added
return defaultSocketFactory;
}
|
public abstract java.lang.String[] | getDefaultCipherSuites()Returns the names of the cipher suites that are enabled by default.
|
public abstract java.lang.String[] | getSupportedCipherSuites()Returns the names of the cipher suites that are supported and could be
enabled for an SSL connection.
|
private static void | log(java.lang.String tag, java.lang.String msg)
Logger.getLogger(tag).info(msg);
|