Fix MBEDTLS_SSL_CONF_ENDPOINT flagging
Compilation failed if MBEDTLS_SSL_CONF_ENDPOINT was set - add necessary
conditions.
Signed-off-by: Kevin Bracey <kevin.bracey@arm.com>
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 24dbb7d..9be79cf 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -10322,7 +10322,7 @@
size_t read_mfl;
/* Use the configured MFL for the client if we're past SERVER_HELLO_DONE */
- if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT &&
+ if( mbedtls_ssl_conf_get_endpoint( ssl->conf ) == MBEDTLS_SSL_IS_CLIENT &&
ssl->state >= MBEDTLS_SSL_SERVER_HELLO_DONE )
{
return ssl_mfl_code_to_length( ssl->conf->mfl_code );
@@ -12846,7 +12846,9 @@
/* Use the functions here so that they are covered in tests,
* but otherwise access member directly for efficiency */
+#if !defined(MBEDTLS_SSL_CONF_ENDPOINT)
mbedtls_ssl_conf_endpoint( conf, endpoint );
+#endif
mbedtls_ssl_conf_transport( conf, transport );
/*