public class SSLUtil extends Object
Constructor and Description |
---|
SSLUtil() |
Modifier and Type | Method and Description |
---|---|
static SSLContext |
createSSLContext(String protocol)
创建
SSLContext ,默认新人全部 |
static SSLContext |
createSSLContext(String protocol,
KeyManager[] keyManagers,
TrustManager[] trustManagers)
创建和初始化
SSLContext |
static SSLContext |
createSSLContext(String protocol,
KeyManager keyManager,
TrustManager trustManager)
|
public static SSLContext createSSLContext(String protocol) throws IORuntimeException
SSLContext
,默认新人全部protocol
- SSL协议,例如TLS等SSLContext
IORuntimeException
- 包装 GeneralSecurityException异常public static SSLContext createSSLContext(String protocol, KeyManager keyManager, TrustManager trustManager) throws IORuntimeException
protocol
- SSL协议,例如TLS等keyManager
- 密钥管理器,null
表示无trustManager
- 信任管理器, null
表示无SSLContext
IORuntimeException
- 包装 GeneralSecurityException异常public static SSLContext createSSLContext(String protocol, KeyManager[] keyManagers, TrustManager[] trustManagers) throws IORuntimeException
SSLContext
protocol
- SSL协议,例如TLS等keyManagers
- 密钥管理器,null
表示无trustManagers
- 信任管理器, null
表示无SSLContext
IORuntimeException
- 包装 GeneralSecurityException异常Copyright © 2024. All rights reserved.