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 class
Public to allow construction via the provider framework.static final class
Public to allow construction via the provider framework.static final class
Public to allow construction via the provider framework.static final class
Public to allow construction via the provider framework. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientSessionContext
Client session cache.private static DefaultSSLContextImpl
The default SSLContextImpl for use with SSLContext.getInstance("Default").private final String[]
TLS protocols to enable by default.private final ServerSessionContext
Server 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) void
engineInit
(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) Initializes thisSSLContext
instance.(package private) static OpenSSLContextImpl
Allows 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:
GeneralSecurityException
IOException
-
-
Method Details
-
getPreferred
Allows outside callers to get the preferred SSLContext. -
engineInit
public void engineInit(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) throws KeyManagementException Initializes thisSSLContext
instance. All of the arguments are optional, and the security providers will be searched for the required implementations of the needed algorithms.- Specified by:
engineInit
in classSSLContextSpi
- Parameters:
kms
- the key sources ornull
tms
- the trust decision sources ornull
sr
- the randomness source ornull
- Throws:
KeyManagementException
- if initializing this instance fails
-
engineGetSocketFactory
- Specified by:
engineGetSocketFactory
in classSSLContextSpi
-
engineGetServerSocketFactory
- Specified by:
engineGetServerSocketFactory
in classSSLContextSpi
-
engineCreateSSLEngine
- Specified by:
engineCreateSSLEngine
in classSSLContextSpi
-
engineCreateSSLEngine
- Specified by:
engineCreateSSLEngine
in classSSLContextSpi
-
engineGetServerSessionContext
- Specified by:
engineGetServerSessionContext
in classSSLContextSpi
-
engineGetClientSessionContext
- Specified by:
engineGetClientSessionContext
in classSSLContextSpi
-