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 8e2bbdd. 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 150f6e8..793eed6 100644
--- a/tests/src/ssl_helpers.c
+++ b/tests/src/ssl_helpers.c
@@ -22,6 +22,7 @@
 
 #include <test/ssl_helpers.h>
 
+#if defined(MBEDTLS_SSL_TLS_C)
 #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED)
 static int rng_seed = 0xBEEF;
 static int rng_get(void *p_rng, unsigned char *output, size_t output_len)
@@ -270,12 +271,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
@@ -2446,3 +2441,4 @@
     return 0;
 }
 #endif /* MBEDTLS_TEST_HOOKS */
+#endif /* MBEDTLS_SSL_TLS_C */