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等SSLContextIORuntimeException - 包装 GeneralSecurityException异常public static SSLContext createSSLContext(String protocol, KeyManager keyManager, TrustManager trustManager) throws IORuntimeException
protocol - SSL协议,例如TLS等keyManager - 密钥管理器,null表示无trustManager - 信任管理器, null表示无SSLContextIORuntimeException - 包装 GeneralSecurityException异常public static SSLContext createSSLContext(String protocol, KeyManager[] keyManagers, TrustManager[] trustManagers) throws IORuntimeException
SSLContextprotocol - SSL协议,例如TLS等keyManagers - 密钥管理器,null表示无trustManagers - 信任管理器, null表示无SSLContextIORuntimeException - 包装 GeneralSecurityException异常Copyright © 2025. All rights reserved.