listener.setSecure(true);
if (networkListenerConfig.getSslEngine() == null) {
// Use defaults
listener.setSSLEngineConfig(new SSLEngineConfigurator(sslContext));
} else {
UrsusJerseyApplicationConfiguration.SSLEngine sslEngine =
networkListenerConfig.getSslEngine();
SSLEngineConfigurator sslEngineConfigurator = new SSLEngineConfigurator(sslContext);
sslEngineConfigurator.setEnabledCipherSuites(sslEngine.getEnabledCipherSuites());
sslEngineConfigurator.setEnabledProtocols(sslEngine.getEnabledProtocols());
sslEngineConfigurator.setCipherConfigured(sslEngine.isCipherConfigured());
sslEngineConfigurator.setProtocolConfigured(sslEngine.isProtocolConfigured());
sslEngineConfigurator.setClientMode(sslEngine.isClientMode());
sslEngineConfigurator.setNeedClientAuth(sslEngine.isNeedClientAuth());
sslEngineConfigurator.setWantClientAuth(sslEngine.isWantClientAuth());
listener.setSSLEngineConfig(sslEngineConfigurator);
}
}