File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 33//! Pkcs11 context and initialization types
44
55/// Directly get the PKCS #11 operation from the context structure and check for null pointers.
6+ /// Note that this macro depends on the get_pkcs11_func! macro.
67macro_rules! get_pkcs11 {
78 ( $pkcs11: expr, $func_name: ident) => {
8- ( $pkcs11
9- . impl_
10- . function_list
11- . $func_name
12- . ok_or( crate :: error:: Error :: NullFunctionPointer ) ?)
9+ ( get_pkcs11_func!( $pkcs11, $func_name) . ok_or( crate :: error:: Error :: NullFunctionPointer ) ?)
1310 } ;
1411}
1512
Original file line number Diff line number Diff line change @@ -378,7 +378,7 @@ fn session_objecthandle_iterator() -> testresult::TestResult {
378378
379379 // we generate 11 keys with the same CKA_ID
380380
381- ( 1 ..=11 ) . for_each ( |i| {
381+ for i in 1 ..=11 {
382382 let key_template = vec ! [
383383 Attribute :: Token ( true ) ,
384384 Attribute :: Encrypt ( true ) ,
@@ -387,8 +387,8 @@ fn session_objecthandle_iterator() -> testresult::TestResult {
387387 ] ;
388388
389389 // generate a secret key
390- let _key = session. generate_key ( & Mechanism :: Des3KeyGen , & key_template) ;
391- } ) ;
390+ session. generate_key ( & Mechanism :: Des3KeyGen , & key_template) ? ;
391+ }
392392
393393 // retrieve these keys using this template
394394 let key_search_template = vec ! [
You can’t perform that action at this time.
0 commit comments