RFR: 8298420: PEM API: Implementation (Preview) [v18]

Sean Mullan mullan at openjdk.org
Tue May 13 15:26:16 UTC 2025


On Wed, 7 May 2025 16:34:24 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> I added the exception
>
> `SecretKeyFactory.getInstance()` will throw `NullPointerException` if the property is undefined. You would need to add a try/catch block for NPE specifically, which you don't have right now.

This is still an issue. In `EncryptedKeyInfo.encryptKey`, SecretKeyFactory.getInstance() will throw NullPointerException if the property is undefined.

I think a reasonable workaround would be to also hardcode a default of PBEWithHmacSHA256AndAES_128 if the property is undefined.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2086870633


More information about the security-dev mailing list