Change to more appropriate pointer declaration 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:17:24 +01:00
parent fb0a81ece9
commit d6e2759afb

View file

@ -4081,7 +4081,8 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
* - the PSK itself
*/
unsigned char *psm = ssl->handshake->premaster;
unsigned char *psm_end = psm + sizeof( ssl->handshake->premaster );
const unsigned char* const psm_end =
psm + sizeof( ssl->handshake->premaster );
size_t zlen = 0;
/* Compute ECDH shared secret. */