/** * Creates an SSL context for the external REST endpoint server. */ @Nullable public static SSLContext createRestServerSSLContext(Configuration config) throws Exception { final RestSSLContextConfigMode configMode; if (isRestSSLAuthenticationEnabled(config)) { configMode = RestSSLContextConfigMode.MUTUAL; } else { configMode = RestSSLContextConfigMode.SERVER; } return createRestSSLContext(config, configMode); }
/** * Creates an SSL context for clients against the external REST endpoint. */ @Nullable public static SSLContext createRestClientSSLContext(Configuration config) throws Exception { final RestSSLContextConfigMode configMode; if (isRestSSLAuthenticationEnabled(config)) { configMode = RestSSLContextConfigMode.MUTUAL; } else { configMode = RestSSLContextConfigMode.CLIENT; } return createRestSSLContext(config, configMode); }
/** * Creates an SSL context for clients against the external REST endpoint. */ @Nullable public static SSLContext createRestClientSSLContext(Configuration config) throws Exception { final RestSSLContextConfigMode configMode; if (isRestSSLAuthenticationEnabled(config)) { configMode = RestSSLContextConfigMode.MUTUAL; } else { configMode = RestSSLContextConfigMode.CLIENT; } return createRestSSLContext(config, configMode); }
/** * Creates an SSL context for the external REST endpoint server. */ @Nullable public static SSLContext createRestServerSSLContext(Configuration config) throws Exception { final RestSSLContextConfigMode configMode; if (isRestSSLAuthenticationEnabled(config)) { configMode = RestSSLContextConfigMode.MUTUAL; } else { configMode = RestSSLContextConfigMode.SERVER; } return createRestSSLContext(config, configMode); }
/** * Creates a {@link SSLHandlerFactory} to be used by the REST Servers. * * @param config The application configuration. */ 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); }
/** * Creates a {@link SSLHandlerFactory} to be used by the REST Clients. * * @param config The application configuration. */ public static SSLHandlerFactory createRestClientSSLEngineFactory(final Configuration config) throws Exception { SSLContext sslContext = createRestClientSSLContext(config); if (sslContext == null) { throw new IllegalConfigurationException("SSL is not enabled for REST endpoints."); } return new SSLHandlerFactory( sslContext, getEnabledProtocols(config), getEnabledCipherSuites(config), true, isRestSSLAuthenticationEnabled(config), -1, -1); }
/** * Creates a {@link SSLHandlerFactory} to be used by the REST Clients. * * @param config The application configuration. */ public static SSLHandlerFactory createRestClientSSLEngineFactory(final Configuration config) throws Exception { SSLContext sslContext = createRestClientSSLContext(config); if (sslContext == null) { throw new IllegalConfigurationException("SSL is not enabled for REST endpoints."); } return new SSLHandlerFactory( sslContext, getEnabledProtocols(config), getEnabledCipherSuites(config), true, isRestSSLAuthenticationEnabled(config), -1, -1); }
/** * Creates a {@link SSLHandlerFactory} to be used by the REST Servers. * * @param config The application configuration. */ 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); }