mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-03 13:11:08 +00:00
Mark AEAD compatibility macros as deprecated
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
670df7a41d
commit
30f91a4bca
|
@ -286,7 +286,8 @@ MBEDTLS_PSA_DEPRECATED static inline psa_status_t psa_asymmetric_verify( psa_key
|
|||
* If the AEAD algorithm is not recognized, return 0.
|
||||
*/
|
||||
#define PSA_AEAD_TAG_LENGTH_1_ARG(alg) \
|
||||
(PSA_ALG_IS_AEAD(alg) ? \
|
||||
MBEDTLS_DEPRECATED_CONSTANT(size_t, \
|
||||
PSA_ALG_IS_AEAD(alg) ? \
|
||||
(((alg) & PSA_ALG_AEAD_TAG_LENGTH_MASK) >> PSA_AEAD_TAG_LENGTH_OFFSET) : \
|
||||
0)
|
||||
|
||||
|
@ -311,7 +312,8 @@ MBEDTLS_PSA_DEPRECATED static inline psa_status_t psa_asymmetric_verify( psa_key
|
|||
* If the AEAD algorithm is not recognized, return 0.
|
||||
*/
|
||||
#define PSA_AEAD_ENCRYPT_OUTPUT_SIZE_2_ARG(alg, plaintext_length) \
|
||||
(PSA_AEAD_TAG_LENGTH_1_ARG(alg) != 0 ? \
|
||||
MBEDTLS_DEPRECATED_CONSTANT(size_t, \
|
||||
PSA_AEAD_TAG_LENGTH_1_ARG(alg) != 0 ? \
|
||||
(plaintext_length) + PSA_AEAD_TAG_LENGTH_1_ARG(alg) : \
|
||||
0)
|
||||
|
||||
|
@ -336,7 +338,8 @@ MBEDTLS_PSA_DEPRECATED static inline psa_status_t psa_asymmetric_verify( psa_key
|
|||
* If the AEAD algorithm is not recognized, return 0.
|
||||
*/
|
||||
#define PSA_AEAD_DECRYPT_OUTPUT_SIZE_2_ARG(alg, ciphertext_length) \
|
||||
(PSA_AEAD_TAG_LENGTH_1_ARG(alg) != 0 ? \
|
||||
MBEDTLS_DEPRECATED_CONSTANT(size_t, \
|
||||
PSA_AEAD_TAG_LENGTH_1_ARG(alg) != 0 ? \
|
||||
(ciphertext_length) - PSA_AEAD_TAG_LENGTH_1_ARG(alg) : \
|
||||
0)
|
||||
|
||||
|
@ -365,7 +368,8 @@ MBEDTLS_PSA_DEPRECATED static inline psa_status_t psa_asymmetric_verify( psa_key
|
|||
* capable of this. So for modes based on a block cipher, allow the
|
||||
* implementation to delay the output until it has a full block. */
|
||||
#define PSA_AEAD_UPDATE_OUTPUT_SIZE_2_ARG(alg, input_length) \
|
||||
(PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER(alg) ? \
|
||||
MBEDTLS_DEPRECATED_CONSTANT(size_t, \
|
||||
PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER(alg) ? \
|
||||
PSA_ROUND_UP_TO_MULTIPLE(PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE, (input_length)) : \
|
||||
(input_length))
|
||||
|
||||
|
@ -385,7 +389,8 @@ MBEDTLS_PSA_DEPRECATED static inline psa_status_t psa_asymmetric_verify( psa_key
|
|||
* If the AEAD algorithm is not recognized, return 0.
|
||||
*/
|
||||
#define PSA_AEAD_FINISH_OUTPUT_SIZE_1_ARG(alg) \
|
||||
(PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER(alg) ? \
|
||||
MBEDTLS_DEPRECATED_CONSTANT(size_t, \
|
||||
PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER(alg) ? \
|
||||
PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE : \
|
||||
0)
|
||||
|
||||
|
@ -405,7 +410,8 @@ MBEDTLS_PSA_DEPRECATED static inline psa_status_t psa_asymmetric_verify( psa_key
|
|||
* If the AEAD algorithm is not recognized, return 0.
|
||||
*/
|
||||
#define PSA_AEAD_VERIFY_OUTPUT_SIZE_1_ARG(alg) \
|
||||
(PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER(alg) ? \
|
||||
MBEDTLS_DEPRECATED_CONSTANT(size_t, \
|
||||
PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER(alg) ? \
|
||||
PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE : \
|
||||
0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue