From 601b8a54a5fa2484ed0c8398b48c7c6f8839fdfd Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Thu, 22 Oct 2020 10:59:27 +0100 Subject: [PATCH] fips_validation: fix GCM test This patch fixes FIPS GCM test of the redundant plaintext string write and insufficient test case support check for some corner cases. Fixes: d09abf2d1007 ("examples/fips_validation: update GCM test") Cc: stable@dpdk.org Signed-off-by: Fan Zhang --- examples/fips_validation/fips_validation_gcm.c | 1 - examples/fips_validation/main.c | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/fips_validation/fips_validation_gcm.c b/examples/fips_validation/fips_validation_gcm.c index df3caa267c..250d09bf90 100644 --- a/examples/fips_validation/fips_validation_gcm.c +++ b/examples/fips_validation/fips_validation_gcm.c @@ -175,7 +175,6 @@ parse_test_gcm_writeback(struct fips_val *val) if (vec.status == RTE_CRYPTO_OP_STATUS_SUCCESS) { fprintf(info.fp_wr, "%s", PT_STR); if (!info.interim_info.gcm_data.is_gmac) { - fprintf(info.fp_wr, "%s", PT_STR); tmp_val.val = val->val; tmp_val.len = vec.pt.len; diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index 81539df360..cad6bcb180 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -927,10 +927,14 @@ prepare_gmac_xform(struct rte_crypto_sym_xform *xform) if (rte_cryptodev_sym_capability_check_auth(cap, auth_xform->key.length, - auth_xform->digest_length, 0) != 0) { - RTE_LOG(ERR, USER1, "PMD %s key length %u IV length %u\n", + auth_xform->digest_length, + auth_xform->iv.length) != 0) { + + RTE_LOG(ERR, USER1, + "PMD %s key length %u Digest length %u IV length %u\n", info.device_name, auth_xform->key.length, - auth_xform->digest_length); + auth_xform->digest_length, + auth_xform->iv.length); return -EPERM; } -- 2.20.1