freeznet commented on a change in pull request #13875:
URL: https://github.com/apache/pulsar/pull/13875#discussion_r789334390



##########
File path: 
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/worker/WorkerConfig.java
##########
@@ -604,9 +604,10 @@ public String getWorkerHostname() {
     }
 
     public byte[] getTlsTrustChainBytes() {
-        if (StringUtils.isNotEmpty(getTlsTrustCertsFilePath()) && 
Files.exists(Paths.get(getTlsTrustCertsFilePath()))) {
+        if (StringUtils.isNotEmpty(getBrokerClientTrustCertsFilePath())
+                && 
Files.exists(Paths.get(getBrokerClientTrustCertsFilePath()))) {
             try {
-                return 
Files.readAllBytes(Paths.get(getTlsTrustCertsFilePath()));
+                return 
Files.readAllBytes(Paths.get(getBrokerClientTrustCertsFilePath()));

Review comment:
       yes, `getBrokerClientTrustCertsFilePath` remains the compatible and if 
user do not define brokerClientTrustCertsFilePath (which is not inhert from 
`broker.conf`), it will use `tlsTrustCertsFilePath` as the return value.
   
   ref: 
   ```
       public String getBrokerClientTrustCertsFilePath() {
           // for compatible, if user do not define 
brokerClientTrustCertsFilePath, we will use tlsTrustCertsFilePath,
           // otherwise we will use brokerClientTrustCertsFilePath
           if (StringUtils.isNotBlank(brokerClientTrustCertsFilePath)) {
               return brokerClientTrustCertsFilePath;
           } else {
               return tlsTrustCertsFilePath;
           }
       }
   ```




-- 
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