Adds comments for clarification
Adds two comments to clarify 1) why an offset is used
in the call to psa_aead_verify() and 2) why the test of
.hits_finish is always 0 in this test case.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
diff --git a/tests/suites/test_suite_psa_crypto_driver_wrappers.function b/tests/suites/test_suite_psa_crypto_driver_wrappers.function
index e4a1942..a5ea840 100644
--- a/tests/suites/test_suite_psa_crypto_driver_wrappers.function
+++ b/tests/suites/test_suite_psa_crypto_driver_wrappers.function
@@ -2521,6 +2521,8 @@
TEST_EQUAL( mbedtls_test_driver_aead_hooks.hits_update,
forced_status == PSA_SUCCESS ? 1 : 0 );
+ /* Offset applied to output_data in order to handle cases where verify()
+ * outputs further data */
PSA_ASSERT( psa_aead_verify( &operation, output_data + output_length,
output_size - output_length,
&verify_output_length, input_tag->x,
@@ -2529,6 +2531,8 @@
TEST_EQUAL( mbedtls_test_driver_aead_hooks.hits_verify,
forced_status == PSA_SUCCESS ? 1 : 0 );
+ /* Since this is a decryption operation,
+ * finish should never be hit */
TEST_EQUAL( mbedtls_test_driver_aead_hooks.hits_finish, 0 );
TEST_EQUAL( mbedtls_test_driver_aead_hooks.hits_abort,