-
public class SafeSSLSocketFactory extends SSLSocketFactory
This is a decorator for the SSLSocketFactory which modifies the enabled TLS protocols for each created SSLSocket to only use the protocols which are considered to be safe.
This class was created because the
{@code SSLContext.getInstance()}method does not allow specifying precisely which TLS protocols can be used and which cannot.
-
-
Constructor Summary
Constructors Constructor Description SafeSSLSocketFactory(SSLSocketFactory factory)
-
Method Summary
Modifier and Type Method Description Array<String>getDefaultCipherSuites()Array<String>getSupportedCipherSuites()SocketcreateSocket()SocketcreateSocket(Socket socket, String host, int port, boolean autoClose)SocketcreateSocket(String host, int port)SocketcreateSocket(String host, int port, InetAddress localHost, int localPort)SocketcreateSocket(InetAddress host, int port)SocketcreateSocket(InetAddress address, int port, InetAddress localAddress, int localPort)-
-
Constructor Detail
-
SafeSSLSocketFactory
SafeSSLSocketFactory(SSLSocketFactory factory)
-
-
Method Detail
-
getDefaultCipherSuites
Array<String> getDefaultCipherSuites()
-
getSupportedCipherSuites
Array<String> getSupportedCipherSuites()
-
createSocket
Socket createSocket()
-
createSocket
Socket createSocket(Socket socket, String host, int port, boolean autoClose)
-
createSocket
Socket createSocket(String host, int port)
-
createSocket
Socket createSocket(String host, int port, InetAddress localHost, int localPort)
-
createSocket
Socket createSocket(InetAddress host, int port)
-
createSocket
Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
-
-
-
-