anmolnar commented on code in PR #2336:
URL: https://github.com/apache/zookeeper/pull/2336#discussion_r2677629918
##########
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:
Shall we check the name already exists first and add the suffix only when
it's necessary?
--
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]