diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c024/test_c024.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c024/test_c024.c index a375efee63..5736b37c1b 100644 --- a/components/TARGET_PSA/TESTS/compliance_crypto/test_c024/test_c024.c +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c024/test_c024.c @@ -90,12 +90,18 @@ int32_t psa_aead_encrypt_test(security_t caller) TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(5)); if (is_buffer_empty(check1[i].nonce, check1[i].nonce_length) == TRUE) + { nonce = NULL; + check1[i].nonce_length = 0; + } else nonce = check1[i].nonce; if (is_buffer_empty(check1[i].additional_data, check1[i].additional_data_length) == TRUE) + { additional_data = NULL; + check1[i].additional_data_length = 0; + } else additional_data = check1[i].additional_data; @@ -152,12 +158,18 @@ int32_t psa_aead_encrypt_negative_test(security_t caller) check2[i].key_alg); if (is_buffer_empty(check2[i].nonce, check2[i].nonce_length) == TRUE) + { nonce = NULL; + check2[i].nonce_length = 0; + } else nonce = check2[i].nonce; if (is_buffer_empty(check2[i].additional_data, check2[i].additional_data_length) == TRUE) + { additional_data = NULL; + check2[i].additional_data_length = 0; + } else additional_data = check2[i].additional_data; diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c025/test_c025.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c025/test_c025.c index f1bcc5c239..d8d15ec701 100644 --- a/components/TARGET_PSA/TESTS/compliance_crypto/test_c025/test_c025.c +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c025/test_c025.c @@ -89,12 +89,18 @@ int32_t psa_aead_decrypt_test(security_t caller) TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(5)); if (is_buffer_empty(check1[i].nonce, check1[i].nonce_length) == TRUE) + { nonce = NULL; + check1[i].nonce_length = 0; + } else nonce = check1[i].nonce; if (is_buffer_empty(check1[i].additional_data, check1[i].additional_data_length) == TRUE) + { additional_data = NULL; + check1[i].additional_data_length = 0; + } else additional_data = check1[i].additional_data; @@ -149,12 +155,18 @@ int32_t psa_aead_decrypt_negative_test(security_t caller) check2[i].key_alg); if (is_buffer_empty(check2[i].nonce, check2[i].nonce_length) == TRUE) + { nonce = NULL; + check2[i].nonce_length = 0; + } else nonce = check2[i].nonce; if (is_buffer_empty(check2[i].additional_data, check2[i].additional_data_length) == TRUE) + { additional_data = NULL; + check2[i].additional_data_length = 0; + } else additional_data = check2[i].additional_data; diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c039/test_c039.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c039/test_c039.c index 0053fdd173..dfdc09e324 100644 --- a/components/TARGET_PSA/TESTS/compliance_crypto/test_c039/test_c039.c +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c039/test_c039.c @@ -128,7 +128,10 @@ int32_t psa_asymmetric_encrypt_test(security_t caller) TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(5)); if (is_buffer_empty(check1[i].salt, check1[i].salt_length) == TRUE) + { salt = NULL; + check1[i].salt_length = 0; + } else salt = check1[i].salt; @@ -223,7 +226,10 @@ int32_t psa_asymmetric_encrypt_negative_test(security_t caller) TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(6)); if (is_buffer_empty(check1[i].salt, check1[i].salt_length) == TRUE) + { salt = NULL; + check1[i].salt_length = 0; + } else salt = check1[i].salt; diff --git a/components/TARGET_PSA/TESTS/compliance_crypto/test_c040/test_c040.c b/components/TARGET_PSA/TESTS/compliance_crypto/test_c040/test_c040.c index 69dc7ef0e9..07c8090a08 100644 --- a/components/TARGET_PSA/TESTS/compliance_crypto/test_c040/test_c040.c +++ b/components/TARGET_PSA/TESTS/compliance_crypto/test_c040/test_c040.c @@ -128,7 +128,10 @@ int32_t psa_asymmetric_decrypt_test(security_t caller) TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(5)); if (is_buffer_empty(check1[i].salt, check1[i].salt_length) == TRUE) + { salt = NULL; + check1[i].salt_length = 0; + } else salt = check1[i].salt; @@ -209,7 +212,10 @@ int32_t psa_asymmetric_decrypt_negative_test(security_t caller) TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(6)); if (is_buffer_empty(check1[i].salt, check1[i].salt_length) == TRUE) + { salt = NULL; + check1[i].salt_length = 0; + } else salt = check1[i].salt;