For AES GCM non JSON decrypt test cases the digest length is being set incorrectly.The digest length is not being cleared after test cases, causing an issue when running tests individually without the --path-is-folder flag. This fix adds the digest length correctly to the decrypt cases and clears the digest length after each test file.
Fixes: 4aaad2995e13 ("examples/fips_validation: support GCM parsing") Cc: marko.kovace...@intel.com Signed-off-by: Samina Arshad <samina.ars...@intel.com> --- examples/fips_validation/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index 4237224d9d..6518c959c4 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -834,7 +834,7 @@ prepare_aead_op(void) RTE_LOG(ERR, USER1, "Not enough memory\n"); return -ENOMEM; } - env.digest_len = vec.cipher_auth.digest.len; + env.digest_len = vec.aead.digest.len; sym->aead.data.length = vec.pt.len; sym->aead.digest.data = env.digest; @@ -843,7 +843,7 @@ prepare_aead_op(void) ret = prepare_data_mbufs(&vec.ct); if (ret < 0) return ret; - + env.digest_len = vec.aead.digest.len; sym->aead.data.length = vec.ct.len; sym->aead.digest.data = vec.aead.digest.val; sym->aead.digest.phys_addr = rte_malloc_virt2iova( @@ -2618,6 +2618,7 @@ fips_test_one_file(void) if (env.digest) { rte_free(env.digest); env.digest = NULL; + env.digest_len = 0; } rte_pktmbuf_free(env.mbuf); -- 2.25.1