Package org.keycloak.truststore
Class SSLSocketFactory
- java.lang.Object
- 
- javax.net.SocketFactory
- 
- javax.net.ssl.SSLSocketFactory
- 
- org.keycloak.truststore.SSLSocketFactory
 
 
 
- 
- All Implemented Interfaces:
- Comparator
 
 public class SSLSocketFactory extends SSLSocketFactory implements Comparator Using this class is ugly, but it is the only way to push our truststore to the default LDAP client implementation.This SSLSocketFactory can only use truststore configured by TruststoreProvider after the ProviderFactory was initialized using standard Spi load / init mechanism. That will only happen if "truststore" provider is configured by the Keycloak Provider SPI configuration mechanism If TruststoreProvider is not available this SSLSocketFactory will delegate all operations to the SSLSocketFactory returned by CryptoProvider.wrapFactoryForTruststore(javax.net.ssl.SSLSocketFactory), which will delegate further to the factory returned by javax.net.ssl.SSLSocketFactory.getDefault().- Author:
- Marko Strukelj
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Object socketFactory1, Object socketFactory2)SocketcreateSocket()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)SocketcreateSocket(Socket socket, String host, int port, boolean autoClose)static SSLSocketFactorygetDefault()String[]getDefaultCipherSuites()String[]getSupportedCipherSuites()- 
Methods inherited from class javax.net.ssl.SSLSocketFactorycreateSocket
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.util.Comparatorequals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
 
- 
 
- 
- 
- 
Method Detail- 
getDefaultpublic static SSLSocketFactory getDefault() 
 - 
getDefaultCipherSuitespublic String[] getDefaultCipherSuites() - Specified by:
- getDefaultCipherSuitesin class- SSLSocketFactory
 
 - 
getSupportedCipherSuitespublic String[] getSupportedCipherSuites() - Specified by:
- getSupportedCipherSuitesin class- SSLSocketFactory
 
 - 
createSocketpublic Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException - Specified by:
- createSocketin class- SSLSocketFactory
- Throws:
- IOException
 
 - 
createSocketpublic Socket createSocket(String host, int port) throws IOException - Specified by:
- createSocketin class- SocketFactory
- Throws:
- IOException
 
 - 
createSocketpublic Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException - Specified by:
- createSocketin class- SocketFactory
- Throws:
- IOException
 
 - 
createSocketpublic Socket createSocket(InetAddress host, int port) throws IOException - Specified by:
- createSocketin class- SocketFactory
- Throws:
- IOException
 
 - 
createSocketpublic Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException - Specified by:
- createSocketin class- SocketFactory
- Throws:
- IOException
 
 - 
createSocketpublic Socket createSocket() throws IOException - Overrides:
- createSocketin class- SocketFactory
- Throws:
- IOException
 
 - 
comparepublic int compare(Object socketFactory1, Object socketFactory2) - Specified by:
- comparein interface- Comparator
 
 
- 
 
-