We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c494cd commit 84339fbCopy full SHA for 84339fb
cryptoki/tests/basic.rs
@@ -1113,6 +1113,20 @@ fn import_export() -> TestResult {
1113
panic!("Expected the Modulus attribute.");
1114
}
1115
1116
+ let mut attrs =
1117
+ session.get_attributes(is_it_the_public_key, &[AttributeType::AllowedMechanisms])?;
1118
+
1119
+ if is_softhsm() {
1120
+ let attr = attrs.remove(0);
1121
+ if let Attribute::AllowedMechanisms(v) = attr {
1122
+ assert_eq!(v, Vec::<MechanismType>::new());
1123
+ } else {
1124
+ panic!("Expected the AllowedMechanisms attribute.");
1125
+ }
1126
1127
+ assert_eq!(attrs, Vec::<Attribute>::new());
1128
1129
1130
// delete key
1131
session.destroy_object(is_it_the_public_key)?;
1132
0 commit comments