Fix unused variable warning

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-06-22 09:45:56 +02:00
parent f00f152444
commit 16fe8fcef3

View File

@ -2922,10 +2922,12 @@ static int ssl_prepare_server_key_exchange( mbedtls_ssl_context *ssl,
(void) signature_len;
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_SERVER_SIGNATURE_ENABLED */
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_SERVER_SIGNATURE_ENABLED)
#if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH)
size_t out_buf_len = ssl->out_buf_len - ( ssl->out_msg - ssl->out_buf );
#else
size_t out_buf_len = MBEDTLS_SSL_OUT_BUFFER_LEN - ( ssl->out_msg - ssl->out_buf );
#endif
#endif
ssl->out_msglen = 4; /* header (type:1, length:3) to be written later */