Package org.jboss.modcluster.mcmp.impl
Class JSSESocketFactory
java.lang.Object
javax.net.SocketFactory
org.jboss.modcluster.mcmp.impl.JSSESocketFactory
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
-
Method Summary
Modifier and TypeMethodDescriptioncreateSocket
(String host, int port) createSocket
(String host, int port, InetAddress localAddress, int localPort) createSocket
(InetAddress host, int port) createSocket
(InetAddress address, int port, InetAddress localAddress, int localPort) protected Collection<? extends CRL>
Load the collection of CRLs.protected KeyManager[]
Gets the initialized key managers.protected CertPathParameters
getParameters
(String algorithm, String crlf, KeyStore trustStore) Return the initialization parameters for the TrustManager.protected TrustManager[]
Gets the initialized trust managers.protected KeyStore
Gets the SSL server's truststore.Methods inherited from class javax.net.SocketFactory
getDefault
-
Constructor Details
-
JSSESocketFactory
-
-
Method Details
-
createSocket
- Overrides:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
- 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
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
getTrustStore
protected KeyStore getTrustStore() throws IOException, KeyStoreException, NoSuchProviderException, NoSuchAlgorithmException, CertificateExceptionGets the SSL server's truststore. -
getKeyManagers
Gets the initialized key managers.- Throws:
GeneralSecurityException
IOException
-
getTrustManagers
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.
-