RFR: 8343622: AesDkCrypto.stringToKey should not return null [v2]

Sean Mullan mullan at openjdk.org
Thu Nov 7 18:35:46 UTC 2024


On Tue, 5 Nov 2024 15:51:58 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> When an exception happens inside these stringToKey() methods, it returns a null. This would lead to unexpected NPE some time in the future.
>
> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   let it throw NSAE

There is already a check for a `null` return value in one of the `EncryptedKey` constructors - did you consider instead adding a similar check in the other ctor?

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

PR Comment: https://git.openjdk.org/jdk/pull/21908#issuecomment-2462953523


More information about the security-dev mailing list