Skip to content

Commit 9186fe5

Browse files
committed
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 <[email protected]>
1 parent e917282 commit 9186fe5

File tree

1 file changed

+1
-1
lines changed
  • connectivity/mbedtls/tests/TESTS/mbedtls/sanity

1 file changed

+1
-1
lines changed

connectivity/mbedtls/tests/TESTS/mbedtls/sanity/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void test_crypto_asymmetric_encrypt_decrypt(void)
9494
unsigned char encrypted[64];
9595
unsigned char decrypted[sizeof(input)];
9696

97-
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_ENCRYPT);
97+
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT);
9898
psa_set_key_algorithm(&attributes, alg);
9999
psa_set_key_type(&attributes, key_type);
100100
psa_set_key_bits(&attributes, key_bits);

0 commit comments

Comments
 (0)