SSLContextSpi
abstract class SSLContextSpi
kotlin.Any | |
↳ | javax.net.ssl.SSLContextSpi |
This class defines the Service Provider Interface (SPI) for the SSLContext
class.
All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a particular SSL context.
Summary
Public constructors | |
---|---|
Protected methods | |
---|---|
abstract SSLEngine! |
Creates a new |
abstract SSLEngine! |
engineCreateSSLEngine(host: String!, port: Int) Creates a |
abstract SSLSessionContext! |
Returns a client |
open SSLParameters! |
Returns a copy of the SSLParameters indicating the default settings for this SSL context. |
abstract SSLSessionContext! |
Returns a server |
abstract SSLServerSocketFactory! |
Returns a |
abstract SSLSocketFactory! |
Returns a |
open SSLParameters! |
Returns a copy of the SSLParameters indicating the maximum supported settings for this SSL context. |
abstract Unit |
engineInit(km: Array<KeyManager!>!, tm: Array<TrustManager!>!, sr: SecureRandom!) Initializes this context. |
Public constructors
Protected methods
engineCreateSSLEngine
protected abstract fun engineCreateSSLEngine(): SSLEngine!
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(java.lang.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.
Return | |
---|---|
SSLEngine! |
the SSLEngine Object |
Exceptions | |
---|---|
java.lang.IllegalStateException |
if the SSLContextImpl requires initialization and the engineInit() has not been called |
engineCreateSSLEngine
protected abstract fun engineCreateSSLEngine(
host: String!,
port: Int
): SSLEngine!
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 |
Return | |
---|---|
SSLEngine! |
the SSLEngine Object |
Exceptions | |
---|---|
java.lang.IllegalStateException |
if the SSLContextImpl requires initialization and the engineInit() has not been called |
engineGetClientSessionContext
protected abstract fun engineGetClientSessionContext(): SSLSessionContext!
Returns a client SSLSessionContext
object for this context.
Return | |
---|---|
SSLSessionContext! |
the SSLSessionContext object |
engineGetDefaultSSLParameters
protected open fun engineGetDefaultSSLParameters(): SSLParameters!
Returns a copy of the SSLParameters indicating the default settings for this SSL context.
The parameters will always have the ciphersuite and protocols arrays set to non-null values.
The default implementation obtains the parameters from an SSLSocket created by calling the javax.net.SocketFactory#createSocket method of this context's SocketFactory.
Return | |
---|---|
SSLParameters! |
a copy of the SSLParameters object with the default settings |
Exceptions | |
---|---|
java.lang.UnsupportedOperationException |
if the default SSL parameters could not be obtained. |
engineGetServerSessionContext
protected abstract fun engineGetServerSessionContext(): SSLSessionContext!
Returns a server SSLSessionContext
object for this context.
Return | |
---|---|
SSLSessionContext! |
the SSLSessionContext object |
engineGetServerSocketFactory
protected abstract fun engineGetServerSocketFactory(): SSLServerSocketFactory!
Returns a ServerSocketFactory
object for this context.
Return | |
---|---|
SSLServerSocketFactory! |
the ServerSocketFactory object |
Exceptions | |
---|---|
java.lang.IllegalStateException |
if the SSLContextImpl requires initialization and the engineInit() has not been called |
engineGetSocketFactory
protected abstract fun engineGetSocketFactory(): SSLSocketFactory!
Returns a SocketFactory
object for this context.
Return | |
---|---|
SSLSocketFactory! |
the SocketFactory object |
Exceptions | |
---|---|
java.lang.IllegalStateException |
if the SSLContextImpl requires initialization and the engineInit() has not been called |
engineGetSupportedSSLParameters
protected open fun engineGetSupportedSSLParameters(): SSLParameters!
Returns a copy of the SSLParameters indicating the maximum supported settings for this SSL context.
The parameters will always have the ciphersuite and protocols arrays set to non-null values.
The default implementation obtains the parameters from an SSLSocket created by calling the javax.net.SocketFactory#createSocket method of this context's SocketFactory.
Return | |
---|---|
SSLParameters! |
a copy of the SSLParameters object with the maximum supported settings |
Exceptions | |
---|---|
java.lang.UnsupportedOperationException |
if the supported SSL parameters could not be obtained. |
engineInit
protected abstract fun engineInit(
km: Array<KeyManager!>!,
tm: Array<TrustManager!>!,
sr: SecureRandom!
): Unit
Initializes this context.
Parameters | |
---|---|
km |
Array<KeyManager!>!: the sources of authentication keys |
tm |
Array<TrustManager!>!: the sources of peer authentication trust decisions |
sr |
SecureRandom!: the source of randomness |
Exceptions | |
---|---|
java.security.KeyManagementException |
if this operation fails |
See Also