On Thu, 17 Jun 2021 12:05:28 GMT, Dongbo He <dongb...@openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java
>>  line 72:
>> 
>>> 70:             algorithmsInProperty = property.split(",");
>>> 71:             for (int i = 0; i < algorithmsInProperty.length; i++) {
>>> 72:                 algorithmsInProperty[i] = 
>>> algorithmsInProperty[i].trim().toLowerCase(Locale.ENGLISH);
>> 
>> Is it possible to keep the current behavior that the property could be 
>> sensitive?  It may be not desired to allow "keysize" for "keySize" spec in 
>> the property.
>
> If we keep property sensitive, we may need to use TreeSet. I have updated the 
> PR with TreeSet. Fortunately, the performance hasn't changed much.

I did not get the point to use TreeSet.  Is it sufficient if the toLowerCase() 
is not added (and don't compare keywords like "keySize" by ignoring cases)?


- algorithmsInProperty[i] = algorithmsInProperty[i].trim().toLowerCase(...);
+ algorithmsInProperty[i] = algorithmsInProperty[i].trim();

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

PR: https://git.openjdk.java.net/jdk/pull/4424

Reply via email to