mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-22 09:40:09 +00:00
Add fix to update output size macro as well.
Same issue with zero block length applies here. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
c22950c9d0
commit
6603e2b81c
@ -1074,12 +1074,13 @@
|
|||||||
*/
|
*/
|
||||||
#define PSA_CIPHER_UPDATE_OUTPUT_SIZE(key_type, alg, input_length) \
|
#define PSA_CIPHER_UPDATE_OUTPUT_SIZE(key_type, alg, input_length) \
|
||||||
(PSA_ALG_IS_CIPHER(alg) ? \
|
(PSA_ALG_IS_CIPHER(alg) ? \
|
||||||
|
(PSA_BLOCK_CIPHER_BLOCK_LENGTH(key_type) != 0 ? \
|
||||||
(((alg) == PSA_ALG_CBC_PKCS7 || \
|
(((alg) == PSA_ALG_CBC_PKCS7 || \
|
||||||
(alg) == PSA_ALG_CBC_NO_PADDING || \
|
(alg) == PSA_ALG_CBC_NO_PADDING || \
|
||||||
(alg) == PSA_ALG_ECB_NO_PADDING) ? \
|
(alg) == PSA_ALG_ECB_NO_PADDING) ? \
|
||||||
PSA_ROUND_UP_TO_MULTIPLE(PSA_BLOCK_CIPHER_BLOCK_LENGTH(key_type), \
|
PSA_ROUND_UP_TO_MULTIPLE(PSA_BLOCK_CIPHER_BLOCK_LENGTH(key_type), \
|
||||||
input_length) : \
|
input_length) : \
|
||||||
(input_length)) : \
|
(input_length)) : 0) : \
|
||||||
0)
|
0)
|
||||||
|
|
||||||
/** A sufficient output buffer size for psa_cipher_update(), for any of the
|
/** A sufficient output buffer size for psa_cipher_update(), for any of the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user