tsaarni commented on code in PR #2336:
URL: https://github.com/apache/zookeeper/pull/2336#discussion_r2678464344


##########
zookeeper-server/src/main/java/org/apache/zookeeper/util/PemReader.java:
##########
@@ -92,9 +92,10 @@ public static KeyStore loadTrustStore(File 
certificateChainFile) throws IOExcept
         keyStore.load(null, null);
 
         List<X509Certificate> certificateChain = 
readCertificateChain(certificateChainFile);
+        int i = 1;
         for (X509Certificate certificate : certificateChain) {
             X500Principal principal = certificate.getSubjectX500Principal();
-            keyStore.setCertificateEntry(principal.getName("RFC2253"), 
certificate);
+            keyStore.setCertificateEntry(principal.getName("RFC2253") + "-" + 
i++, certificate);

Review Comment:
   @anmolnar Yes, that's a good idea. I updated it and added a check to make 
sure the aliases have the right suffix. Now, the first suffix starts from 2 
since the first one doesn't have one.



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