[2/5] test/crypto: fix ZUC digest length in comparison
Checks
Commit Message
The digest length used in ZUC tests for verifying the digest was
hardcoded at 4 bytes, which was suitable for ZUC128 only.
Now that ZUC256 is supported by these test functions, the digest length
can vary.
Using the test vector digest length directly in these
comparisons allows for variable digest length.
Fixes: 83397b9f0739 ("test/crypto: add further ZUC test cases")
Fixes: fa5bf9345d4e ("test/crypto: add ZUC cases with 256-bit keys")
Cc: vvelumuri@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
app/test/test_cryptodev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -4853,7 +4853,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
TEST_ASSERT_BUFFERS_ARE_EQUAL(
ut_params->digest,
tdata->digest.data,
- 4,
+ tdata->digest.len,
"ZUC Generated auth tag not as expected");
return 0;
}
@@ -6499,7 +6499,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
TEST_ASSERT_BUFFERS_ARE_EQUAL(
ut_params->digest,
tdata->digest.data,
- DIGEST_BYTE_LENGTH_KASUMI_F9,
+ tdata->digest.len,
"ZUC Generated auth tag not as expected");
}
return 0;
@@ -6706,7 +6706,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
TEST_ASSERT_BUFFERS_ARE_EQUAL(
digest,
tdata->digest.data,
- DIGEST_BYTE_LENGTH_KASUMI_F9,
+ tdata->digest.len,
"ZUC Generated auth tag not as expected");
}
return 0;