RFR: 8348732: SunJCE and SunPKCS11 have different PBE key encodings [v5]

Valerie Peng valeriep at openjdk.org
Fri Apr 18 20:40:00 UTC 2025


On Thu, 17 Apr 2025 17:51:16 GMT, Mark Powers <mpowers at openjdk.org> wrote:

>> Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   minor comment and copyright year update.
>
> src/java.base/share/classes/sun/security/util/PBEUtil.java line 270:
> 
>> 268:                 throw new InvalidKeyException("Missing password");
>> 269:             }
>> 270:             passwdChars = decodePassword(passwdBytes);
> 
> Not this line, but on line 286 a little ways down, you could use pattern matching and delete line 290.

Sure~

> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11PBECipher.java line 27:
> 
>> 25: package sun.security.pkcs11;
>> 26: 
>> 27: import java.security.AlgorithmParameters;
> 
> Down on line 41, you don't need to import PBEParameterSpec.

Will remove. Thanks~

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24068#discussion_r2051093811
PR Review Comment: https://git.openjdk.org/jdk/pull/24068#discussion_r2051094012


More information about the security-dev mailing list