You've already forked opencryptoki
mirror of
https://github.com/opencryptoki/opencryptoki.git
synced 2026-10-25 17:39:16 +03:00
PKCS#11 v3.0 adds mechanisms like CKM_SHA3_nnn_KEY_DERIVE for SHA3 based key derivation. For whatever reason, the SHA3 variants of those mechanisms are called like ..._KEY_DERIVE while the SHA1 and SHA2 variants are called like ..._KEY_DERIVATION. In PKCS#11 v3.1 this has been aligned and these mechanisms are now called CKM_SHA3_nnn_KEY_DERIVATION, but there are aliases for the old mechanism names like CKM_SHA3_nnn_KEY_DERIVE to map to the new names. Update the code to use the new names, but also add the aliases so that existing applications that use the old names continue to work. Also add the aliases to the policy parser, to allow parsing existing policy files that use the old names. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>