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.
This commit is contained in:
Gilles Peskine 2019-05-15 20:15:10 +02:00
parent 806051f17e
commit 73676cbc50
7 changed files with 79 additions and 134 deletions

View file

@ -252,8 +252,8 @@ static psa_status_t import_key_from_file( psa_key_usage_t usage,
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 );