Package org.conscrypt
Class OpenSSLContextImpl
java.lang.Object
javax.net.ssl.SSLContextSpi
org.conscrypt.OpenSSLContextImpl
- Direct Known Subclasses:
DefaultSSLContextImpl,OpenSSLContextImpl.TLSv1,OpenSSLContextImpl.TLSv11,OpenSSLContextImpl.TLSv12,OpenSSLContextImpl.TLSv13
OpenSSL-backed SSLContext service provider interface.
Public to allow contruction via the provider framework.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classPublic to allow construction via the provider framework.static final classPublic to allow construction via the provider framework.static final classPublic to allow construction via the provider framework.static final classPublic to allow construction via the provider framework. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientSessionContextClient session cache.private static DefaultSSLContextImplThe default SSLContextImpl for use with SSLContext.getInstance("Default").private final String[]TLS protocols to enable by default.private final ServerSessionContextServer session cache.(package private) SSLParametersImpl -
Constructor Summary
ConstructorsConstructorDescriptionOpenSSLContextImpl(String[] protocols) OpenSSLContextImpl(String[] protocols, boolean unused) Constuctor for the DefaultSSLContextImpl. -
Method Summary
Modifier and TypeMethodDescriptionengineCreateSSLEngine(String host, int port) voidengineInit(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) Initializes thisSSLContextinstance.(package private) static OpenSSLContextImplAllows outside callers to get the preferred SSLContext.Methods inherited from class javax.net.ssl.SSLContextSpi
engineGetDefaultSSLParameters, engineGetSupportedSSLParameters
-
Field Details
-
defaultSslContextImpl
The default SSLContextImpl for use with SSLContext.getInstance("Default"). Protected by the DefaultSSLContextImpl.class monitor. -
protocols
TLS protocols to enable by default. -
clientSessionContext
Client session cache. -
serverSessionContext
Server session cache. -
sslParameters
SSLParametersImpl sslParameters
-
-
Constructor Details
-
OpenSSLContextImpl
OpenSSLContextImpl(String[] protocols) -
OpenSSLContextImpl
OpenSSLContextImpl(String[] protocols, boolean unused) throws GeneralSecurityException, IOException Constuctor for the DefaultSSLContextImpl. The unused boolean parameter is solely to indicate that this constructor is desired.- Throws:
GeneralSecurityExceptionIOException
-
-
Method Details
-
getPreferred
Allows outside callers to get the preferred SSLContext. -
engineInit
public void engineInit(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) throws KeyManagementException Initializes 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
- Specified by:
engineGetSocketFactoryin classSSLContextSpi
-
engineGetServerSocketFactory
- Specified by:
engineGetServerSocketFactoryin classSSLContextSpi
-
engineCreateSSLEngine
- Specified by:
engineCreateSSLEnginein classSSLContextSpi
-
engineCreateSSLEngine
- Specified by:
engineCreateSSLEnginein classSSLContextSpi
-
engineGetServerSessionContext
- Specified by:
engineGetServerSessionContextin classSSLContextSpi
-
engineGetClientSessionContext
- Specified by:
engineGetClientSessionContextin classSSLContextSpi
-