smiklosovic commented on code in PR #3908:
URL: https://github.com/apache/cassandra/pull/3908#discussion_r1974992498
##########
src/java/org/apache/cassandra/security/FileBasedSslContextFactory.java:
##########
@@ -294,5 +301,38 @@ protected boolean passwordMatchesIfPresent(String
keyPassword)
{
return StringUtils.isEmpty(password) ||
keyPassword.equals(password);
}
+
+ private static String resolvePassword(String keystoreFilePath, String
password, String passwordFilePath)
+ {
+ if (password != null)
+ return password;
+
+ if (StringUtils.isEmpty(passwordFilePath))
+ return password;
+
+ File keystorePasswordFile = new File(passwordFilePath);
+
+ if (!keystorePasswordFile.exists())
+ {
+ final String msg = format("keystore password file %s does not
exist", keystorePasswordFile.path());
+ throw new ConfigurationException(msg);
+ }
+
+ try
+ {
+ // we expect a password to be on the first line
+ List<String> lines = FileUtils.readLines(keystorePasswordFile);
Review Comment:
yeah this is fine as it is
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]