Put handle parameter last: psa_import_key
In psa_import_key, change the order of parameters to pass
the pointer where the newly created handle will be stored last.
This is consistent with most other library functions that put inputs
before outputs.
diff --git a/programs/psa/key_ladder_demo.c b/programs/psa/key_ladder_demo.c
index 82e79a9..aded3bc 100644
--- a/programs/psa/key_ladder_demo.c
+++ b/programs/psa/key_ladder_demo.c
@@ -252,8 +252,8 @@
psa_set_key_usage_flags( &attributes, usage );
psa_set_key_algorithm( &attributes, alg );
psa_set_key_type( &attributes, PSA_KEY_TYPE_DERIVE );
- PSA_CHECK( psa_import_key( &attributes, master_key_handle,
- key_data, key_size ) );
+ PSA_CHECK( psa_import_key( &attributes, key_data, key_size,
+ master_key_handle ) );
exit:
if( key_file != NULL )
fclose( key_file );