From 8ddd8d766221c1ac26455512698bcf58d6e24a1c Mon Sep 17 00:00:00 2001 From: Bob Du Date: Thu, 19 Sep 2024 14:55:40 -0400 Subject: [PATCH] Add support for EC aliases in SunPKCS11 Allow EC aliases to be used for KeyFactory and KeyPairGenerator in SunPKCS11 Signed-off-by: Bob Du --- .../share/classes/sun/security/pkcs11/SunPKCS11.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java index 5cf588da22b..562a6093455 100644 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java @@ -874,7 +874,7 @@ private static void register(Descriptor d) { d(KPG, "DH", P11KeyPairGenerator, dhAlias, m(CKM_DH_PKCS_KEY_PAIR_GEN)); - d(KPG, "EC", P11KeyPairGenerator, + dA(KPG, "EC", P11KeyPairGenerator, m(CKM_EC_KEY_PAIR_GEN)); dA(KG, "ARCFOUR", P11KeyGenerator, @@ -924,7 +924,7 @@ private static void register(Descriptor d) { d(KF, "DH", P11DHKeyFactory, dhAlias, m(CKM_DH_PKCS_KEY_PAIR_GEN, CKM_DH_PKCS_DERIVE)); - d(KF, "EC", P11ECKeyFactory, + dA(KF, "EC", P11ECKeyFactory, m(CKM_EC_KEY_PAIR_GEN, CKM_ECDH1_DERIVE, CKM_ECDSA, CKM_ECDSA_SHA1));