Skip to content

Commit c9c517a

Browse files
committed
Adjust code for 11u missing JDK-8023980: JCE doesn't provide any class to handle RSA private key in PKCS#1
openjdk/jdk@68cf65d https://bugs.openjdk.org/browse/JDK-8023980
1 parent 833d9b3 commit c9c517a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/FIPSKeyImporter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,7 @@ private static void exportPrivateKey(
318318
CKA_PRIVATE_EXPONENT, CKA_PRIME_1, CKA_PRIME_2,
319319
CKA_EXPONENT_1, CKA_EXPONENT_2, CKA_COEFFICIENT);
320320
RSAPrivateKey rsaPKey = RSAPrivateCrtKeyImpl.newKey(
321-
RSAUtil.KeyType.RSA, "PKCS#8", plainExportedKey
322-
);
321+
plainExportedKey);
323322
CK_ATTRIBUTE attr;
324323
if ((attr = sensitiveAttrs.get(CKA_PRIVATE_EXPONENT)) != null) {
325324
attr.pValue = rsaPKey.getPrivateExponent().toByteArray();

0 commit comments

Comments
 (0)