public class SslConfig extends Object
| Constructor and Description |
|---|
SslConfig(ClientAuth clientAuth,
KeyManager[] kms,
TrustManager[] tms) |
SslConfig(ClientAuth clientAuth,
TrustManager[] tms) |
SslConfig(KeyManager[] kms,
TrustManager[] tms) |
SslConfig(TrustManager[] tms) |
| Modifier and Type | Method and Description |
|---|---|
static SslConfig |
forClient()
给客户端用的
|
static SslConfig |
forClient(InputStream crtInputStream)
给客户端用的,crt 证书
|
static SslConfig |
forClient(InputStream trustStoreInputStream,
String trustPassword)
给客户端用的
|
static SslConfig |
forClient(InputStream keyStoreInputStream,
String keyPasswd,
InputStream trustStoreInputStream,
String trustPassword)
给客户端用的
|
static SslConfig |
forClient(SslCertType certType,
InputStream keyStoreInputStream,
String keyPasswd,
InputStream trustStoreInputStream,
String trustPassword)
给客户端用的
|
static SslConfig |
forClient(String crtFile)
给客户端用的,crt 证书
|
static SslConfig |
forClient(String trustStoreFile,
String trustPassword)
给客户端用的
|
static SslConfig |
forClient(String keyStoreFile,
String keyPasswd,
String trustStoreFile,
String trustPassword)
给客户端用的
|
static SslConfig |
forServer(InputStream keyStoreInputStream,
String keyPasswd)
给服务器用的
|
static SslConfig |
forServer(InputStream keyStoreInputStream,
String keyPasswd,
ClientAuth clientAuth)
给服务器用的
|
static SslConfig |
forServer(InputStream keyStoreInputStream,
String keyPasswd,
InputStream trustStoreInputStream,
String trustPassword,
ClientAuth clientAuth)
给服务器用的
|
static SslConfig |
forServer(SslCertType certType,
InputStream keyStoreInputStream,
String keyPasswd)
给服务器用的
|
static SslConfig |
forServer(SslCertType certType,
InputStream keyStoreInputStream,
String keyPasswd,
ClientAuth clientAuth)
给服务器用的
|
static SslConfig |
forServer(SslCertType certType,
InputStream keyStoreInputStream,
String keyPasswd,
InputStream trustStoreInputStream,
String trustPassword,
ClientAuth clientAuth)
给服务器用的
|
static SslConfig |
forServer(String keyStoreFile,
String keyPasswd) |
static SslConfig |
forServer(String keyStoreFile,
String keyPasswd,
ClientAuth clientAuth) |
static SslConfig |
forServer(String keyStoreFile,
String keyPasswd,
String trustStoreFile,
String trustPassword,
ClientAuth clientAuth) |
ClientAuth |
getClientAuth() |
static KeyManager[] |
getKeyManager(SslCertType certType,
InputStream keyStoreInputStream,
String keyPass) |
static KeyManager[] |
getKeyManager(String keyStoreFile,
String keyPass) |
SSLContext |
getSslContext() |
SSLEngineCustomizer |
getSslEngineCustomizer() |
static TrustManager[] |
getTrustManager(InputStream trustInputStream,
String trustPass) |
static TrustManager[] |
getTrustManager(SslCertType certType,
InputStream trustInputStream,
String trustPass) |
static TrustManager[] |
getTrustManager(String trustStoreFile,
String trustPass) |
void |
setSslEngineCustomizer(SSLEngineCustomizer sslEngineCustomizer) |
public SslConfig(TrustManager[] tms)
public SslConfig(KeyManager[] kms, TrustManager[] tms)
public SslConfig(ClientAuth clientAuth, TrustManager[] tms)
public SslConfig(ClientAuth clientAuth, KeyManager[] kms, TrustManager[] tms)
public ClientAuth getClientAuth()
public SSLContext getSslContext()
public SSLEngineCustomizer getSslEngineCustomizer()
public void setSslEngineCustomizer(SSLEngineCustomizer sslEngineCustomizer)
public static SslConfig forServer(String keyStoreFile, String keyPasswd)
keyStoreFile - 如果是以"classpath:"开头,则从classpath中查找,否则视为普通的文件路径keyPasswd - key passwdpublic static SslConfig forServer(String keyStoreFile, String keyPasswd, ClientAuth clientAuth)
keyStoreFile - 如果是以"classpath:"开头,则从classpath中查找,否则视为普通的文件路径keyPasswd - key passwdpublic static SslConfig forServer(String keyStoreFile, String keyPasswd, String trustStoreFile, String trustPassword, ClientAuth clientAuth)
keyStoreFile - 如果是以"classpath:"开头,则从classpath中查找,否则视为普通的文件路径keyPasswd - key passwdpublic static SslConfig forServer(InputStream keyStoreInputStream, String keyPasswd)
keyStoreInputStream - keyStoreInputStreamkeyPasswd - key passwdpublic static SslConfig forServer(SslCertType certType, InputStream keyStoreInputStream, String keyPasswd)
keyStoreInputStream - keyStoreInputStreamkeyPasswd - key passwdpublic static SslConfig forServer(InputStream keyStoreInputStream, String keyPasswd, ClientAuth clientAuth)
keyStoreInputStream - keyStoreInputStreamkeyPasswd - key passwdpublic static SslConfig forServer(SslCertType certType, InputStream keyStoreInputStream, String keyPasswd, ClientAuth clientAuth)
keyStoreInputStream - keyStoreInputStreamkeyPasswd - key passwdpublic static SslConfig forServer(InputStream keyStoreInputStream, String keyPasswd, InputStream trustStoreInputStream, String trustPassword, ClientAuth clientAuth)
keyStoreInputStream - keyStoreInputStreamkeyPasswd - key passwdpublic static SslConfig forServer(SslCertType certType, InputStream keyStoreInputStream, String keyPasswd, InputStream trustStoreInputStream, String trustPassword, ClientAuth clientAuth)
keyStoreInputStream - keyStoreInputStreamkeyPasswd - key passwdpublic static SslConfig forClient()
public static SslConfig forClient(String trustStoreFile, String trustPassword)
public static SslConfig forClient(String keyStoreFile, String keyPasswd, String trustStoreFile, String trustPassword)
public static SslConfig forClient(InputStream crtInputStream)
public static SslConfig forClient(InputStream trustStoreInputStream, String trustPassword)
public static SslConfig forClient(InputStream keyStoreInputStream, String keyPasswd, InputStream trustStoreInputStream, String trustPassword)
public static SslConfig forClient(SslCertType certType, InputStream keyStoreInputStream, String keyPasswd, InputStream trustStoreInputStream, String trustPassword)
public static KeyManager[] getKeyManager(String keyStoreFile, String keyPass)
public static KeyManager[] getKeyManager(SslCertType certType, InputStream keyStoreInputStream, String keyPass)
public static TrustManager[] getTrustManager(String trustStoreFile, String trustPass)
public static TrustManager[] getTrustManager(InputStream trustInputStream, String trustPass)
public static TrustManager[] getTrustManager(SslCertType certType, InputStream trustInputStream, String trustPass)
Copyright © 2025. All rights reserved.