public class SSLContextUtils
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static javax.net.ssl.SSLContext |
createSSLContext(java.lang.String protocol,
javax.net.ssl.KeyManager[] keyManagers,
javax.net.ssl.TrustManager[] trustManagers)
Create and initialise an SSLContext.
|
static javax.net.ssl.SSLContext |
createSSLContext(java.lang.String protocol,
javax.net.ssl.KeyManager keyManager,
javax.net.ssl.TrustManager trustManager)
Create and initialise an SSLContext.
|
public static javax.net.ssl.SSLContext createSSLContext(java.lang.String protocol, javax.net.ssl.KeyManager keyManager, javax.net.ssl.TrustManager trustManager) throws java.io.IOException
protocol
- the protocol used to instatiate the contextkeyManager
- the key manager, may be null
trustManager
- the trust manager, may be null
java.io.IOException
- this is used to wrap any GeneralSecurityException
that occurspublic static javax.net.ssl.SSLContext createSSLContext(java.lang.String protocol, javax.net.ssl.KeyManager[] keyManagers, javax.net.ssl.TrustManager[] trustManagers) throws java.io.IOException
protocol
- the protocol used to instatiate the contextkeyManagers
- the array of key managers, may be null
but array entries must not be null
trustManagers
- the array of trust managers, may be null
but array entries must not be null
java.io.IOException
- this is used to wrap any GeneralSecurityException
that occurs