Package org.conscrypt
Class SSLContextImpl
java.lang.Object
javax.net.ssl.SSLContextSpi
org.conscrypt.SSLContextImpl
- Direct Known Subclasses:
OpenSSLContextImpl
public class SSLContextImpl extends SSLContextSpi
Implementation of SSLContext service provider interface.
-
Field Summary
Fields Modifier and Type Field Description protected SSLParametersImplsslParameters -
Constructor Summary
Constructors Modifier Constructor Description SSLContextImpl()protectedSSLContextImpl(DefaultSSLContextImpl dummy)Constuctor for the DefaultSSLContextImpl. -
Method Summary
Modifier and Type Method Description SSLEngineengineCreateSSLEngine()Creates anSSLEngineinstance from this context.SSLEngineengineCreateSSLEngine(String host, int port)Creates anSSLEngineinstance from this context with the specified hostname and port.ClientSessionContextengineGetClientSessionContext()Returns the SSL session context that encapsulates the set of SSL sessions that can be used for the client side of the SSL handshake.ServerSessionContextengineGetServerSessionContext()Returns the SSL session context that encapsulates the set of SSL sessions that can be used for the server side of the SSL handshake.SSLServerSocketFactoryengineGetServerSocketFactory()Returns a server socket factory for this instance.SSLSocketFactoryengineGetSocketFactory()Returns a socket factory for this instance.voidengineInit(KeyManager[] kms, TrustManager[] tms, SecureRandom sr)Initializes thisSSLContextinstance.Methods inherited from class javax.net.ssl.SSLContextSpi
engineGetDefaultSSLParameters, engineGetSupportedSSLParameters
-
Field Details
-
sslParameters
-
-
Constructor Details
-
SSLContextImpl
public SSLContextImpl() -
SSLContextImpl
Constuctor for the DefaultSSLContextImpl.- Parameters:
dummy- is null, used to distinguish this case from the public SSLContextImpl() constructor.- Throws:
GeneralSecurityExceptionIOException
-
-
Method Details
-
engineInit
public void engineInit(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) throws KeyManagementExceptionInitializes thisSSLContextinstance. All of the arguments are optional, and the security providers will be searched for the required implementations of the needed algorithms.- Specified by:
engineInitin classSSLContextSpi- Parameters:
kms- the key sources ornulltms- the trust decision sources ornullsr- the randomness source ornull- Throws:
KeyManagementException- if initializing this instance fails
-
engineGetSocketFactory
Description copied from class:SSLContextSpiReturns a socket factory for this instance.- Specified by:
engineGetSocketFactoryin classSSLContextSpi- Returns:
- a socket factory for this instance.
-
engineGetServerSocketFactory
Description copied from class:SSLContextSpiReturns a server socket factory for this instance.- Specified by:
engineGetServerSocketFactoryin classSSLContextSpi- Returns:
- a server socket factory for this instance.
-
engineCreateSSLEngine
Description copied from class:SSLContextSpiCreates anSSLEngineinstance from this context with the specified hostname and port.- Specified by:
engineCreateSSLEnginein classSSLContextSpi- Parameters:
host- the name of the hostport- the port- Returns:
- an
SSLEngineinstance from this context.
-
engineCreateSSLEngine
Description copied from class:SSLContextSpiCreates anSSLEngineinstance from this context.- Specified by:
engineCreateSSLEnginein classSSLContextSpi- Returns:
- an
SSLEngineinstance from this context.
-
engineGetServerSessionContext
Description copied from class:SSLContextSpiReturns the SSL session context that encapsulates the set of SSL sessions that can be used for the server side of the SSL handshake.- Specified by:
engineGetServerSessionContextin classSSLContextSpi- Returns:
- the SSL server session context for this context or
nullif the underlying provider does not provide an implementation of theSSLSessionContextinterface.
-
engineGetClientSessionContext
Description copied from class:SSLContextSpiReturns the SSL session context that encapsulates the set of SSL sessions that can be used for the client side of the SSL handshake.- Specified by:
engineGetClientSessionContextin classSSLContextSpi- Returns:
- the SSL client session context for this context or
nullif the underlying provider does not provide an implementation of theSSLSessionContextinterface.
-