Skip to content

Commit

Permalink
Change to psa_generate_key tests (test_c016)
Browse files Browse the repository at this point in the history
Test psa_generate_key with RSA 2048 Public key

Changed the error code from PSA_ERROR_NOT_SUPPORTED to
PSA_ERROR_INVALID_ARGUMENT as in the documentation of
psa_generate_key() returned values:
"PSA_ERROR_INVALID_ARGUMENT The key type is an asymmetric public key type."

See:
Mbed-TLS/mbedtls#4551
Mbed-TLS/mbedtls#5037
Mbed-TLS/mbedtls#5038

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
  • Loading branch information
bensze01 committed Nov 8, 2021
1 parent e00c82b commit 6d70305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api-tests/dev_apis/crypto/test_c016/test_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static const test_data check1[] = {
.expected_range = {1, BITS_TO_BYTES(MIN(PSA_EXPORT_KEY_OUTPUT_SIZE(\
PSA_KEY_TYPE_RSA_PUBLIC_KEY, 2048), \
PSA_EXPORT_PUBLIC_KEY_MAX_SIZE))},
.expected_status = PSA_ERROR_NOT_SUPPORTED
.expected_status = PSA_ERROR_INVALID_ARGUMENT
},
#endif
#endif
Expand Down

0 comments on commit 6d70305

Please sign in to comment.