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 |
setProtocol(java.lang.String protocol)
The protocol used in
SSLContext.getInstance(String) ; default "TLS". |
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 passowrd for the keyStore.trustStorePassword
- The password for the trustStore.public javax.net.ssl.SSLContext getSSLContext() throws java.security.GeneralSecurityException, java.io.IOException
TcpSSLContextSupport
getSSLContext
in interface TcpSSLContextSupport
java.security.GeneralSecurityException
java.io.IOException
public void setProtocol(java.lang.String protocol)
SSLContext.getInstance(String)
; default "TLS".protocol
- The protocol.