public class SSLSocketFactoryEx extends 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(KeyManager[] km,
TrustManager[] tm,
SecureRandom random,
Settings settings)
Constructs a new SSLSocketFactory.
|
SSLSocketFactoryEx(Settings settings)
Constructs a new SSLSocketFactory.
|
SSLSocketFactoryEx(SSLContext ctx,
Settings settings)
Constructs a new SSLSocketFactory.
|
| Modifier and Type | Method and Description |
|---|---|
Socket |
createSocket(InetAddress host,
int port) |
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort) |
Socket |
createSocket(Socket s,
String host,
int port,
boolean autoClose) |
Socket |
createSocket(String host,
int port) |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort) |
String[] |
getDefaultCipherSuites() |
String[] |
getDefaultProtocols()
Returns the default protocols.
|
protected String[] |
getProtocolList()
Returns the protocol list.
|
String[] |
getSupportedCipherSuites() |
String[] |
getSupportedProtocols()
Returns the supported protocols.
|
createSocket, getDefaultcreateSocketpublic SSLSocketFactoryEx(Settings settings) throws NoSuchAlgorithmException, KeyManagementException
settings - reference to the configured settingsNoSuchAlgorithmException - thrown when an algorithm
is not supportedKeyManagementException - thrown if initialization
failspublic SSLSocketFactoryEx(KeyManager[] km, TrustManager[] tm, SecureRandom random, Settings settings) throws NoSuchAlgorithmException, KeyManagementException
km - the key managertm - the trust managerrandom - secure randomsettings - reference to the configured settingsNoSuchAlgorithmException - thrown when an algorithm
is not supportedKeyManagementException - thrown if initialization
failspublic SSLSocketFactoryEx(SSLContext ctx, Settings settings) throws NoSuchAlgorithmException, KeyManagementException
ctx - the SSL contextsettings - reference to the configured settingsNoSuchAlgorithmException - thrown when an algorithm
is not supportedKeyManagementException - thrown if initialization
failspublic String[] getDefaultCipherSuites()
Returns the default cipher suites.
getDefaultCipherSuites in class SSLSocketFactorypublic String[] getSupportedCipherSuites()
Returns the supported cipher suites.
getSupportedCipherSuites in class SSLSocketFactorypublic String[] getDefaultProtocols()
public String[] getSupportedProtocols()
public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException
Creates an SSL Socket.
createSocket in class SSLSocketFactoryIOExceptionpublic Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
Creates a new SSL Socket.
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException
Creates a new SSL Socket.
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(InetAddress host, int port) throws IOException
Creates a new SSL Socket.
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port) throws IOException
Creates a new SSL Socket.
createSocket in class SocketFactoryIOExceptionprotected String[] getProtocolList()
Copyright © 2012–2020 OWASP. All rights reserved.