-
Bug
-
Resolution: Fixed
-
P4
-
24
-
b24
For the method -
getInstance(String, KDFParameters, String)
The expected InvalidAlgorithmParameterException not thrown when
the specified provider supports the specified KDF algorithm but does not support the specified parameters
Instead NoSuchAlgorithmException is thrown with the cause InvalidAlgorithmParameterException
=== sample code ===
private void test01() {
try {
KDF.getInstance("HKDF-SHA512", new TestKDFParams(), "SunJCE");
} catch (InvalidAlgorithmParameterException exception) {
System.out.println("EXPECTED when the specified provider supports the specified KDF algorithm but does " +
"not support the specified parameters");
} catch (Exception exception) {
System.out.println("UNEXPECTED - " + exception);
System.out.println("Cause - "+exception.getCause());
}
}
static class TestKDFParams implements KDFParameters {
}
getInstance(String, KDFParameters, String)
The expected InvalidAlgorithmParameterException not thrown when
the specified provider supports the specified KDF algorithm but does not support the specified parameters
Instead NoSuchAlgorithmException is thrown with the cause InvalidAlgorithmParameterException
=== sample code ===
private void test01() {
try {
KDF.getInstance("HKDF-SHA512", new TestKDFParams(), "SunJCE");
} catch (InvalidAlgorithmParameterException exception) {
System.out.println("EXPECTED when the specified provider supports the specified KDF algorithm but does " +
"not support the specified parameters");
} catch (Exception exception) {
System.out.println("UNEXPECTED - " + exception);
System.out.println("Cause - "+exception.getCause());
}
}
static class TestKDFParams implements KDFParameters {
}
- links to
-
Commit(master) openjdk/jdk/2c7bea1c
-
Review(master) openjdk/jdk/21961