fix various issues
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/ssl_tls13_generic.c b/library/ssl_tls13_generic.c
index 026c94c..598b2bc 100644
--- a/library/ssl_tls13_generic.c
+++ b/library/ssl_tls13_generic.c
@@ -271,7 +271,7 @@
MBEDTLS_SSL_CHK_BUF_READ_PTR( p, end, 4 );
certificate_request_context_len = p[0];
- certificate_list_len = ( p[1] << 16 ) | ( p[2] << 8 ) | p[3];
+ certificate_list_len = MBEDTLS_GET_UINT24_BE( p, 0 );
p += 4;
/* In theory, the certificate list can be up to 2^24 Bytes, but we don't