Package mireka.pop
Class JsseDefaultTlsConfiguration
- Object
-
- mireka.pop.JsseDefaultTlsConfiguration
-
- All Implemented Interfaces:
TlsConfiguration
public class JsseDefaultTlsConfiguration extends Object implements TlsConfiguration
JsseDefaultTlsConfiguration delegates TLS configuration to the system property based JSSE reference implementation configuration. It enables the TLS extension if the javax.net.ssl.keyStore system property is specified, and uses the default JSSE socket factory to create new sockets.The minimal necessary JSSE configuration:
- javax.net.ssl.keyStore system property must refer to a file containing a JKS keystore with the private key.
- javax.net.ssl.keyStorePassword system property must specify the keystore password.
- See Also:
- Customizing JSSE
-
-
Constructor Summary
Constructors Constructor Description JsseDefaultTlsConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.net.ssl.SSLSocketcreateSSLSocket(java.net.Socket socket)Returns an SSLSocket which wraps the supplied non-secured socket.booleanisEnabled()Returns true if TLS is enabled.
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Description copied from interface:TlsConfigurationReturns true if TLS is enabled.- Specified by:
isEnabledin interfaceTlsConfiguration
-
createSSLSocket
public javax.net.ssl.SSLSocket createSSLSocket(java.net.Socket socket) throws java.io.IOExceptionDescription copied from interface:TlsConfigurationReturns an SSLSocket which wraps the supplied non-secured socket. The returned socket is in server mode.- Specified by:
createSSLSocketin interfaceTlsConfiguration- Parameters:
socket- the socket to be wrapped- Throws:
java.io.IOException
-
-