public class MySSLContextSpi extends SSLContextSpi
Modifier and Type | Class and Description |
---|---|
class |
MySSLContextSpi.tmpSSLEngine |
Constructor and Description |
---|
MySSLContextSpi() |
Modifier and Type | Method and Description |
---|---|
protected SSLEngine |
engineCreateSSLEngine()
Creates an
SSLEngine instance from this context. |
protected SSLEngine |
engineCreateSSLEngine(String host,
int port)
Creates an
SSLEngine instance from this context with the
specified hostname and port. |
protected SSLSessionContext |
engineGetClientSessionContext()
Returns the SSL session context that encapsulates the set of SSL sessions
that can be used for the client side of the SSL handshake.
|
protected SSLParameters |
engineGetDefaultSSLParameters()
Returns a new SSLParameters instance that includes the default
SSL handshake parameters values including cipher suites,
protocols, and client authentication.
|
protected SSLSessionContext |
engineGetServerSessionContext()
Returns the SSL session context that encapsulates the set of SSL sessions
that can be used for the server side of the SSL handshake.
|
protected SSLServerSocketFactory |
engineGetServerSocketFactory()
Returns a server socket factory for this instance.
|
protected SSLSocketFactory |
engineGetSocketFactory()
Returns a socket factory for this instance.
|
protected SSLParameters |
engineGetSupportedSSLParameters()
Returns a new SSLParameters instance that includes all
supported cipher suites and protocols.
|
protected void |
engineInit(KeyManager[] km,
TrustManager[] tm,
SecureRandom sr)
Initializes this
SSLContext instance. |
protected void engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr) throws KeyManagementException
SSLContextSpi
SSLContext
instance. All of the arguments are
optional, and the security providers will be searched for the required
implementations of the needed algorithms.engineInit
in class SSLContextSpi
km
- the key sources or null
.tm
- the trust decision sources or null
.sr
- the randomness source or null.
KeyManagementException
- if initializing this instance fails.protected SSLSocketFactory engineGetSocketFactory()
SSLContextSpi
engineGetSocketFactory
in class SSLContextSpi
protected SSLServerSocketFactory engineGetServerSocketFactory()
SSLContextSpi
engineGetServerSocketFactory
in class SSLContextSpi
protected SSLSessionContext engineGetServerSessionContext()
SSLContextSpi
engineGetServerSessionContext
in class SSLContextSpi
null
if the underlying provider does not provide an implementation of
the SSLSessionContext
interface.protected SSLSessionContext engineGetClientSessionContext()
SSLContextSpi
engineGetClientSessionContext
in class SSLContextSpi
null
if the underlying provider does not provide an implementation of
the SSLSessionContext
interface.protected SSLParameters engineGetDefaultSSLParameters()
SSLContextSpi
The default implementation returns an SSLParameters with values based an SSLSocket created from this instances SocketFactory.
engineGetDefaultSSLParameters
in class SSLContextSpi
protected SSLParameters engineGetSupportedSSLParameters()
SSLContextSpi
The default implementation returns an SSLParameters with values based an SSLSocket created from this instances SocketFactory.
engineGetSupportedSSLParameters
in class SSLContextSpi
protected SSLEngine engineCreateSSLEngine(String host, int port)
SSLContextSpi
SSLEngine
instance from this context with the
specified hostname and port.engineCreateSSLEngine
in class SSLContextSpi
host
- the name of the hostport
- the portSSLEngine
instance from this context.protected SSLEngine engineCreateSSLEngine()
SSLContextSpi
SSLEngine
instance from this context.engineCreateSSLEngine
in class SSLContextSpi
SSLEngine
instance from this context.