Add 'too big' tests for nonce generation
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index b5fe5e7..ac58b6e 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -3758,8 +3758,6 @@
PSA_ASSERT( status );
- TEST_ASSERT( nonce_len < PSA_AEAD_NONCE_MAX_SIZE );
-
status = psa_aead_generate_nonce( &operation, nonce_buffer,
nonce_len,
&nonce_generated_len );
@@ -3768,6 +3766,8 @@
TEST_EQUAL( nonce_generated_len, expected_generated_len );
+ TEST_ASSERT( nonce_generated_len < PSA_AEAD_NONCE_MAX_SIZE );
+
if( expected_status_arg == PSA_SUCCESS )
{