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
- Direct Known Subclasses:
GlassfishServerSocketFactory
public class JSSE14SocketFactory extends 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
-
-
Field Summary
-
Fields inherited from class org.glassfish.grizzly.config.ssl.JSSESocketFactory
clientAuthNeed, clientAuthWant, defaultAlgorithm, defaultProtocol, enabledCiphers, initialized, logger, sslProxy
-
Fields inherited from class org.glassfish.grizzly.config.ssl.ServerSocketFactory
attributes, context
-
-
Constructor Summary
Constructors Constructor Description JSSE14SocketFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<? extends CRL>getCRLs(String crlf)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, initServerSocket
-
Methods inherited from class org.glassfish.grizzly.config.ssl.ServerSocketFactory
getDefault, getSSLContext, initSocket, setAttribute
-
-
-
-
Method Detail
-
init
public void init() throws IOExceptionReads the keystore and initializes the SSL socket factory.- Specified by:
initin classJSSESocketFactory- Throws:
IOException
-
getKeyManagers
protected KeyManager[] getKeyManagers(String algorithm, String keyAlias) throws Exception
Gets the initialized key managers.- Throws:
Exception
-
getTrustManagers
protected TrustManager[] getTrustManagers(String algorithm) throws Exception
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
protected void setEnabledProtocols(SSLServerSocket socket, String[] protocols)
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
protected String[] getEnabledProtocols(SSLServerSocket socket, String requestedProtocols)
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
-
-