Top Description Inners Fields Constructors Methods
org.conscrypt

public abstract Class OpenSSLContextImpl

extends SSLContextSpi
Class Inheritance
Known Direct Subclasses
org.conscrypt.OpenSSLContextImpl.TLSv13, org.conscrypt.OpenSSLContextImpl.TLSv12, org.conscrypt.OpenSSLContextImpl.TLSv11, org.conscrypt.OpenSSLContextImpl.TLSv1, org.conscrypt.DefaultSSLContextImpl
Annotations
@Internal
Static Imports
org.conscrypt.Platform.wrapEngine

OpenSSL-backed SSLContext service provider interface.

Public to allow contruction via the provider framework.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
OpenSSLContextImpl.TLSv1

Public to allow construction via the provider framework.

public static class
OpenSSLContextImpl.TLSv11

Public to allow construction via the provider framework.

public static class
OpenSSLContextImpl.TLSv12

Public to allow construction via the provider framework.

public static class
OpenSSLContextImpl.TLSv13

Public to allow construction via the provider framework.

Field Summary

Modifier and TypeField and Description
private final ClientSessionContext
clientSessionContext

Client session cache.

private static DefaultSSLContextImpl
defaultSslContextImpl

The default SSLContextImpl for use with SSLContext.getInstance("Default").

private final String[]
protocols

TLS protocols to enable by default.

private final ServerSessionContext
serverSessionContext

Server session cache.

pack-priv SSLParametersImpl

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
OpenSSLContextImpl(String[] protocols, boolean unused)

Constuctor for the DefaultSSLContextImpl.

Method Summary

Modifier and TypeMethod and Description
public SSLEngine
engineCreateSSLEngine(String
the non-authoritative name of the host
host
,
int
the non-authoritative port
port
)

Implements abstract javax.net.ssl.SSLContextSpi.engineCreateSSLEngine.

Creates a SSLEngine using this context.
public SSLEngine
engineCreateSSLEngine()

Implements abstract javax.net.ssl.SSLContextSpi.engineCreateSSLEngine.

Creates a new SSLEngine using this context.
public SSLSessionContext
engineGetClientSessionContext()

Implements abstract javax.net.ssl.SSLContextSpi.engineGetClientSessionContext.

Returns a client SSLSessionContext object for this context.
public SSLSessionContext
engineGetServerSessionContext()

Implements abstract javax.net.ssl.SSLContextSpi.engineGetServerSessionContext.

Returns a server SSLSessionContext object for this context.
public SSLServerSocketFactory
engineGetServerSocketFactory()

Implements abstract javax.net.ssl.SSLContextSpi.engineGetServerSocketFactory.

Returns a ServerSocketFactory object for this context.
public SSLSocketFactory
engineGetSocketFactory()

Implements abstract javax.net.ssl.SSLContextSpi.engineGetSocketFactory.

Returns a SocketFactory object for this context.
public void
engineInit(KeyManager[]
the key sources or null
kms
,
TrustManager[]
the trust decision sources or null
tms
,
SecureRandom
the randomness source or null
sr
)

Implements abstract javax.net.ssl.SSLContextSpi.engineInit.

Initializes this SSLContext instance.
pack-priv static OpenSSLContextImpl
getPreferred()

Allows outside callers to get the preferred SSLContext.

Inherited from javax.net.ssl.SSLContextSpi:
engineGetDefaultSSLParametersengineGetSupportedSSLParameters

Field Detail

clientSessionContextback to summary
private final ClientSessionContext clientSessionContext

Client session cache.

defaultSslContextImplback to summary
private static DefaultSSLContextImpl defaultSslContextImpl

The default SSLContextImpl for use with SSLContext.getInstance("Default"). Protected by the DefaultSSLContextImpl.class monitor.

protocolsback to summary
private final String[] protocols

TLS protocols to enable by default.

serverSessionContextback to summary
private final ServerSessionContext serverSessionContext

Server session cache.

sslParametersback to summary
pack-priv SSLParametersImpl sslParameters

Constructor Detail

OpenSSLContextImplback to summary
pack-priv OpenSSLContextImpl(String[] protocols)
OpenSSLContextImplback to summary
pack-priv 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.

Method Detail

engineCreateSSLEngineback to summary
public SSLEngine engineCreateSSLEngine(String host, int port)

Implements abstract javax.net.ssl.SSLContextSpi.engineCreateSSLEngine.

Doc from javax.net.ssl.SSLContextSpi.engineCreateSSLEngine.

Creates a SSLEngine using this context.

Applications using this factory method are providing hints for an internal session reuse strategy.

Some cipher suites (such as Kerberos) require remote hostname information, in which case peerHost needs to be specified.

Parameters
host:String

the non-authoritative name of the host

port:int

the non-authoritative port

Returns:SSLEngine

the SSLEngine Object

Annotations
@Override
engineCreateSSLEngineback to summary
public SSLEngine engineCreateSSLEngine()

Implements abstract javax.net.ssl.SSLContextSpi.engineCreateSSLEngine.

Doc from javax.net.ssl.SSLContextSpi.engineCreateSSLEngine.

Creates a new SSLEngine using this context.

Applications using this factory method are providing no hints for an internal session reuse strategy. If hints are desired, engineCreateSSLEngine(String, int) should be used instead.

Some cipher suites (such as Kerberos) require remote hostname information, in which case this factory method should not be used.

Returns:SSLEngine

the SSLEngine Object

Annotations
@Override
engineGetClientSessionContextback to summary
public SSLSessionContext engineGetClientSessionContext()

Implements abstract javax.net.ssl.SSLContextSpi.engineGetClientSessionContext.

Doc from javax.net.ssl.SSLContextSpi.engineGetClientSessionContext.

Returns a client SSLSessionContext object for this context.

Returns:SSLSessionContext

the SSLSessionContext object

Annotations
@Override
engineGetServerSessionContextback to summary
public SSLSessionContext engineGetServerSessionContext()

Implements abstract javax.net.ssl.SSLContextSpi.engineGetServerSessionContext.

Doc from javax.net.ssl.SSLContextSpi.engineGetServerSessionContext.

Returns a server SSLSessionContext object for this context.

Returns:SSLSessionContext

the SSLSessionContext object

Annotations
@Override
engineGetServerSocketFactoryback to summary
public SSLServerSocketFactory engineGetServerSocketFactory()

Implements abstract javax.net.ssl.SSLContextSpi.engineGetServerSocketFactory.

Doc from javax.net.ssl.SSLContextSpi.engineGetServerSocketFactory.

Returns a ServerSocketFactory object for this context.

Returns:SSLServerSocketFactory

the ServerSocketFactory object

Annotations
@Override
engineGetSocketFactoryback to summary
public SSLSocketFactory engineGetSocketFactory()

Implements abstract javax.net.ssl.SSLContextSpi.engineGetSocketFactory.

Doc from javax.net.ssl.SSLContextSpi.engineGetSocketFactory.

Returns a SocketFactory object for this context.

Returns:SSLSocketFactory

the SocketFactory object

Annotations
@Override
engineInitback to summary
public void engineInit(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) throws KeyManagementException

Implements abstract javax.net.ssl.SSLContextSpi.engineInit.

Initializes this SSLContext instance. All of the arguments are optional, and the security providers will be searched for the required implementations of the needed algorithms.

Parameters
kms:KeyManager[]

the key sources or null

tms:TrustManager[]

the trust decision sources or null

sr:SecureRandom

the randomness source or null

Annotations
@Override
Exceptions
KeyManagementException:
if initializing this instance fails
getPreferredback to summary
pack-priv static OpenSSLContextImpl getPreferred()

Allows outside callers to get the preferred SSLContext.

org.conscrypt back to summary

public final Class OpenSSLContextImpl.TLSv1

extends OpenSSLContextImpl
Class Inheritance

Public to allow construction via the provider framework.

Field Summary

Inherited from org.conscrypt.OpenSSLContextImpl:
sslParameters

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.conscrypt.OpenSSLContextImpl:
engineCreateSSLEngineengineCreateSSLEngineengineGetClientSessionContextengineGetServerSessionContextengineGetServerSocketFactoryengineGetSocketFactoryengineInitgetPreferred

Constructor Detail

TLSv1back to summary
public TLSv1()
org.conscrypt back to summary

public final Class OpenSSLContextImpl.TLSv11

extends OpenSSLContextImpl
Class Inheritance

Public to allow construction via the provider framework.

Field Summary

Inherited from org.conscrypt.OpenSSLContextImpl:
sslParameters

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.conscrypt.OpenSSLContextImpl:
engineCreateSSLEngineengineCreateSSLEngineengineGetClientSessionContextengineGetServerSessionContextengineGetServerSocketFactoryengineGetSocketFactoryengineInitgetPreferred

Constructor Detail

TLSv11back to summary
public TLSv11()
org.conscrypt back to summary

public final Class OpenSSLContextImpl.TLSv12

extends OpenSSLContextImpl
Class Inheritance

Public to allow construction via the provider framework.

Field Summary

Inherited from org.conscrypt.OpenSSLContextImpl:
sslParameters

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.conscrypt.OpenSSLContextImpl:
engineCreateSSLEngineengineCreateSSLEngineengineGetClientSessionContextengineGetServerSessionContextengineGetServerSocketFactoryengineGetSocketFactoryengineInitgetPreferred

Constructor Detail

TLSv12back to summary
public TLSv12()
org.conscrypt back to summary

public final Class OpenSSLContextImpl.TLSv13

extends OpenSSLContextImpl
Class Inheritance

Public to allow construction via the provider framework.

Field Summary

Inherited from org.conscrypt.OpenSSLContextImpl:
sslParameters

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.conscrypt.OpenSSLContextImpl:
engineCreateSSLEngineengineCreateSSLEngineengineGetClientSessionContextengineGetServerSessionContextengineGetServerSocketFactoryengineGetSocketFactoryengineInitgetPreferred

Constructor Detail

TLSv13back to summary
public TLSv13()