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