Add CKA_VALUE with NULL retrieval function to private key template
CKA_VALUE was missing from certificate template, causing GetAttributeValue
calls on private keys to return CKR_ATTRIBUTE_TYPE_INVALID instead of
CKR_ATTRIBUTE_SENSITIVE.  Adding this attribute to the template triggers
the CKR_ATTRIBUTE_SENSITIVE return value instead.
@@ -416,6 +416,8 @@ const pkcs11_attrib_model pkcs11_key_private_attributes[] = {
{ CKA_EC_PARAMS, pkcs11_key_get_ec_params },
/** DER - encoding of ANSI X9.62 ECPoint value Q */
{ CKA_EC_POINT, pkcs11_key_get_ec_point },
+ /** The value of the private key should remain private. A NULL function pointer is interpreted as a sensitive attribute. */
+ { CKA_VALUE, NULL_PTR },
};
const CK_ULONG pkcs11_key_private_attributes_count = PKCS11_UTIL_ARRAY_SIZE(pkcs11_key_private_attributes);
