On Thu, 7 Nov 2024 16:28:46 GMT, Kevin Driver <kdri...@openjdk.org> wrote:

> TCK/spec compliance fix for two `getInstance` methods in KDF - unwrap a 
> wrapped IAPE from an NSAE.

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`.

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?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21961#discussion_r1833040703
PR Review Comment: https://git.openjdk.org/jdk/pull/21961#discussion_r1833042533

Reply via email to