kishorekasi commented on a change in pull request #965: BOOKKEEPER-933: Add
support for PEM Key file formats
URL: https://github.com/apache/bookkeeper/pull/965#discussion_r161113647
##
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/tls/TLSContextFactory.java
##
@@ -70,11 +80,14 @@ private String getPasswordFromFile(String path) throws
IOException {
@SuppressFBWarnings(
value = "OBL_UNSATISFIED_OBLIGATION",
justification = "work around for java 9:
https://github.com/spotbugs/spotbugs/issues/493;)
-private KeyStore loadKeyStore(String keyStoreType, String
keyStoreLocation, String keyStorePassword)
+private KeyStore loadKeyFile(String keyFileType, String keyFileLocation,
String keyFilePassword)
throws KeyStoreException, NoSuchAlgorithmException,
CertificateException, IOException {
-KeyStore ks = KeyStore.getInstance(keyStoreType);
-try (FileInputStream ksin = new FileInputStream(keyStoreLocation)) {
-ks.load(ksin, keyStorePassword.trim().toCharArray());
+KeyStore ks = KeyStore.getInstance(keyFileType);
+FileInputStream ksin = new FileInputStream(keyFileLocation);
Review comment:
ok
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org
With regards,
Apache Git Services