RFR: 8268427: Improve AlgorithmConstraints:checkAlgorithm performance [v2]

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Thu Jun 17 16:11:29 UTC 2021


On Thu, 17 Jun 2021 15:59:45 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> 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();

Sorry, I missed a "case" in the original comment (corrected).  I meant to keep the property case sensitive in the hash set so that the keywords like "keySize" could be used correctly.

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

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



More information about the security-dev mailing list