From 90ecace4f6d741c944243dda3ae88c882d4ac12d Mon Sep 17 00:00:00 2001 From: Archana Muniganti Date: Fri, 17 Apr 2020 20:38:40 +0530 Subject: [PATCH] examples/fips_validation: fix parsing of algorithms Few of the NIST TDES test files don't contain TDES string. Added indicators to identify such files. These indicators are part of only NIST TDES test vector files. Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing") Cc: stable@dpdk.org Signed-off-by: Archana Muniganti Signed-off-by: Ayuj Verma Acked-by: Anoob Joseph --- examples/fips_validation/fips_validation.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index ef24b72037..a34e34d25a 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -144,6 +144,24 @@ fips_test_parse_header(void) ret = parse_test_tdes_init(); if (ret < 0) return 0; + } else if (strstr(info.vec[i], "PERMUTATION")) { + algo_parsed = 1; + info.algo = FIPS_TEST_ALGO_TDES; + ret = parse_test_tdes_init(); + if (ret < 0) + return 0; + } else if (strstr(info.vec[i], "VARIABLE")) { + algo_parsed = 1; + info.algo = FIPS_TEST_ALGO_TDES; + ret = parse_test_tdes_init(); + if (ret < 0) + return 0; + } else if (strstr(info.vec[i], "SUBSTITUTION")) { + algo_parsed = 1; + info.algo = FIPS_TEST_ALGO_TDES; + ret = parse_test_tdes_init(); + if (ret < 0) + return 0; } else if (strstr(info.vec[i], "SHA-")) { algo_parsed = 1; info.algo = FIPS_TEST_ALGO_SHA; -- 2.20.1