Chane error code in psa_export_public_key_iop_setup() in case key size is 0

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
This commit is contained in:
Waleed Elmelegy 2024-11-28 19:39:58 +00:00
parent 568d057b0a
commit 29f65a874f

View File

@ -1730,7 +1730,7 @@ psa_status_t psa_export_public_key_iop_setup(psa_export_public_key_iop_t *operat
key_size = PSA_EXPORT_KEY_OUTPUT_SIZE(private_key_type,
psa_get_key_bits(&private_key_attributes));
if (key_size == 0) {
status = PSA_ERROR_INVALID_ARGUMENT;
status = PSA_ERROR_NOT_SUPPORTED;
goto exit;
}