[2/2] fips_validation: fix gcm test
Checks
Commit Message
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: roy.fan.zhang@intel.com
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
examples/fips_validation/fips_validation_gcm.c | 1 -
examples/fips_validation/main.c | 10 +++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
@@ -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;
@@ -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;
}