michaeljmarshall commented on a change in pull request #13424:
URL: https://github.com/apache/pulsar/pull/13424#discussion_r774226970



##########
File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/util/keystoretls/KeyStoreSSLContext.java
##########
@@ -105,7 +105,11 @@ public KeyStoreSSLContext(Mode mode,
                 ? DEFAULT_KEYSTORE_TYPE
                 : trustStoreTypeString;
         this.trustStorePath = trustStorePath;
-        this.trustStorePassword = trustStorePassword;
+        if (trustStorePassword == null) {
+            this.trustStorePassword = "";
+        } else {
+            this.trustStorePassword = trustStorePassword;
+        }

Review comment:
       I might be wrong, but I think it is set here:
   
   
https://github.com/apache/pulsar/blob/6657a6c2fb23be579e74bac7c7c07a70cabfb4b2/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java#L2390-L2394
   
   It looks like that file has several variables that end in 
`TlsTrustStorePassword` though, so I'm not sure how they relate to this code 
block. I wonder if we should consider updating all of the defaults to make sure 
that every one supports an empty string default and is therefore consistent.
   
   (I haven't looked closely at this part of the code base, so please take that 
into consideration when looking at these other variables.)




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to