From 840fbb2817ec87bc3b4d0c119ef23ea54c58450f Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Thu, 17 Feb 2022 14:59:29 +0800 Subject: [PATCH] guards populate_transform reference Signed-off-by: Jerry Yu --- library/ssl_tls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 2de330a1a..633777251 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -3502,7 +3502,7 @@ static int ssl_context_load( mbedtls_ssl_context *ssl, /* Read random bytes and populate structure */ if( (size_t)( end - p ) < sizeof( ssl->transform->randbytes ) ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - +#if defined(MBEDTLS_SSL_PROTO_TLS1_2) ret = ssl_tls12_populate_transform( ssl->transform, ssl->session->ciphersuite, ssl->session->master, @@ -3518,7 +3518,7 @@ static int ssl_context_load( mbedtls_ssl_context *ssl, ssl ); if( ret != 0 ) return( ret ); - +#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ p += sizeof( ssl->transform->randbytes ); #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)