You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "michaeljmarshall (via GitHub)" <gi...@apache.org> on 2023/02/14 05:57:37 UTC

[GitHub] [pulsar] michaeljmarshall commented on a diff in pull request #19483: [fix][client] Fix load the trust store file

michaeljmarshall commented on code in PR #19483:
URL: https://github.com/apache/pulsar/pull/19483#discussion_r1105326456


##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/keystoretls/KeyStoreSSLContext.java:
##########
@@ -159,8 +159,10 @@ public SSLContext createSSLContext() throws GeneralSecurityException, IOExceptio
                     : TrustManagerFactory.getInstance(tmfAlgorithm);
             KeyStore trustStore = KeyStore.getInstance(trustStoreTypeString);
             char[] passwordChars = trustStorePassword.toCharArray();
-            try (FileInputStream inputStream = new FileInputStream(trustStorePath)) {
-                trustStore.load(inputStream, passwordChars);
+            if (!Strings.isNullOrEmpty(trustStorePath)) {

Review Comment:
   What is the implication of an empty value resulting in skipping the load here? Should we document the relevant configurations to describe this behavior?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org