class SSLUtils {

	public static SSLHandlerFactory createRestServerSSLEngineFactory(final Configuration config) throws Exception {
		SSLContext sslContext = createRestServerSSLContext(config);
		if (sslContext == null) {
			throw new IllegalConfigurationException("SSL is not enabled for REST endpoints.");
		}

		return new SSLHandlerFactory(
				sslContext,
				getEnabledProtocols(config),
				getEnabledCipherSuites(config),
				false,
				isRestSSLAuthenticationEnabled(config),
				-1,
				-1);
	}

}