public class DefaultTcpSSLContextSupport extends java.lang.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(java.lang.String keyStore,
java.lang.String trustStore,
java.lang.String keyStorePassword,
java.lang.String trustStorePassword)
Prepares for the creation of an SSLContext using the supplied
key/trust stores and passwords.
|
| Modifier and Type | Method and Description |
|---|---|
javax.net.ssl.SSLContext |
getSSLContext()
Gets an SSLContext.
|
void |
setKeyStoreType(java.lang.String keyStoreType)
Set the key store type.
|
void |
setProtocol(java.lang.String protocol)
The protocol used in
SSLContext.getInstance(String); default "TLS". |
void |
setTrustStoreType(java.lang.String trustStoreType)
Set the trust store type.
|
public DefaultTcpSSLContextSupport(java.lang.String keyStore,
java.lang.String trustStore,
java.lang.String keyStorePassword,
java.lang.String trustStorePassword)
keyStore - A Resource pattern pointing to the keyStore.trustStore - A Resource pattern pointing to the trustStore.keyStorePassword - The password for the keyStore.trustStorePassword - The password for the trustStore.public void setKeyStoreType(java.lang.String keyStoreType)
keyStoreType - the type.public void setTrustStoreType(java.lang.String trustStoreType)
trustStoreType - the type.public javax.net.ssl.SSLContext getSSLContext()
throws java.security.GeneralSecurityException,
java.io.IOException
TcpSSLContextSupportgetSSLContext in interface TcpSSLContextSupportjava.security.GeneralSecurityException - Any GeneralSecurityException.java.io.IOException - Any IOException.public void setProtocol(java.lang.String protocol)
SSLContext.getInstance(String); default "TLS".protocol - The protocol.