Package net.officefloor.server.ssl
Class OfficeFloorDefaultSslContextSource
java.lang.Object
net.officefloor.server.ssl.OfficeFloorDefaultSslContextSource
- All Implemented Interfaces:
SslContextSource
OfficeFloor default SslContextSource.
This should NOT be used within production. The purpose is to allow
testing of HTTPS communication without needing manual KeyStore setup.
- Author:
- Daniel Sagenschneider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty to specify the SSL protocol to use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SSLContextcreateClientSslContext(String sslProtocol) Creates theOfficeFloordefault clientSSLContext.static SSLContextcreateServerSslContext(String sslProtocol) Creates theOfficeFloordefault serverSSLContext.createSslContext(SourceContext context) Creates a newSSLContext.
-
Field Details
-
PROPERTY_SSL_PROTOCOL
Property to specify the SSL protocol to use.- See Also:
-
-
Constructor Details
-
OfficeFloorDefaultSslContextSource
public OfficeFloorDefaultSslContextSource()
-
-
Method Details
-
createServerSslContext
Creates theOfficeFloordefault serverSSLContext.- Parameters:
sslProtocol- SSL protocol. May benull.- Returns:
OfficeFloordefault serverSSLContext.- Throws:
Exception- If fails to create theSSLContext.
-
createClientSslContext
Creates theOfficeFloordefault clientSSLContext.- Parameters:
sslProtocol- SSL protocol. May benull.- Returns:
OfficeFloordefault clientSSLContext.- Throws:
Exception- If fails to create theSSLContext.
-
createSslContext
Description copied from interface:SslContextSourceCreates a newSSLContext.- Specified by:
createSslContextin interfaceSslContextSource- Parameters:
context-SourceContextto configure theSSLContext.- Returns:
- New
SSLContextready for use. - Throws:
Exception- If fails to create theSSLContext(possibly because a protocol or cipher is not supported).
-