mbedtls/tests
Fredrik Strupe f90e3019dd Use PSA_ERROR_INVALID_ARGUMENT for invalid cipher input sizes
... as opposed to PSA_ERROR_BAD_STATE.

The spec on psa_cipher_finish() states that PSA_ERROR_INVALID_ARGUMENT
should be returned when:

"The total input size passed to this operation is not valid for this
particular algorithm. For example, the algorithm is a based on block
cipher and requires a whole number of blocks, but the total input size
is not a multiple of the block size."

Currently, there is a distinction between encryption and decryption
on whether INVALID_ARGUMENT or BAD_STATE is returned, but this is not
a part of the spec.

This fix ensures that PSA_ERROR_INVALID_ARGUMENT is returned
consistently on invalid cipher input sizes.

Signed-off-by: Fredrik Strupe <fredrik.strupe@silabs.com>
2020-09-30 12:26:58 +02:00
..
.jenkins
configs
data_files
docker/bionic
git-scripts
include/test Style and language fixes from review 2020-09-14 16:31:58 +02:00
scripts fix(programs/psa): commit python3 generated file 2020-09-24 20:57:46 -07:00
src Apply review feedback 2020-09-14 17:00:47 +02:00
suites Use PSA_ERROR_INVALID_ARGUMENT for invalid cipher input sizes 2020-09-30 12:26:58 +02:00
.gitignore Apply feedback from PR review 2020-09-07 14:01:52 +02:00
CMakeLists.txt
compat-in-docker.sh
compat.sh
context-info.sh
Descriptions.txt
make-in-docker.sh
Makefile Add initial test driver conforming to the new spec 2020-09-04 14:22:26 +02:00
ssl-opt-in-docker.sh
ssl-opt.sh