tests: Fix test_crypto_asymmetric_encrypt_decrypt

The test `test_crypto_asymmetric_encrypt_decrypt` was incorrectly
setting the key usage flags. The key usage is updated to support both
encryption and decryption.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
pull/14126/head
Devaraj Ranganna 2021-01-14 11:52:36 +00:00
parent e917282d60
commit 9186fe57b2
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ void test_crypto_asymmetric_encrypt_decrypt(void)
unsigned char encrypted[64];
unsigned char decrypted[sizeof(input)];
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_ENCRYPT);
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT);
psa_set_key_algorithm(&attributes, alg);
psa_set_key_type(&attributes, key_type);
psa_set_key_bits(&attributes, key_bits);