public abstract class SSLContextSpi extends Object
SSLContext
类。
这个类中的所有抽象方法必须由每个加密服务提供者希望供应一个特定的SSL上下文执行实施。
SSLContext
Constructor and Description |
---|
SSLContextSpi() |
Modifier and Type | Method and Description |
---|---|
protected abstract SSLEngine |
engineCreateSSLEngine()
创建一个新的
SSLEngine 使用此上下文。
|
protected abstract SSLEngine |
engineCreateSSLEngine(String host, int port)
创建一个
SSLEngine 使用此上下文。
|
protected abstract SSLSessionContext |
engineGetClientSessionContext()
返回此上下文客户
SSLSessionContext 对象。
|
protected SSLParameters |
engineGetDefaultSSLParameters()
返回一个表示该SSL上下文的默认设置sslparameters。
|
protected abstract SSLSessionContext |
engineGetServerSessionContext()
返回此上下文服务器
SSLSessionContext 对象。
|
protected abstract SSLServerSocketFactory |
engineGetServerSocketFactory()
返回此上下文
ServerSocketFactory 对象。
|
protected abstract SSLSocketFactory |
engineGetSocketFactory()
返回此上下文
SocketFactory 对象。
|
protected SSLParameters |
engineGetSupportedSSLParameters()
返回一个指示最大支持SSL上下文设置的sslparameters。
|
protected abstract void |
engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr)
初始化上下文。
|
protected abstract void engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr) throws KeyManagementException
km
-认证密钥的来源
tm
-同行认证信任决策的来源
sr
-随机源
KeyManagementException
-如果操作失败
SSLContext.init(KeyManager [], TrustManager [], SecureRandom)
protected abstract SSLSocketFactory engineGetSocketFactory()
SocketFactory
对象。
SocketFactory
对象
IllegalStateException
-如果sslcontextimpl需要初始化,
engineInit()
称尚未
SSLContext.getSocketFactory()
protected abstract SSLServerSocketFactory engineGetServerSocketFactory()
ServerSocketFactory
对象。
ServerSocketFactory
对象
IllegalStateException
-如果sslcontextimpl需要初始化,
engineInit()
称尚未
SSLContext.getServerSocketFactory()
protected abstract SSLEngine engineCreateSSLEngine()
SSLEngine
。
使用此工厂方法的应用程序提供了一个内部会话重用策略的提示。如果提示需要,engineCreateSSLEngine(String, int)
应该用来代替。
一些密码套件(如Kerberos)需要远程主机的信息,在这种情况下,该工厂方法不应该使用。
SSLEngine
对象
IllegalStateException
-如果sslcontextimpl需要初始化,
engineInit()
称尚未
SSLContext.createSSLEngine()
protected abstract SSLEngine engineCreateSSLEngine(String host, int port)
SSLEngine
使用此上下文。
使用此工厂方法的应用程序提供了一个内部会话重用策略的提示。
一些密码套件(如Kerberos)需要远程主机的信息,在这种情况下,peerhost需要指定。
host
-主机的非权威的名字
port
-非权威的港口
SSLEngine
对象
IllegalStateException
-如果sslcontextimpl需要初始化,
engineInit()
称尚未
SSLContext.createSSLEngine(String, int)
protected abstract SSLSessionContext engineGetServerSessionContext()
SSLSessionContext
对象。
SSLSessionContext
对象
SSLContext.getServerSessionContext()
protected abstract SSLSessionContext engineGetClientSessionContext()
SSLSessionContext
对象。
SSLSessionContext
对象
SSLContext.getClientSessionContext()
protected SSLParameters engineGetDefaultSSLParameters()
参数总是有加密套接字协议设置为非空值的数组。
默认的实现得到的参数从一个SSLSocket由调用SocketFactory.createSocket()方法这方面的socketfactory。
UnsupportedOperationException
-如果默认SSL参数无法获得。
protected SSLParameters engineGetSupportedSSLParameters()
参数总是有加密套接字协议设置为非空值的数组。
默认的实现得到的参数从一个SSLSocket由调用SocketFactory.createSocket()方法这方面的socketfactory。
UnsupportedOperationException
如果支持SSL参数无法获得。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.