Skip to content

Commit 0bda081

Browse files
Complete derived key templates
They were missing the object class attribute Signed-off-by: Jacob Prud'homme <[email protected]>
1 parent e68cea7 commit 0bda081

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cryptoki/tests/basic.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ fn derive_key_concatenation_two_keys() -> TestResult {
815815
let derived_key_template = [
816816
Attribute::Token(true),
817817
Attribute::Private(false),
818+
Attribute::Class(ObjectClass::SECRET_KEY),
818819
Attribute::Sensitive(false),
819820
Attribute::Extractable(true),
820821
];
@@ -876,6 +877,7 @@ fn derive_key_concatenation_key_and_data() -> TestResult {
876877
let derived_key_template = [
877878
Attribute::Token(true),
878879
Attribute::Private(false),
880+
Attribute::Class(ObjectClass::SECRET_KEY),
879881
Attribute::Sensitive(false),
880882
Attribute::Extractable(true),
881883
];
@@ -955,6 +957,7 @@ fn derive_key_xor_key_and_data() -> TestResult {
955957
let derived_key_template = [
956958
Attribute::Token(true),
957959
Attribute::Private(false),
960+
Attribute::Class(ObjectClass::SECRET_KEY),
958961
Attribute::Sensitive(false),
959962
Attribute::Extractable(true),
960963
];
@@ -1013,6 +1016,7 @@ fn derive_key_extract_from_key() -> TestResult {
10131016
let derived_key_template = [
10141017
Attribute::Token(true),
10151018
Attribute::Private(false),
1019+
Attribute::Class(ObjectClass::SECRET_KEY),
10161020
Attribute::ValueLen(2.into()),
10171021
Attribute::Sensitive(false),
10181022
Attribute::Extractable(true),

0 commit comments

Comments
 (0)