Skip to content

Most visited

Recently visited

navigation
Added in API level 1

SSLContextSpi

public abstract class SSLContextSpi
extends Object

java.lang.Object
   ↳ javax.net.ssl.SSLContextSpi


The Service Provider Interface (SPI) for the SSLContext class.

Summary

Public constructors

SSLContextSpi()

Creates a new SSLContextSpi instance.

Protected methods

abstract SSLEngine engineCreateSSLEngine(String host, int port)

Creates an SSLEngine instance from this context with the specified hostname and port.

abstract SSLEngine engineCreateSSLEngine()

Creates an SSLEngine instance from this context.

abstract 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.

SSLParameters engineGetDefaultSSLParameters()

Returns a new SSLParameters instance that includes the default SSL handshake parameters values including cipher suites, protocols, and client authentication.

abstract 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.

abstract SSLServerSocketFactory engineGetServerSocketFactory()

Returns a server socket factory for this instance.

abstract SSLSocketFactory engineGetSocketFactory()

Returns a socket factory for this instance.

SSLParameters engineGetSupportedSSLParameters()

Returns a new SSLParameters instance that includes all supported cipher suites and protocols.

abstract void engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr)

Initializes this SSLContext instance.

Inherited methods

From class java.lang.Object

Public constructors

SSLContextSpi

Added in API level 1
SSLContextSpi ()

Creates a new SSLContextSpi instance.

Protected methods

engineCreateSSLEngine

Added in API level 1
SSLEngine engineCreateSSLEngine (String host, 
                int port)

Creates an SSLEngine instance from this context with the specified hostname and port.

Parameters
host String: the name of the host
port int: the port
Returns
SSLEngine an SSLEngine instance from this context.
Throws
UnsupportedOperationException if the provider does not support the operation.

engineCreateSSLEngine

Added in API level 1
SSLEngine engineCreateSSLEngine ()

Creates an SSLEngine instance from this context.

Returns
SSLEngine an SSLEngine instance from this context.
Throws
UnsupportedOperationException if the provider does not support the operation.

engineGetClientSessionContext

Added in API level 1
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.

Returns
SSLSessionContext the SSL client session context for this context or null if the underlying provider does not provide an implementation of the SSLSessionContext interface.

engineGetDefaultSSLParameters

Added in API level 9
SSLParameters engineGetDefaultSSLParameters ()

Returns a new SSLParameters instance that includes the default SSL handshake parameters values including cipher suites, protocols, and client authentication.

The default implementation returns an SSLParameters with values based an SSLSocket created from this instances SocketFactory.

Returns
SSLParameters

engineGetServerSessionContext

Added in API level 1
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.

Returns
SSLSessionContext the SSL server session context for this context or null if the underlying provider does not provide an implementation of the SSLSessionContext interface.

engineGetServerSocketFactory

Added in API level 1
SSLServerSocketFactory engineGetServerSocketFactory ()

Returns a server socket factory for this instance.

Returns
SSLServerSocketFactory a server socket factory for this instance.

engineGetSocketFactory

Added in API level 1
SSLSocketFactory engineGetSocketFactory ()

Returns a socket factory for this instance.

Returns
SSLSocketFactory a socket factory for this instance.

engineGetSupportedSSLParameters

Added in API level 9
SSLParameters engineGetSupportedSSLParameters ()

Returns a new SSLParameters instance that includes all supported cipher suites and protocols.

The default implementation returns an SSLParameters with values based an SSLSocket created from this instances SocketFactory.

Returns
SSLParameters

engineInit

Added in API level 1
void engineInit (KeyManager[] km, 
                TrustManager[] tm, 
                SecureRandom sr)

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
km KeyManager: the key sources or null.
tm TrustManager: the trust decision sources or null.
sr SecureRandom: the randomness source or null.
Throws
KeyManagementException if initializing this instance fails.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.