Skip to content

Commit

Permalink
Merge pull request #254 from ionut-arm/pkcs11-export-fix
Browse files Browse the repository at this point in the history
Fix attribute conversion in PKCS11 provider
  • Loading branch information
ionut-arm authored Sep 21, 2020
2 parents 82718eb + 7605e41 commit b80416b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/providers/pkcs11_provider/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,11 +620,11 @@ fn key_pair_usage_flags_to_pkcs11_attributes(
}

if usage_flags.export {
priv_template.push(CK_ATTRIBUTE::new(CKA_EXTRACTABLE).with_bool(&CK_FALSE));
priv_template.push(CK_ATTRIBUTE::new(CKA_SENSITIVE).with_bool(&CK_TRUE));
} else {
priv_template.push(CK_ATTRIBUTE::new(CKA_EXTRACTABLE).with_bool(&CK_TRUE));
priv_template.push(CK_ATTRIBUTE::new(CKA_SENSITIVE).with_bool(&CK_FALSE));
} else {
priv_template.push(CK_ATTRIBUTE::new(CKA_EXTRACTABLE).with_bool(&CK_FALSE));
priv_template.push(CK_ATTRIBUTE::new(CKA_SENSITIVE).with_bool(&CK_TRUE));
}

if usage_flags.copy {
Expand Down

0 comments on commit b80416b

Please sign in to comment.