Fix mbedtls_pkcs5_pbes test function failure

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
diff --git a/tests/suites/test_suite_pkcs5.function b/tests/suites/test_suite_pkcs5.function
index 200bdc3..fd4fde1 100644
--- a/tests/suites/test_suite_pkcs5.function
+++ b/tests/suites/test_suite_pkcs5.function
@@ -39,14 +39,12 @@
     size_t my_out_len = 0;
 #endif
     MD_PSA_INIT();
-    /* Those parameters are only used when MBEDTLS_CIPHER_PADDING_PKCS7 is enabled */
-    (void) outsize;
 
     params.tag = params_tag;
     params.p = params_hex->x;
     params.len = params_hex->len;
 
-    ASSERT_ALLOC(my_out, ref_out->len);
+    ASSERT_ALLOC(my_out, outsize);
 
     if (ref_ret != MBEDTLS_ERR_ASN1_BUF_TOO_SMALL) {
         my_ret = mbedtls_pkcs5_pbes2(&params, MBEDTLS_PKCS5_ENCRYPT,
@@ -88,14 +86,12 @@
 #endif
 
     MD_PSA_INIT();
-    /* Those parameters are only used when MBEDTLS_CIPHER_PADDING_PKCS7 is enabled */
-    (void) outsize;
 
     params.tag = params_tag;
     params.p = params_hex->x;
     params.len = params_hex->len;
 
-    ASSERT_ALLOC(my_out, ref_out->len);
+    ASSERT_ALLOC(my_out, outsize);
 
     if (ref_ret != MBEDTLS_ERR_ASN1_BUF_TOO_SMALL) {
         my_ret = mbedtls_pkcs5_pbes2(&params, MBEDTLS_PKCS5_DECRYPT,