Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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 @@ -85,7 +85,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