08f34656cb
psa_aead_encrypt_setup() and psa_aead_decrypt_setup() were returning PSA_ERROR_INVALID_ARGUMENT, while the same failed checks were producing PSA_ERROR_NOT_SUPPORTED if they happened in psa_aead_encrypt() or psa_aead_decrypt(). The PSA Crypto API 1.1 spec will specify PSA_ERROR_INVALID_ARGUMENT in the case that the supplied algorithm is not an AEAD one. Also move these shared checks to a helper function, to reduce code duplication and ensure that the functions remain in sync. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
4 lines
216 B
Text
4 lines
216 B
Text
Changes
|
|
* Return PSA_ERROR_INVALID_ARGUMENT if the algorithm passed to singleshot
|
|
AEAD functions is not an AEAD algorithm. This aligns them with the
|
|
multipart functions, and the PSA Crypto API 1.1 spec.
|