public class SslConfig extends Object
| 构造器和说明 |
|---|
SslConfig(ClientAuth clientAuth,
SSLContext sslContext) |
SslConfig(SSLContext sslContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
static SslConfig |
forClient()
给客户端用的
|
static SslConfig |
forClient(InputStream trustStoreInputStream,
String trustPassword)
给客户端用的
|
static SslConfig |
forClient(InputStream keyStoreInputStream,
String keyPasswd,
InputStream trustStoreInputStream,
String trustPassword)
给客户端用的
|
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(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() |
SSLContext |
getSslContext() |
static SSLContext |
getSslContext(InputStream keyStoreInputStream,
String keyPass,
InputStream trustInputStream,
String trustPass) |
static SSLContext |
getSslContext(String keyStoreFile,
String keyPass,
String trustStoreFile,
String trustPass) |
public SslConfig(SSLContext sslContext)
public SslConfig(ClientAuth clientAuth, SSLContext sslContext)
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(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 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 trustStoreInputStream, String trustPassword)
public static SslConfig forClient(InputStream keyStoreInputStream, String keyPasswd, InputStream trustStoreInputStream, String trustPassword)
public static SSLContext getSslContext(String keyStoreFile, String keyPass, String trustStoreFile, String trustPass)
public static SSLContext getSslContext(InputStream keyStoreInputStream, String keyPass, InputStream trustInputStream, String trustPass)
public ClientAuth getClientAuth()
public SSLContext getSslContext()
Copyright © 2023. All rights reserved.