rdhabalia commented on a change in pull request #1225: Enable specification of TLS Protocol Versions and Cipher Suites URL: https://github.com/apache/incubator-pulsar/pull/1225#discussion_r167724421
########## File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java ########## @@ -95,12 +97,22 @@ public static SslContext createNettySslContextForClient(boolean allowInsecureCon } public static SslContext createNettySslContextForServer(boolean allowInsecureConnection, String trustCertsFilePath, - String certFilePath, String keyFilePath) + String certFilePath, String keyFilePath, Set<String> ciphers, Set<String> protocols) throws GeneralSecurityException, SSLException, FileNotFoundException { X509Certificate[] certificates = loadCertificatesFromPemFile(certFilePath); PrivateKey privateKey = loadPrivateKeyFromPemFile(keyFilePath); SslContextBuilder builder = SslContextBuilder.forServer(privateKey, (X509Certificate[]) certificates); + if (ciphers != null && ciphers.size() > 0) { + builder.ciphers(ciphers); + } + + if (protocols != null && protocols.size() > 0) { + String[] protocolsArray = new String[protocols.size()]; Review comment: `builder.protocols(protocols.toArray(protocolsArray));` ?? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services