RFR: 8346129: Simplify EdDSA & XDH curve name usage [v2]

Anthony Scarpino ascarpino at openjdk.org
Tue Feb 25 18:43:55 UTC 2025


On Tue, 25 Feb 2025 14:46:11 GMT, Artur Barashev <abarashev at openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - undo comment
>>  - review comments and remove aliases
>
> src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java line 92:
> 
>> 90:             if (algorithm.equalsIgnoreCase(a)) {
>> 91:                 return false;
>> 92:             }
> 
> We already do case-insensitive match here because `algorithms` is a case-insensitive TreeMap constructed above in `getAlgorithms()`. Existing code is also faster because it's a tree lookup instead of a linear iteration. This whole file can stay unchanged if we removed aliases already.

I'm glad you noticed that.  Thanks.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23647#discussion_r1970341623


More information about the security-dev mailing list