https://issues.apache.org/bugzilla/show_bug.cgi?id=55527
Bug ID: 55527
Summary: JSSESocketFactory conditionally converts alias to
lower case; condition is unwise
Product: Tomcat 7
Version: unspecified
Hardware: PC
OS: Windows XP
Status: NEW
Severity: minor
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
JSSESocketFactory conditionally converts the alias to lower case.
The condition is coded as follows:
private static final String defaultKeystoreType = "JKS";
...
if (JSSESocketFactory.defaultKeystoreType.equals(keystoreType)) {
alias = alias.toLowerCase(Locale.ENGLISH);
}
If the intention is to downcase only JKS store aliases, then the comparison
should be made with "JKS", not a constant that happens to contain "JKS" at
present.
Using a specific comparator would both clarify the code and protect against a
possible change to the default (albeit very unlikely).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]