/** * Select cipher suites to be used by the connector * based on configured inclusion and exclusion lists * as well as enabled and supported cipher suite lists. * @param enabledCipherSuites Array of enabled cipher suites * @param supportedCipherSuites Array of supported cipher suites * @return Array of cipher suites to enable */ public String[] selectCipherSuites(String[] enabledCipherSuites, String[] supportedCipherSuites) { Set<String> selected_ciphers = new HashSet<String>(); // Set the starting ciphers - either from the included or enabled list if (sslConfig.getIncludeCipherSuites() != null) { // Use only the supported included ciphers for (String cipherSuite : supportedCipherSuites) if (contains(sslConfig.getIncludeCipherSuites(), cipherSuite)) selected_ciphers.add(cipherSuite); } else { selected_ciphers.addAll(Arrays.asList(enabledCipherSuites)); } // Remove any excluded ciphers if (sslConfig.getExcludeCipherSuites() != null) { selected_ciphers.removeAll(Arrays.asList(sslConfig.getExcludeCipherSuites())); } return selected_ciphers.toArray(new String[selected_ciphers.size()]); }
/** * Select cipher suites to be used by the connector * based on configured inclusion and exclusion lists * as well as enabled and supported cipher suite lists. * @param enabledCipherSuites Array of enabled cipher suites * @param supportedCipherSuites Array of supported cipher suites * @return Array of cipher suites to enable */ public String[] selectCipherSuites(String[] enabledCipherSuites, String[] supportedCipherSuites) { Set<String> selected_ciphers = new HashSet<String>(); // Set the starting ciphers - either from the included or enabled list if (sslConfig.getIncludeCipherSuites() != null) { // Use only the supported included ciphers for (String cipherSuite : supportedCipherSuites) if (contains(sslConfig.getIncludeCipherSuites(), cipherSuite)) selected_ciphers.add(cipherSuite); } else { selected_ciphers.addAll(Arrays.asList(enabledCipherSuites)); } // Remove any excluded ciphers if (sslConfig.getExcludeCipherSuites() != null) { selected_ciphers.removeAll(Arrays.asList(sslConfig.getExcludeCipherSuites())); } return selected_ciphers.toArray(new String[selected_ciphers.size()]); }
/** * Select cipher suites to be used by the connector * based on configured inclusion and exclusion lists * as well as enabled and supported cipher suite lists. * @param enabledCipherSuites Array of enabled cipher suites * @param supportedCipherSuites Array of supported cipher suites * @return Array of cipher suites to enable */ public String[] selectCipherSuites(String[] enabledCipherSuites, String[] supportedCipherSuites) { Set<String> selected_ciphers = new HashSet<String>(); // Set the starting ciphers - either from the included or enabled list if (sslConfig.getIncludeCipherSuites() != null) { // Use only the supported included ciphers for (String cipherSuite : supportedCipherSuites) if (contains(sslConfig.getIncludeCipherSuites(), cipherSuite)) selected_ciphers.add(cipherSuite); } else { selected_ciphers.addAll(Arrays.asList(enabledCipherSuites)); } // Remove any excluded ciphers if (sslConfig.getExcludeCipherSuites() != null) { selected_ciphers.removeAll(Arrays.asList(sslConfig.getExcludeCipherSuites())); } return selected_ciphers.toArray(new String[selected_ciphers.size()]); }
/** * Select cipher suites to be used by the connector * based on configured inclusion and exclusion lists * as well as enabled and supported cipher suite lists. * @param enabledCipherSuites Array of enabled cipher suites * @param supportedCipherSuites Array of supported cipher suites * @return Array of cipher suites to enable */ public String[] selectCipherSuites(String[] enabledCipherSuites, String[] supportedCipherSuites) { Set<String> selected_ciphers = new HashSet<String>(); // Set the starting ciphers - either from the included or enabled list if (sslConfig.getIncludeCipherSuites() != null) { // Use only the supported included ciphers for (String cipherSuite : supportedCipherSuites) if (contains(sslConfig.getIncludeCipherSuites(), cipherSuite)) selected_ciphers.add(cipherSuite); } else { selected_ciphers.addAll(Arrays.asList(enabledCipherSuites)); } // Remove any excluded ciphers if (sslConfig.getExcludeCipherSuites() != null) { selected_ciphers.removeAll(Arrays.asList(sslConfig.getExcludeCipherSuites())); } return selected_ciphers.toArray(new String[selected_ciphers.size()]); }