opencryptoki/0014-EP11-Add-new-control-points.patch

54 lines
2.6 KiB
Diff

From b89b408953e9192d7bfcb31cdf8c48d6c973488a Mon Sep 17 00:00:00 2001
From: Ingo Franzki <ifranzki@linux.ibm.com>
Date: Wed, 16 Feb 2022 10:23:29 +0100
Subject: [PATCH 14/34] EP11: Add new control points
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
---
usr/lib/ep11_stdll/ep11_specific.c | 7 +++++++
usr/lib/ep11_stdll/ep11cpfilter.conf | 6 ++++++
2 files changed, 13 insertions(+)
diff --git a/usr/lib/ep11_stdll/ep11_specific.c b/usr/lib/ep11_stdll/ep11_specific.c
index 304989fc..147ce7b2 100644
--- a/usr/lib/ep11_stdll/ep11_specific.c
+++ b/usr/lib/ep11_stdll/ep11_specific.c
@@ -10524,13 +10524,20 @@ static const_info_t ep11_cps[] = {
CONSTINFO(XCP_CPB_WRAP_WITH_RAW_SPKI),
CONSTINFO(XCP_CPB_ALG_DH),
CONSTINFO(XCP_CPB_DERIVE),
+ CONSTINFO(XCP_CPB_ALLOW_NONSESSION),
CONSTINFO(XCP_CPB_ALG_EC_25519),
+ CONSTINFO(XCP_CPB_ALG_EC_SECGCRV),
CONSTINFO(XCP_CPB_ALG_NBSI2017),
CONSTINFO(XCP_CPB_CPACF_PK),
CONSTINFO(XCP_CPB_ALG_PQC_DILITHIUM),
CONSTINFO(XCP_CPB_ALG_PQC),
CONSTINFO(XCP_CPB_BTC),
CONSTINFO(XCP_CPB_ECDSA_OTHER),
+ CONSTINFO(XCP_CPB_ALG_NFIPS2021),
+ CONSTINFO(XCP_CPB_ALG_NFIPS2024),
+ CONSTINFO(XCP_CPB_COMPAT_LEGACY_SHA3),
+ CONSTINFO(XCP_CPB_DSA_PARAMETER_GEN),
+ CONSTINFO(XCP_CPB_DERIVE_NON_AB_KEYS),
};
#ifdef DEBUG
diff --git a/usr/lib/ep11_stdll/ep11cpfilter.conf b/usr/lib/ep11_stdll/ep11cpfilter.conf
index 0d3a6b3f..9d6a2fc8 100644
--- a/usr/lib/ep11_stdll/ep11cpfilter.conf
+++ b/usr/lib/ep11_stdll/ep11cpfilter.conf
@@ -80,3 +80,9 @@ XCP_CPB_BTC: CKM_IBM_BTC_DERIVE
# enable non-ECDSA/non-EdDSA elliptic curve signature algorithms
XCP_CPB_ECDSA_OTHER: CKM_IBM_ECDSA_OTHER
+
+# allow non-FIPS-approved algs (2021)
+XCP_CPB_ALG_NFIPS2021: CKM_RSA_PKCS, CKM_SHA1_RSA_PKCS, CKM_DSA_SHA1, CKM_ECDSA_SHA1, CKM_DES_KEY_GEN, CKM_DES_ECB, CKM_DES_CBC, CKM_DES_CBC_PAD, CKM_DES2_KEY_GEN, CKM_DES3_KEY_GEN, CKM_DES3_ECB, CKM_DES3_CBC, CKM_DES3_MAC, CKM_DES3_MAC_GENERAL, CKM_DES3_CBC_PAD, CKM_DES3_CMAC_GENERAL, CKM_DES3_CMAC, CKM_DES_OFB64, CKM_DES_CFB64, CKM_DES_CFB8, CKM_SHA_1_HMAC, CKM_SHA_1_HMAC_GENERAL, CKM_SHA1_KEY_DERIVATION
+
+# allow non-FIPS-approved algs (2024)
+XCP_CPB_ALG_NFIPS2024: CKM_RSA_PKCS, CKM_SHA1_RSA_PKCS, CKM_DSA_SHA1, CKM_ECDSA_SHA1, CKM_DES_KEY_GEN, CKM_DES_ECB, CKM_DES_CBC, CKM_DES_CBC_PAD, CKM_DES2_KEY_GEN, CKM_DES3_KEY_GEN, CKM_DES3_ECB, CKM_DES3_CBC, CKM_DES3_MAC, CKM_DES3_MAC_GENERAL, CKM_DES3_CBC_PAD, CKM_DES3_CMAC_GENERAL, CKM_DES3_CMAC, CKM_DES_OFB64, CKM_DES_CFB64, CKM_DES_CFB8, CKM_SHA_1_HMAC, CKM_SHA_1_HMAC_GENERAL, CKM_SHA1_KEY_DERIVATION
--
2.16.2.windows.1