RFR: 8298127: HSS/LMS Signature Verification [v5]

Weijun Wang weijun at openjdk.org
Mon May 8 16:05:51 UTC 2023


On Mon, 8 May 2023 13:32:29 GMT, Ferenc Rakoczi <duke at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/provider/HSS.java line 745:
>> 
>>> 743: 
>>> 744:         @Override
>>> 745:         protected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) throws InvalidKeySpecException {
>> 
>> Usually when `key` is null an `InvalidKeySpecException` is thrown. Here it's an NPE.
>
> Done.

`key.equals(null)` would throw an NPE. Just use `key == null`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13691#discussion_r1187618885



More information about the security-dev mailing list