RFR: 8343772: Expected IAPE not thrown in KDF.getInstance (TCK) [v2]
Kevin Driver
kdriver at openjdk.org
Thu Nov 7 17:18:12 UTC 2024
On Thu, 7 Nov 2024 17:00:48 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> Kevin Driver has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review comments and fill empty exception message elsewhere
>
> src/java.base/share/classes/javax/crypto/KDF.java line 470:
>
>> 468: InvalidAlgorithmParameterException {
>> 469: Throwable cause = e.getCause();
>> 470: if (cause instanceof InvalidAlgorithmParameterException) {
>
> You can use `instanceof InvalidAlgorithmParameterException iape`.
Addressed in: https://github.com/openjdk/jdk/pull/21961/commits/48b5635f37d0b68ee158316f701931a27909d15f.
> test/jdk/com/sun/crypto/provider/KDF/HKDFExhaustiveTest.java line 311:
>
>> 309: Utils.runAndCheckException(
>> 310: () -> KDF.getInstance(KDF_ALGORITHMS[0], new TestKDFParams(), SUNJCE),
>> 311: InvalidAlgorithmParameterException.class);
>
> How about also test the other `getInstance` method with `String provider` argument?
Addressed in https://github.com/openjdk/jdk/pull/21961/commits/48b5635f37d0b68ee158316f701931a27909d15f.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21961#discussion_r1833068099
PR Review Comment: https://git.openjdk.org/jdk/pull/21961#discussion_r1833069087
More information about the security-dev
mailing list