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 Socket
createSocket()
Socket
createSocket(String host, int port)
Socket
createSocket(String host, int port, InetAddress localAddress, int localPort)
Socket
createSocket(InetAddress host, int port)
Socket
createSocket(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 CertPathParameters
getParameters(String algorithm, String crlf, KeyStore trustStore)
Return the initialization parameters for the TrustManager.protected TrustManager[]
getTrustManagers()
Gets the initialized trust managers.protected KeyStore
getTrustStore()
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:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress host, int port) throws IOException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localAddress, int localPort) throws IOException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port) throws IOException
- Specified by:
createSocket
in 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:
GeneralSecurityException
IOException
-
getTrustManagers
protected TrustManager[] getTrustManagers() throws GeneralSecurityException, IOException
Gets the initialized trust managers.- Throws:
GeneralSecurityException
IOException
-
getParameters
protected CertPathParameters getParameters(String algorithm, String crlf, KeyStore trustStore) throws GeneralSecurityException, IOException
Return the initialization parameters for the TrustManager. Currently, only the defaultPKIX
is 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:
GeneralSecurityException
IOException
-
getCRLs
protected Collection<? extends CRL> getCRLs(String crlf) throws FileNotFoundException, GeneralSecurityException
Load the collection of CRLs.
-
-