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

Ferenc Rakoczi duke at openjdk.org
Tue May 2 20:39:30 UTC 2023


On Fri, 28 Apr 2023 19:54:42 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/provider/HSS.java line 423:
>> 
>>> 421: 
>>> 422:                 default:
>>> 423:                     throw new IllegalArgumentException("Unsupported or bad LMS type");
>> 
>> Could this be `InvalidParameterException` instead?
>
> Or should it be a `InvalidKeyException` if the method is called when creating a public key?
> 
> Anyway, we need to make sure the correct exceptions are thrown in public APIs. This needs a lot of tests.

I have caught this at the call sites and converted it to the relevant exceptions.

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

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



More information about the security-dev mailing list