Fix test functions and data after moving hexify/unhexify out
- Separate string and hex parameter as unhexify is moved out of the function. It's input should only be hex.
- Fix test mbedtls_ccm_encrypt_and_tag that grows input message buffer with tag
- Add missing expected length parameter in ECP TLS tests
- Add deleted TEST_ASSERT and mbedtls calls that got removed in script based code generation
diff --git a/tests/suites/test_suite_gcm.function b/tests/suites/test_suite_gcm.function
index 782a896..17d79c5 100644
--- a/tests/suites/test_suite_gcm.function
+++ b/tests/suites/test_suite_gcm.function
@@ -92,8 +92,8 @@
uint32_t iv_len, uint8_t * add_str,
uint32_t add_len, int tag_len_bits,
uint8_t * tag_str, uint32_t tag_str_len,
- uint8_t * pt_result, uint32_t pt_result_len,
- int init_result )
+ char * result, uint8_t * pt_result,
+ uint32_t pt_result_len, int init_result )
{
unsigned char output[128];
mbedtls_gcm_context ctx;
@@ -110,7 +110,7 @@
{
ret = mbedtls_gcm_auth_decrypt( &ctx, pt_len, iv_str, iv_len, add_str, add_len, tag_str, tag_len, src_str, output );
- if( strcmp( "FAIL", pt_result ) == 0 )
+ if( strcmp( "FAIL", result ) == 0 )
{
TEST_ASSERT( ret == MBEDTLS_ERR_GCM_AUTH_FAILED );
}