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