Initialize uninitialized variable in ECHDE-PSK part of ssl_parse_client_key_exchange()

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Neil Armstrong 2022-03-23 18:16:24 +01:00
parent fc834f2e2c
commit 549a3e4737

View file

@ -4077,7 +4077,7 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
/* The ECDH secret is the premaster secret used for key derivation. */ /* The ECDH secret is the premaster secret used for key derivation. */
unsigned char *psm = ssl->handshake->premaster; unsigned char *psm = ssl->handshake->premaster;
unsigned char *psm_end = psm + sizeof( ssl->handshake->premaster ); unsigned char *psm_end = psm + sizeof( ssl->handshake->premaster );
size_t zlen; size_t zlen = 0;
/* Compute ECDH shared secret. */ /* Compute ECDH shared secret. */
status = psa_raw_key_agreement( PSA_ALG_ECDH, status = psa_raw_key_agreement( PSA_ALG_ECDH,