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
..
2015-06-25 10:59:56 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-21 12:57:08 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-09-16 11:40:06 +01:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-20 11:07:12 +01:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-09-16 11:40:06 +01:00
2020-08-21 21:08:56 +02:00
2020-08-21 21:08:56 +02:00
2020-08-21 21:08:56 +02:00
2020-08-21 09:19:12 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-09-10 21:59:49 +02:00
2020-09-10 21:59:49 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-09-22 11:57:16 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-09-04 14:22:27 +02:00
2020-09-14 16:32:50 +02:00
2020-09-14 16:31:58 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-09-02 14:27:07 +02:00
2020-08-19 10:35:41 +02:00
2020-09-02 14:27:07 +02:00
2020-09-02 14:27:07 +02:00
2020-09-02 14:27:07 +02:00
2020-09-02 14:27:07 +02:00
2020-09-30 12:26:58 +02:00
2020-08-25 22:49:19 +02:00
2020-08-21 21:08:56 +02:00
2020-08-19 10:35:41 +02:00
2020-08-20 11:07:12 +01:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-21 21:08:56 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-24 09:42:38 +02:00
2020-08-19 10:35:41 +02:00
2020-08-25 14:35:55 +01:00
2020-08-26 14:15:34 +01:00
2020-08-24 09:42:38 +02:00
2020-08-19 10:35:41 +02:00
2020-09-16 09:50:17 +01:00
2020-09-16 09:50:17 +01:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-09-15 16:06:06 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-20 11:07:12 +01:00
2020-08-26 12:56:11 +02:00
2020-08-19 10:35:41 +02:00
2020-09-01 11:04:53 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00
2020-08-19 10:35:41 +02:00