maulin-vasavada commented on code in PR #3908:
URL: https://github.com/apache/cassandra/pull/3908#discussion_r1974208707
##########
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;
Review Comment:
So there are existing test cases-
[link](https://github.com/apache/cassandra/pull/3908/files#diff-877c6be441d503a35c8402b7277fa7fb2e860616d1f11161d1f61250f58146a2R96)
- which ensures that we don't fail on `""` password. This is essentially to
just support those. Here the intent is to return whatever `password` has when
the file path is empty. So in case when the password is not null but empty, we
will return empty instead of null.
--
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]