Call mbedtls_cipher_free() to reset a cipher context
mbedtls_cipher_reset() only restarts the operation, it doesn't
dissociate the key from the context.
diff --git a/tests/suites/test_suite_cipher.function b/tests/suites/test_suite_cipher.function
index f35bbbf..ca39937 100644
--- a/tests/suites/test_suite_cipher.function
+++ b/tests/suites/test_suite_cipher.function
@@ -1011,7 +1011,7 @@
TEST_ASSERT( memcmp( output, clear->x, clear->len ) == 0 );
/* then encrypt the clear->x and make sure we get the same ciphertext and tag->x */
- TEST_ASSERT( mbedtls_cipher_reset( &ctx ) == 0 );
+ mbedtls_cipher_free( &ctx );
#if defined(MBEDTLS_USE_PSA_CRYPTO)
if( use_psa == 1 )
{