File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1084,6 +1084,7 @@ fn import_export() -> TestResult {
10841084 Attribute :: Class ( ObjectClass :: PUBLIC_KEY ) ,
10851085 Attribute :: KeyType ( KeyType :: RSA ) ,
10861086 Attribute :: Verify ( true ) ,
1087+ Attribute :: AllowedMechanisms ( Vec :: <MechanismType >:: new( ) ) ,
10871088 ] ;
10881089
10891090 {
@@ -1113,6 +1114,16 @@ fn import_export() -> TestResult {
11131114 panic ! ( "Expected the Modulus attribute." ) ;
11141115 }
11151116
1117+ let attr = session
1118+ . get_attributes ( is_it_the_public_key, & [ AttributeType :: AllowedMechanisms ] ) ?
1119+ . remove ( 0 ) ;
1120+
1121+ if let Attribute :: AllowedMechanisms ( v) = attr {
1122+ assert_eq ! ( v, Vec :: <MechanismType >:: new( ) ) ;
1123+ } else {
1124+ panic ! ( "Expected the AllowedMechanisms attribute." ) ;
1125+ }
1126+
11161127 // delete key
11171128 session. destroy_object ( is_it_the_public_key) ?;
11181129
You can’t perform that action at this time.
0 commit comments