parent
414a236741
commit
ad63d6e641
@ -0,0 +1,20 @@
|
|||||||
|
diff -up ./lib/softoken/pkcs11u.c.fipsrsaoaep ./lib/softoken/pkcs11u.c
|
||||||
|
--- ./lib/softoken/pkcs11u.c.fipsrsaoaep 2024-10-24 09:27:17.971673855 +0200
|
||||||
|
+++ ./lib/softoken/pkcs11u.c 2024-10-24 09:23:35.006352872 +0200
|
||||||
|
@@ -2565,6 +2565,16 @@ sftk_handleSpecial(SFTKSlot *slot, CK_ME
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sftk_checkKeyLength(targetKeyLength, 112, 512, 1);
|
||||||
|
+ case SFTKFIPSRSAOAEP:;
|
||||||
|
+ CK_RSA_PKCS_OAEP_PARAMS *rsaoaep = (CK_RSA_PKCS_OAEP_PARAMS *)
|
||||||
|
+ mech->pParameter;
|
||||||
|
+
|
||||||
|
+ HASH_HashType hash_msg = sftk_GetHashTypeFromMechanism(rsaoaep->hashAlg);
|
||||||
|
+ HASH_HashType hash_pad = sftk_GetHashTypeFromMechanism(rsaoaep->mgf);
|
||||||
|
+ /* message hash and mask generation function must be the same */
|
||||||
|
+ if (hash_pad != hash_msg) return PR_FALSE;
|
||||||
|
+
|
||||||
|
+ return sftk_checkFIPSHash(rsaoaep->hashAlg, PR_FALSE, PR_FALSE);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
diff -up ./lib/softoken/pkcs11u.c.fips_check_curver25519 ./lib/softoken/pkcs11u.c
|
||||||
|
--- ./lib/softoken/pkcs11u.c.fips_check_curver25519 2024-11-11 11:24:25.186654635 +0100
|
||||||
|
+++ ./lib/softoken/pkcs11u.c 2024-11-07 10:26:03.806562274 +0100
|
||||||
|
@@ -2356,7 +2356,7 @@ sftk_getKeyLength(SFTKObject *source)
|
||||||
|
* key length is CKA_VALUE, which is the default */
|
||||||
|
keyType = CKK_INVALID_KEY_TYPE;
|
||||||
|
}
|
||||||
|
- if (keyType == CKK_EC) {
|
||||||
|
+ if (keyType == CKK_EC || keyType == CKK_EC_EDWARDS || keyType == CKK_EC_MONTGOMERY) {
|
||||||
|
SECOidTag curve = sftk_quickGetECCCurveOid(source);
|
||||||
|
switch (curve) {
|
||||||
|
case SEC_OID_CURVE25519:
|
Loading…
Reference in new issue