RFR: 8327461: KeyStore getEntry is not thread-safe [v4]

Hai-May Chao hchao at openjdk.org
Fri Mar 8 09:22:13 UTC 2024


On Fri, 8 Mar 2024 08:42:41 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> Hai-May Chao has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update engineDeleteEntry
>
> src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java line 1331:
> 
>> 1329:             if (internalEngineIsCertificateEntry(entry)) {
>> 1330:                 if (entry instanceof CertEntry &&
>> 1331:                     ((CertEntry) entry).trustedKeyUsage != null) {
> 
> `internalEngineIsCertificateEntry` performs exactly the same checks; you can remove these lines.

Removed.

> src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java line 1368:
> 
>> 1366:                         entry.attributes);
>> 1367:                 }
>> 1368:             } else if (!internalEngineIsKeyEntry(entry)) {
> 
> Suggestion:
> 
>             } else {
> 
> 
> (the matching `if` already checks `internalEngineIsKeyEntry(entry)`)

Removed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18156#discussion_r1517455306
PR Review Comment: https://git.openjdk.org/jdk/pull/18156#discussion_r1517454736



More information about the security-dev mailing list