RFR: 8262316: Reducing locks in RSA Blinding [v3]

Anthony Scarpino ascarpino at openjdk.java.net
Tue Apr 6 19:43:55 UTC 2021


On Tue, 6 Apr 2021 07:29:00 GMT, djelinski <github.com+30433125+djelinski at openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use ReentrantLock for put and get
>
> src/java.base/share/classes/sun/security/rsa/RSACore.java line 443:
> 
>> 441:         lock.lock();
>> 442:         try {
>> 443:             queue = blindingCache.get(n);
> 
> Suggestion:
> 
>             queue = blindingCache.computeIfAbsent(n, ignored -> new ConcurrentLinkedQueue<>());

Yeah, that makes sense after all the changes

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

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



More information about the security-dev mailing list