RFR: 8320449: ECDHKeyAgreement should validate parameters before using them

John Jiang jjiang at openjdk.org
Sat Jan 13 00:52:29 UTC 2024


On Fri, 12 Jan 2024 20:51:03 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> ECDHKeyAgreement should validate the parameters before assigning them to the fields.
>
> test/jdk/sun/security/ec/ECDHKeyAgreementParamValidation.java line 28:
> 
>> 26:  * @bug 8320449
>> 27:  * @summary ECDHKeyAgreement should validate parameters before assigning them to fields.
>> 28:  * @run junit ECDHKeyAgreementParamValidation
> 
> Most security regression tests don't use junit. I think it would be better to not rely on it. There is a similar asserts library for tests that you can use in `test/lib/jdk/test/lib/Asserts.java`.

I originally didn't depend on JUnit. But this tool can easily execute multiple test cases independently.
A single failed case doesn't make the whole test fail fast, and all cases always be executed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17373#discussion_r1451058140



More information about the security-dev mailing list