RFR: 8346129: Simplify EdDSA & XDH curve name usage

Artur Barashev abarashev at openjdk.org
Wed Feb 19 21:34:51 UTC 2025


On Fri, 14 Feb 2025 18:44:38 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

> Hi,
> 
> I need a review for the following change. Naming conventions for EdDSA and XDH have inconsistencies between DisabledAlgorithms and KeyPairGenerator. These internal changes help make it more consistent when parsing the actual curve being used vs the broader algorithm name.
> 
> thanks
> 
> Tony

src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java line 133:

> 131:         for (String a : algorithms) {
> 132:             if (algorithm.equalsIgnoreCase(a) ||
> 133:                 getAliases(a).contains(algorithm)) {

We do case-insensitive match for the algorithm itself but then we do case-sensitive aliases lookup and case-sensitive match for the aliases `contains` call?

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

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


More information about the security-dev mailing list