RFR: 8268427: Improve AlgorithmConstraints:checkAlgorithm performance [v2]
Xue-Lei Andrew Fan
xuelei at openjdk.java.net
Fri Jun 18 05:33:25 UTC 2021
On Fri, 18 Jun 2021 04:56:25 GMT, Dongbo He <dongbohe at openjdk.org> wrote:
>> The checkAlgorithm is using equalsIgnoreCase(), so it is safe for it. My concern is mainly about the keywords, like "keySize" used the property, not really the algorithm name. It is good to keep the current case sensitive checking behavior unchanged.
>
> Hi, Xuelei, thank you for your comments. I may not express it clearly, let me clarify. My concern is that if we use the HashSet:contains method to check whether an item is in the hash set, we cannot use equalsIgnoreCase(), so I used `new TreeSet<>(String.CASE_INSENSITIVE_ORDER)` that can support equalsIgnoreCase().
>
> According to my understanding, the current checkAlgorithm is not case sensitive, because it ignores the case of the item being checked. Looking forward to your suggestions。
I see your point now. Thank you for the clarification. I need more time to think about if there is an improvement. I will be back.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4424
More information about the security-dev
mailing list