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 Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
data_files Merge pull request #3433 from raoulstrackx/raoul/verify_crl_without_time 2020-08-26 12:56:11 +02:00
docker/bionic Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
git-scripts Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
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 Add comments explaining include paths 2020-07-02 15:59:45 +02:00
compat-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
compat.sh compat.sh: stop using allow_sha1 2020-08-21 12:34:05 +02:00
context-info.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
Descriptions.txt Revert "Remove tests that depend on TLS or X.509" 2020-03-19 14:17:54 +01:00
make-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
Makefile Add initial test driver conforming to the new spec 2020-09-04 14:22:26 +02:00
ssl-opt-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
ssl-opt.sh Merge pull request #2182 from hanno-arm/key_pwd 2020-08-24 09:42:38 +02:00