public class SSLSocketFactoryEx
extends javax.net.ssl.SSLSocketFactory
The following code was copied from http://stackoverflow.com/questions/1037590/which-cipher-suites-to-enable-for-ssl-socket/23365536#23365536
| Constructor and Description |
|---|
SSLSocketFactoryEx(javax.net.ssl.KeyManager[] km,
javax.net.ssl.TrustManager[] tm,
java.security.SecureRandom random,
Settings settings)
Constructs a new SSLSocketFactory.
|
SSLSocketFactoryEx(Settings settings)
Constructs a new SSLSocketFactory.
|
SSLSocketFactoryEx(javax.net.ssl.SSLContext ctx,
Settings settings)
Constructs a new SSLSocketFactory.
|
| Modifier and Type | Method and Description |
|---|---|
java.net.Socket |
createSocket(java.net.InetAddress host,
int port) |
java.net.Socket |
createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddress,
int localPort) |
java.net.Socket |
createSocket(java.net.Socket s,
java.lang.String host,
int port,
boolean autoClose) |
java.net.Socket |
createSocket(java.lang.String host,
int port) |
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress localHost,
int localPort) |
java.lang.String[] |
getDefaultCipherSuites() |
java.lang.String[] |
getDefaultProtocols()
Returns the default protocols.
|
protected java.lang.String[] |
getProtocolList()
Returns the protocol list.
|
java.lang.String[] |
getSupportedCipherSuites() |
java.lang.String[] |
getSupportedProtocols()
Returns the supported protocols.
|
public SSLSocketFactoryEx(Settings settings) throws java.security.NoSuchAlgorithmException, java.security.KeyManagementException
settings - reference to the configured settingsjava.security.NoSuchAlgorithmException - thrown when an algorithm
is not supportedjava.security.KeyManagementException - thrown if initialization
failspublic SSLSocketFactoryEx(javax.net.ssl.KeyManager[] km,
javax.net.ssl.TrustManager[] tm,
java.security.SecureRandom random,
Settings settings)
throws java.security.NoSuchAlgorithmException,
java.security.KeyManagementException
km - the key managertm - the trust managerrandom - secure randomsettings - reference to the configured settingsjava.security.NoSuchAlgorithmException - thrown when an algorithm
is not supportedjava.security.KeyManagementException - thrown if initialization
failspublic SSLSocketFactoryEx(javax.net.ssl.SSLContext ctx,
Settings settings)
throws java.security.NoSuchAlgorithmException,
java.security.KeyManagementException
ctx - the SSL contextsettings - reference to the configured settingsjava.security.NoSuchAlgorithmException - thrown when an algorithm
is not supportedjava.security.KeyManagementException - thrown if initialization
failspublic java.lang.String[] getDefaultCipherSuites()
Returns the default cipher suites.
getDefaultCipherSuites in class javax.net.ssl.SSLSocketFactorypublic java.lang.String[] getSupportedCipherSuites()
Returns the supported cipher suites.
getSupportedCipherSuites in class javax.net.ssl.SSLSocketFactorypublic java.lang.String[] getDefaultProtocols()
public java.lang.String[] getSupportedProtocols()
public java.net.Socket createSocket(java.net.Socket s,
java.lang.String host,
int port,
boolean autoClose)
throws java.io.IOException
Creates an SSL Socket.
createSocket in class javax.net.ssl.SSLSocketFactoryjava.io.IOExceptionpublic java.net.Socket createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddress,
int localPort)
throws java.io.IOException
Creates a new SSL Socket.
createSocket in class javax.net.SocketFactoryjava.io.IOExceptionpublic java.net.Socket createSocket(java.lang.String host,
int port,
java.net.InetAddress localHost,
int localPort)
throws java.io.IOException
Creates a new SSL Socket.
createSocket in class javax.net.SocketFactoryjava.io.IOExceptionpublic java.net.Socket createSocket(java.net.InetAddress host,
int port)
throws java.io.IOException
Creates a new SSL Socket.
createSocket in class javax.net.SocketFactoryjava.io.IOExceptionpublic java.net.Socket createSocket(java.lang.String host,
int port)
throws java.io.IOException
Creates a new SSL Socket.
createSocket in class javax.net.SocketFactoryjava.io.IOExceptionprotected java.lang.String[] getProtocolList()
Copyright© 2012-21 Jeremy Long. All Rights Reserved.