public class OfficeFloorDefaultSslEngineSource extends Object implements SslEngineSource
OfficeFloor default SslEngineSource
.
This should NOT be used within production. The purpose is to allow
testing of HTTPS communication without needing manual KeyStore
setup.
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_SSL_PROTOCOL
Property to specify the SSL protocol to use.
|
Constructor and Description |
---|
OfficeFloorDefaultSslEngineSource() |
Modifier and Type | Method and Description |
---|---|
static SSLContext |
createClientSslContext(String sslProtocol)
Creates the
OfficeFloor default client SSLContext . |
static SSLContext |
createServerSslContext(String sslProtocol)
Creates the
OfficeFloor default server SSLContext . |
SSLEngine |
createSslEngine(String peerHost,
int peerPort)
Creates a new
SSLEngine . |
void |
init(SourceContext context)
Initialise this source.
|
public static final String PROPERTY_SSL_PROTOCOL
public static SSLContext createServerSslContext(String sslProtocol) throws Exception
OfficeFloor
default server SSLContext
.sslProtocol
- SSL protocol. May be null
.OfficeFloor
default server SSLContext
.Exception
- If fails to create the SSLContext
.public static SSLContext createClientSslContext(String sslProtocol) throws Exception
OfficeFloor
default client SSLContext
.sslProtocol
- SSL protocol. May be null
.OfficeFloor
default client SSLContext
.Exception
- If fails to create the SSLContext
.public void init(SourceContext context) throws Exception
SslEngineSource
init
in interface SslEngineSource
context
- SourceContext
.Exception
- If fails to initialise (possibly because a protocol or cipher
is not supported).public SSLEngine createSslEngine(String peerHost, int peerPort)
SslEngineSource
SSLEngine
.createSslEngine
in interface SslEngineSource
peerHost
- Peer host.peerPort
- Peer port.SSLEngine
ready for use.Copyright © 2005–2016. All rights reserved.