Init psa status to PSA_ERROR_CORRUPTION_DETECTED

Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemyslaw Stekiel 2022-02-03 08:55:33 +01:00
parent f4facef9ba
commit d66387f8fa
3 changed files with 7 additions and 7 deletions

View file

@ -774,7 +774,7 @@ int mbedtls_ssl_encrypt_buf( mbedtls_ssl_context *ssl,
int dynamic_iv_is_explicit =
ssl_transform_aead_dynamic_iv_is_explicit( transform );
#if defined(MBEDTLS_USE_PSA_CRYPTO)
psa_status_t status;
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
#else
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
#endif /* MBEDTLS_USE_PSA_CRYPTO */
@ -892,7 +892,7 @@ int mbedtls_ssl_encrypt_buf( mbedtls_ssl_context *ssl,
size_t padlen, i;
size_t olen;
#if defined(MBEDTLS_USE_PSA_CRYPTO)
psa_status_t status;
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
size_t part_len;
psa_cipher_operation_t cipher_op = PSA_CIPHER_OPERATION_INIT;
#endif /* MBEDTLS_USE_PSA_CRYPTO */
@ -1178,7 +1178,7 @@ int mbedtls_ssl_decrypt_buf( mbedtls_ssl_context const *ssl,
unsigned char *dynamic_iv;
size_t dynamic_iv_len;
#if defined(MBEDTLS_USE_PSA_CRYPTO)
psa_status_t status;
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
#endif /* MBEDTLS_USE_PSA_CRYPTO */
/*
@ -1302,7 +1302,7 @@ int mbedtls_ssl_decrypt_buf( mbedtls_ssl_context const *ssl,
{
size_t minlen = 0;
#if defined(MBEDTLS_USE_PSA_CRYPTO)
psa_status_t status;
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
size_t part_len;
psa_cipher_operation_t cipher_op = PSA_CIPHER_OPERATION_INIT;
#endif /* MBEDTLS_USE_PSA_CRYPTO */

View file

@ -722,7 +722,7 @@ static int ssl_tls12_populate_transform( mbedtls_ssl_transform *transform,
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_algorithm_t alg;
size_t key_bits;
psa_status_t status;
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
#endif
#if !defined(MBEDTLS_DEBUG_C) && \

View file

@ -1192,7 +1192,7 @@ static int psa_cipher_encrypt_helper( mbedtls_ssl_transform *transform,
const unsigned char *input, size_t ilen,
unsigned char *output, size_t *olen )
{
psa_status_t status;
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
psa_cipher_operation_t cipher_op = PSA_CIPHER_OPERATION_INIT;
size_t part_len;
@ -1239,7 +1239,7 @@ static int build_transforms( mbedtls_ssl_transform *t_in,
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_algorithm_t alg;
size_t key_bits;
psa_status_t status;
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
#endif
size_t keylen, maclen, ivlen;