@Test public void checkEnableRestSSLAuthentication() { Configuration noSSLOptions = new Configuration(); noSSLOptions.setBoolean(SecurityOptions.SSL_REST_ENABLED, false); noSSLOptions.setBoolean(SecurityOptions.SSL_REST_AUTHENTICATION_ENABLED, true); assertFalse(SSLUtils.isRestSSLAuthenticationEnabled(noSSLOptions)); Configuration defaultOptions = new Configuration(); defaultOptions.setBoolean(SecurityOptions.SSL_REST_ENABLED, true); assertFalse(SSLUtils.isRestSSLAuthenticationEnabled(defaultOptions)); Configuration options = new Configuration(); noSSLOptions.setBoolean(SecurityOptions.SSL_REST_ENABLED, true); noSSLOptions.setBoolean(SecurityOptions.SSL_REST_AUTHENTICATION_ENABLED, true); assertTrue(SSLUtils.isRestSSLAuthenticationEnabled(noSSLOptions)); }
public static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig) { checkNotNull(sslConfig, "sslConfig"); return isRestSSLEnabled(sslConfig) && sslConfig.getBoolean(SecurityOptions.SSL_REST_AUTHENTICATION_ENABLED); }
SSLUtils { public static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig) { checkNotNull(sslConfig, "sslConfig"); return isRestSSLEnabled(sslConfig) && sslConfig.getBoolean(SecurityOptions.SSL_REST_AUTHENTICATION_ENABLED); } }
SSLUtils { public static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig) { checkNotNull(sslConfig, "sslConfig"); return isRestSSLEnabled(sslConfig) && sslConfig.getBoolean(SecurityOptions.SSL_REST_AUTHENTICATION_ENABLED); }  }
SSLUtils { public static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig) { checkNotNull(sslConfig, "sslConfig"); return isRestSSLEnabled(sslConfig) && sslConfig.getBoolean(SecurityOptions.SSL_REST_AUTHENTICATION_ENABLED); }  static boolean isInternalSSLEnabled(Configuration sslConfig); static boolean isRestSSLEnabled(Configuration sslConfig); static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig); static ServerSocketFactory createSSLServerSocketFactory(Configuration config); static SocketFactory createSSLClientSocketFactory(Configuration config); static SSLHandlerFactory createInternalServerSSLEngineFactory(final Configuration config); static SSLHandlerFactory createInternalClientSSLEngineFactory(final Configuration config); static SSLHandlerFactory createRestServerSSLEngineFactory(final Configuration config); static SSLHandlerFactory createRestClientSSLEngineFactory(final Configuration config); @Nullable static SSLContext createRestServerSSLContext(Configuration config); @Nullable static SSLContext createRestClientSSLContext(Configuration config); }
SSLUtils { public static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig) { checkNotNull(sslConfig, "sslConfig"); return isRestSSLEnabled(sslConfig) && sslConfig.getBoolean(SecurityOptions.SSL_REST_AUTHENTICATION_ENABLED); }  static boolean isInternalSSLEnabled(Configuration sslConfig); static boolean isRestSSLEnabled(Configuration sslConfig); static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig); static ServerSocketFactory createSSLServerSocketFactory(Configuration config); static SocketFactory createSSLClientSocketFactory(Configuration config); static SSLHandlerFactory createInternalServerSSLEngineFactory(final Configuration config); static SSLHandlerFactory createInternalClientSSLEngineFactory(final Configuration config); static SSLHandlerFactory createRestServerSSLEngineFactory(final Configuration config); static SSLHandlerFactory createRestClientSSLEngineFactory(final Configuration config); @Nullable static SSLContext createRestServerSSLContext(Configuration config); @Nullable static SSLContext createRestClientSSLContext(Configuration config);  }