Skip to content

Commit d5e4f03

Browse files
committed
8268558: [TESTBUG] Case 2 in TestP11KeyFactoryGetRSAKeySpec is skipped
Backport-of: 041ae20b10e11381415e8f61fd39e9e19aa8d4f2
1 parent feeb418 commit d5e4f03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/jdk/sun/security/pkcs11/rsa/TestP11KeyFactoryGetRSAKeySpec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
23
* Copyright (c) 2021, Amazon.com, Inc. or its affiliates. All rights reserved.
34
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
45
*
@@ -21,7 +22,6 @@
2122
* questions.
2223
*/
2324

24-
import java.math.BigInteger;
2525
import java.security.KeyFactory;
2626
import java.security.KeyPair;
2727
import java.security.KeyPairGenerator;
@@ -86,7 +86,7 @@ public void main(Provider p) throws Exception {
8686

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

0 commit comments

Comments
 (0)