Resolve build errors for ssl_helpers.c and test_suite_ssl.c

Since we move many functions from test_suite_ssl.function to
ssl_helpers.c in commit bd56b03. This causes various of
build errors. This commit fixes all the build errors by
 - including header files
 - providing function definition
 - adding guards for typedef statements and functions

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
diff --git a/tests/src/ssl_helpers.c b/tests/src/ssl_helpers.c
index a556644..242751f 100644
--- a/tests/src/ssl_helpers.c
+++ b/tests/src/ssl_helpers.c
@@ -22,6 +22,8 @@
 
 #include <test/ssl_helpers.h>
 
+#if defined(MBEDTLS_SSL_TLS_C)
+
 /*
  * This function can be passed to mbedtls to receive output logs from it. In
  * this case, it will count the instances of a mbedtls_test_ssl_log_pattern
@@ -210,12 +212,6 @@
 }
 
 /*
- * Errors used in the message transport mock tests
- */
- #define MBEDTLS_TEST_ERROR_ARG_NULL -11
- #define MBEDTLS_TEST_ERROR_MESSAGE_TRUNCATED -44
-
-/*
  * Setup and free functions for the message metadata queue.
  *
  * \p capacity describes the number of message metadata chunks that can be held
@@ -1964,3 +1960,4 @@
 #endif \
     /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED && MBEDTLS_CERTS_C && MBEDTLS_ENTROPY_C && MBEDTLS_CTR_DRBG_C */
 
+#endif /* MBEDTLS_SSL_TLS_C */