public class DefaultTcpSSLContextSupport extends Object implements TcpSSLContextSupport
TcpSSLContextSupport; uses a
'TLS' (by default) SSLContext, initialized with 'JKS'
keystores, managed by 'SunX509' Key and Trust managers.| Constructor and Description |
|---|
DefaultTcpSSLContextSupport(String keyStore,
String trustStore,
String keyStorePassword,
String trustStorePassword)
Prepares for the creation of an SSLContext using the supplied
key/trust stores and passwords.
|
| Modifier and Type | Method and Description |
|---|---|
SSLContext |
getSSLContext()
Gets an SSLContext.
|
void |
setKeyStoreType(String keyStoreType)
Set the key store type.
|
void |
setProtocol(String protocol)
The protocol used in
SSLContext.getInstance(String); default "TLS". |
void |
setTrustStoreType(String trustStoreType)
Set the trust store type.
|
public void setKeyStoreType(String keyStoreType)
keyStoreType - the type.public void setTrustStoreType(String trustStoreType)
trustStoreType - the type.public SSLContext getSSLContext() throws GeneralSecurityException, IOException
TcpSSLContextSupportgetSSLContext in interface TcpSSLContextSupportGeneralSecurityException - Any GeneralSecurityException.IOException - Any IOException.public void setProtocol(String protocol)
SSLContext.getInstance(String); default "TLS".protocol - The protocol.