Clearer variable names
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
e2a77f21ea
commit
e45d51f7b5
1 changed files with 9 additions and 9 deletions
|
@ -1850,8 +1850,8 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_USE_PSA_CRYPTO */
|
||||
void pk_get_psa_attributes_opaque(int o_type_arg, int o_bits_arg,
|
||||
int o_usage_arg, int o_alg_arg,
|
||||
void pk_get_psa_attributes_opaque(int from_type_arg, int from_bits_arg,
|
||||
int from_usage_arg, int from_alg_arg,
|
||||
int usage_arg,
|
||||
int expected_ret,
|
||||
int to_pair, int expected_usage_arg)
|
||||
|
@ -1860,18 +1860,18 @@ void pk_get_psa_attributes_opaque(int o_type_arg, int o_bits_arg,
|
|||
mbedtls_pk_init(&pk);
|
||||
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
|
||||
mbedtls_svc_key_id_t key_id = MBEDTLS_SVC_KEY_ID_INIT;
|
||||
psa_key_type_t o_type = o_type_arg;
|
||||
size_t bits = o_bits_arg;
|
||||
psa_key_usage_t o_usage = o_usage_arg;
|
||||
psa_algorithm_t alg = o_alg_arg;
|
||||
psa_key_type_t from_type = from_type_arg;
|
||||
size_t bits = from_bits_arg;
|
||||
psa_key_usage_t from_usage = from_usage_arg;
|
||||
psa_algorithm_t alg = from_alg_arg;
|
||||
psa_key_usage_t usage = usage_arg;
|
||||
psa_key_usage_t expected_usage = expected_usage_arg;
|
||||
|
||||
PSA_INIT();
|
||||
|
||||
psa_set_key_type(&attributes, o_type);
|
||||
psa_set_key_type(&attributes, from_type);
|
||||
psa_set_key_bits(&attributes, bits);
|
||||
psa_set_key_usage_flags(&attributes, o_usage);
|
||||
psa_set_key_usage_flags(&attributes, from_usage);
|
||||
psa_set_key_algorithm(&attributes, alg);
|
||||
psa_set_key_enrollment_algorithm(&attributes, 42);
|
||||
//TODO: test with persistent key
|
||||
|
@ -1879,7 +1879,7 @@ void pk_get_psa_attributes_opaque(int o_type_arg, int o_bits_arg,
|
|||
TEST_EQUAL(mbedtls_pk_setup_opaque(&pk, key_id), 0);
|
||||
|
||||
psa_key_type_t expected_psa_type =
|
||||
to_pair ? o_type : PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(o_type);
|
||||
to_pair ? from_type : PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(from_type);
|
||||
|
||||
TEST_EQUAL(mbedtls_pk_get_psa_attributes(&pk, usage, &attributes),
|
||||
expected_ret);
|
||||
|
|
Loading…
Reference in a new issue