RFR: 8343232: PKCS#12 KeyStore support for RFC 9879: Use of Password-Based Message Authentication Code 1 (PBMAC1) [v7]
Mark Powers
mpowers at openjdk.org
Wed Oct 1 00:30:34 UTC 2025
On Tue, 30 Sep 2025 11:28:32 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:
>> A4-A6 are expected to throw an exception. That's why I catch the exception and print "pass".
>> Am I missing something?
>
> As you say, `load()` is expected to throw an exception so if it doesn't, the test should fail. Without throwing an explicit exception after `ks.load()`, the test will still pass.
>
> Suggestion:
>
> try {
> ks = KeyStore.getInstance("PKCS12");
> ks.load(...);
> throw new Exception("The expected exception was not thrown.");
> } catch (Exception expected) {
> System.out.println("PASS");
> }
I see it now.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24429#discussion_r2393139000
More information about the security-dev
mailing list