Package org.jboss.modcluster.mcmp.impl
Class JSSESocketFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- org.jboss.modcluster.mcmp.impl.JSSESocketFactory
-
public class JSSESocketFactory extends SocketFactory
SSL server socket factory. It _requires_ a valid RSA key and JSSE.- Author:
- Harish Prabandham, Costin Manolache, Stefan Freyr Stefansson, EKR -- renamed to JSSESocketFactory, Jan Luehe, Bill Barker
-
-
Constructor Summary
Constructors Constructor Description JSSESocketFactory(SSLConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketcreateSocket()SocketcreateSocket(String host, int port)SocketcreateSocket(String host, int port, InetAddress localAddress, int localPort)SocketcreateSocket(InetAddress host, int port)SocketcreateSocket(InetAddress address, int port, InetAddress localAddress, int localPort)protected Collection<? extends CRL>getCRLs(String crlf)Load the collection of CRLs.protected KeyManager[]getKeyManagers()Gets the initialized key managers.protected CertPathParametersgetParameters(String algorithm, String crlf, KeyStore trustStore)Return the initialization parameters for the TrustManager.protected TrustManager[]getTrustManagers()Gets the initialized trust managers.protected KeyStoregetTrustStore()Gets the SSL server's truststore.-
Methods inherited from class javax.net.SocketFactory
getDefault
-
-
-
-
Constructor Detail
-
JSSESocketFactory
public JSSESocketFactory(SSLConfiguration config)
-
-
Method Detail
-
createSocket
public Socket createSocket() throws IOException
- Overrides:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress host, int port) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localAddress, int localPort) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
getTrustStore
protected KeyStore getTrustStore() throws IOException, KeyStoreException, NoSuchProviderException, NoSuchAlgorithmException, CertificateException
Gets the SSL server's truststore.
-
getKeyManagers
protected KeyManager[] getKeyManagers() throws GeneralSecurityException, IOException
Gets the initialized key managers.- Throws:
GeneralSecurityExceptionIOException
-
getTrustManagers
protected TrustManager[] getTrustManagers() throws GeneralSecurityException, IOException
Gets the initialized trust managers.- Throws:
GeneralSecurityExceptionIOException
-
getParameters
protected CertPathParameters getParameters(String algorithm, String crlf, KeyStore trustStore) throws GeneralSecurityException, IOException
Return the initialization parameters for the TrustManager. Currently, only the defaultPKIXis supported.- Parameters:
algorithm- The algorithm to get parameters for.crlf- The path to the CRL file.trustStore- The configured TrustStore.- Returns:
- The parameters including the CRLs and TrustStore.
- Throws:
GeneralSecurityExceptionIOException
-
getCRLs
protected Collection<? extends CRL> getCRLs(String crlf) throws FileNotFoundException, GeneralSecurityException
Load the collection of CRLs.
-
-