Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8268558: [TESTBUG] Case 2 in TestP11KeyFactoryGetRSAKeySpec is skipped
Backport-of: 041ae20b10e11381415e8f61fd39e9e19aa8d4f2
  • Loading branch information
GoeLin committed Mar 10, 2022
1 parent feeb418 commit d5e4f03
Showing 1 changed file with 2 additions and 2 deletions.
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Amazon.com, Inc. or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand All @@ -21,7 +22,6 @@
* questions.
*/

import java.math.BigInteger;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
Expand Down Expand Up @@ -86,7 +86,7 @@ public void main(Provider p) throws Exception {

private static void testKeySpec(KeyFactory factory, PrivateKey key, Class<? extends KeySpec> specClass) throws Exception {
try {
KeySpec spec = factory.getKeySpec(key, RSAPrivateKeySpec.class);
KeySpec spec = factory.getKeySpec(key, specClass);
if (testingSensitiveKeys) {
throw new Exception("Able to retrieve spec from sensitive key");
}
Expand Down

1 comment on commit d5e4f03

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.