Package org.apache.commons.net.util
Class SSLContextUtils
- java.lang.Object
-
- org.apache.commons.net.util.SSLContextUtils
-
public class SSLContextUtils extends java.lang.Object
General utilities for SSLContext.- Since:
- 3.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
createSSLContext
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
Create and initialise an SSLContext.- Parameters:
protocol
- the protocol used to instatiate the contextkeyManager
- the key manager, may benull
trustManager
- the trust manager, may benull
- Returns:
- the initialised context.
- Throws:
java.io.IOException
- this is used to wrap anyGeneralSecurityException
that occurs
-
createSSLContext
public static javax.net.ssl.SSLContext createSSLContext(java.lang.String protocol, javax.net.ssl.KeyManager[] keyManagers, javax.net.ssl.TrustManager[] trustManagers) throws java.io.IOException
Create and initialise an SSLContext.- Parameters:
protocol
- the protocol used to instatiate the contextkeyManagers
- the array of key managers, may benull
but array entries must not benull
trustManagers
- the array of trust managers, may benull
but array entries must not benull
- Returns:
- the initialised context.
- Throws:
java.io.IOException
- this is used to wrap anyGeneralSecurityException
that occurs
-
-