Skip to content

Commit 461bd3d

Browse files
committed
Merge remote-tracking branch 'origin/pr/2454' into development
2 parents 9f47f82 + 3497323 commit 461bd3d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

library/cipher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ int mbedtls_cipher_crypt( mbedtls_cipher_context_t *ctx,
12381238
(mbedtls_cipher_context_psa *) ctx->cipher_ctx;
12391239

12401240
psa_status_t status;
1241-
psa_cipher_operation_t cipher_op;
1241+
psa_cipher_operation_t cipher_op = PSA_CIPHER_OPERATION_INIT;
12421242
size_t part_len;
12431243

12441244
if( ctx->operation == MBEDTLS_DECRYPT )

library/ssl_tls.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6572,7 +6572,7 @@ static void ssl_calc_finished_tls_sha256(
65726572
unsigned char padbuf[32];
65736573
#if defined(MBEDTLS_USE_PSA_CRYPTO)
65746574
size_t hash_size;
6575-
psa_hash_operation_t sha256_psa;
6575+
psa_hash_operation_t sha256_psa = PSA_HASH_OPERATION_INIT;
65766576
psa_status_t status;
65776577
#else
65786578
mbedtls_sha256_context sha256;
@@ -6648,7 +6648,7 @@ static void ssl_calc_finished_tls_sha384(
66486648
unsigned char padbuf[48];
66496649
#if defined(MBEDTLS_USE_PSA_CRYPTO)
66506650
size_t hash_size;
6651-
psa_hash_operation_t sha384_psa;
6651+
psa_hash_operation_t sha384_psa = PSA_HASH_OPERATION_INIT;
66526652
psa_status_t status;
66536653
#else
66546654
mbedtls_sha512_context sha512;
@@ -10246,7 +10246,7 @@ int mbedtls_ssl_get_key_exchange_md_tls1_2( mbedtls_ssl_context *ssl,
1024610246
mbedtls_md_type_t md_alg )
1024710247
{
1024810248
psa_status_t status;
10249-
psa_hash_operation_t hash_operation;
10249+
psa_hash_operation_t hash_operation = PSA_HASH_OPERATION_INIT;
1025010250
psa_algorithm_t hash_alg = mbedtls_psa_translate_md( md_alg );
1025110251

1025210252
MBEDTLS_SSL_DEBUG_MSG( 1, ( "Perform PSA-based computation of digest of ServerKeyExchange" ) );

library/x509_crt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ static int x509_crt_check_signature( const mbedtls_x509_crt *child,
19291929
if( mbedtls_md( md_info, child->tbs.p, child->tbs.len, hash ) != 0 )
19301930
return( -1 );
19311931
#else
1932-
psa_hash_operation_t hash_operation;
1932+
psa_hash_operation_t hash_operation = PSA_HASH_OPERATION_INIT;
19331933
psa_algorithm_t hash_alg = mbedtls_psa_translate_md( child->sig_md );
19341934

19351935
if( psa_hash_setup( &hash_operation, hash_alg ) != PSA_SUCCESS )

library/x509write_csr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ int mbedtls_x509write_csr_der( mbedtls_x509write_csr *ctx, unsigned char *buf, s
142142
size_t len = 0;
143143
mbedtls_pk_type_t pk_alg;
144144
#if defined(MBEDTLS_USE_PSA_CRYPTO)
145-
psa_hash_operation_t hash_operation;
145+
psa_hash_operation_t hash_operation = PSA_HASH_OPERATION_INIT;
146146
size_t hash_len;
147147
psa_algorithm_t hash_alg = mbedtls_psa_translate_md( ctx->md_alg );
148148
#endif /* MBEDTLS_USE_PSA_CRYPTO */

0 commit comments

Comments
 (0)