Rework mbedtls_ecp_write_key to remove unnecessary output parameter

Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
diff --git a/tests/suites/test_suite_ecp.function b/tests/suites/test_suite_ecp.function
index 1a464ec..d014e8a 100644
--- a/tests/suites/test_suite_ecp.function
+++ b/tests/suites/test_suite_ecp.function
@@ -1089,42 +1089,29 @@
         if( canonical )
         {
             unsigned char buf[MBEDTLS_ECP_MAX_BYTES];
-            size_t olen;
 
-            ret = mbedtls_ecp_write_key( grp_id, &key, &olen, buf, in_key->len );
+            ret = mbedtls_ecp_write_key( grp_id, &key, buf, in_key->len );
             TEST_ASSERT( ret == 0 );
 
-            TEST_ASSERT( olen == in_key->len );
-
-            mbedtls_fprintf( stdout, "written key: ");
-            for( size_t i = 0; i < in_key->len; i++ ) {
-                mbedtls_fprintf( stdout, "%02x", buf[i]);
-            }
-            mbedtls_fprintf( stdout, "\n");
             ASSERT_COMPARE( in_key->x, in_key->len,
-                            buf, olen );
+                            buf, in_key->len );
         }
         else
         {
             unsigned char export1[MBEDTLS_ECP_MAX_BYTES];
-            size_t olen1;
-
             unsigned char export2[MBEDTLS_ECP_MAX_BYTES];
-            size_t olen2;
 
-            ret = mbedtls_ecp_write_key( grp_id, &key, &olen1, export1, in_key->len );
+            ret = mbedtls_ecp_write_key( grp_id, &key, export1, in_key->len );
             TEST_ASSERT( ret == 0 );
 
             ret = mbedtls_ecp_read_key( grp_id, &key2, export1, in_key->len );
             TEST_ASSERT( ret == expected );
 
-            ret = mbedtls_ecp_write_key( grp_id, &key2, &olen2, export2, in_key->len );
+            ret = mbedtls_ecp_write_key( grp_id, &key2, export2, in_key->len );
             TEST_ASSERT( ret == 0 );
 
-            TEST_ASSERT( olen2 == olen1 );
-
-            ASSERT_COMPARE( export1, olen1,
-                            export2, olen2 );
+            ASSERT_COMPARE( export1, in_key->len,
+                            export2, in_key->len );
         }
     }