On Wed, 7 May 2025 16:34:24 GMT, Sean Mullan <mul...@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

Reply via email to