Skip to content

Commit 938957b

Browse files
committed
Fix sign attribute in PKCS11
This commit fixes a bug in the conversion process for key attributes in the PKCS11 provider. Instead of CKA_SIGN_RECOVER, CKA_SIGN is to be used. Signed-off-by: Ionut Mihalcea <ionut.mihalcea@arm.com>
1 parent b5e4760 commit 938957b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/pkcs11_provider/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,9 @@ fn key_pair_usage_flags_to_pkcs11_attributes(
590590
priv_template: &mut Vec<CK_ATTRIBUTE>,
591591
) {
592592
if usage_flags.sign_hash || usage_flags.sign_message {
593-
priv_template.push(CK_ATTRIBUTE::new(CKA_SIGN_RECOVER).with_bool(&CK_TRUE));
593+
priv_template.push(CK_ATTRIBUTE::new(CKA_SIGN).with_bool(&CK_TRUE));
594594
} else {
595-
priv_template.push(CK_ATTRIBUTE::new(CKA_SIGN_RECOVER).with_bool(&CK_FALSE));
595+
priv_template.push(CK_ATTRIBUTE::new(CKA_SIGN).with_bool(&CK_FALSE));
596596
}
597597

598598
if usage_flags.verify_hash || usage_flags.verify_message {

0 commit comments

Comments
 (0)