Package org.glassfish.grizzly.config.ssl
Class JSSE14SocketFactory
java.lang.Object
org.glassfish.grizzly.config.ssl.ServerSocketFactory
org.glassfish.grizzly.config.ssl.JSSESocketFactory
org.glassfish.grizzly.config.ssl.JSSE14SocketFactory
- All Implemented Interfaces:
Cloneable
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
-
Field Summary
Fields inherited from class org.glassfish.grizzly.config.ssl.JSSESocketFactory
clientAuthNeed, clientAuthWant, defaultAlgorithm, defaultProtocol, enabledCiphers, initialized, logger, sslProxyFields inherited from class org.glassfish.grizzly.config.ssl.ServerSocketFactory
attributes, context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<? extends CRL>Load the collection of CRLs.protected String[]getEnabledProtocols(SSLServerSocket socket, String requestedProtocols) Determines the SSL protocol variants to be enabled.protected KeyManager[]getKeyManagers(String algorithm, String keyAlias) Gets the initialized key managers.protected CertPathParametersgetParameters(String algorithm, String crlf, KeyStore trustStore) Return the initialization parameters for the TrustManager.protected TrustManager[]getTrustManagers(String algorithm) Gets the initialized trust managers.voidinit()Reads the keystore and initializes the SSL socket factory.protected voidsetEnabledProtocols(SSLServerSocket socket, String[] protocols) Set the SSL protocol variants to be enabled.Methods inherited from class org.glassfish.grizzly.config.ssl.JSSESocketFactory
acceptSocket, createSocket, createSocket, createSocket, getEnabledCiphers, getKeystore, getKeystorePassword, getTrustStore, getTruststorePassword, handshake, initServerSocketMethods inherited from class org.glassfish.grizzly.config.ssl.ServerSocketFactory
getDefault, getSSLContext, initSocket, setAttribute
-
Constructor Details
-
JSSE14SocketFactory
public JSSE14SocketFactory()
-
-
Method Details
-
init
Reads the keystore and initializes the SSL socket factory.- Specified by:
initin classJSSESocketFactory- Throws:
IOException
-
getKeyManagers
Gets the initialized key managers.- Throws:
Exception
-
getTrustManagers
Gets the initialized trust managers.- Throws:
Exception
-
getParameters
protected CertPathParameters getParameters(String algorithm, String crlf, KeyStore trustStore) throws Exception 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:
Exception
-
getCRLs
protected Collection<? extends CRL> getCRLs(String crlf) throws IOException, CRLException, CertificateException Load the collection of CRLs. -
setEnabledProtocols
Description copied from class:JSSESocketFactorySet the SSL protocol variants to be enabled.- Specified by:
setEnabledProtocolsin classJSSESocketFactory- Parameters:
socket- the SSLServerSocket.protocols- the protocols to use.
-
getEnabledProtocols
Description copied from class:JSSESocketFactoryDetermines the SSL protocol variants to be enabled.- Specified by:
getEnabledProtocolsin classJSSESocketFactory- Parameters:
socket- The socket to get supported list from.requestedProtocols- Comma-separated list of requested SSL protocol variants- Returns:
- Array of SSL protocol variants to be enabled, or null if none of the requested protocol variants are supported
-