examples/fips_validation: fix parsing of algo from NIST TDES test files

Message ID 1587136120-7390-1-git-send-email-marchana@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series examples/fips_validation: fix parsing of algo from NIST TDES test files |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues

Commit Message

Archana Muniganti April 17, 2020, 3:08 p.m. UTC
  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")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
---
 examples/fips_validation/fips_validation.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
  

Comments

Anoob Joseph April 23, 2020, 1:33 p.m. UTC | #1
> 
> 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")
> 
> Signed-off-by: Archana Muniganti <marchana@marvell.com>
> Signed-off-by: Ayuj Verma <ayverma@marvell.com>
 
Acked-by: Anoob Joseph <anoobj@marvell.com>
  
Akhil Goyal May 9, 2020, 10:07 p.m. UTC | #2
> >
> > 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")
> >
> > Signed-off-by: Archana Muniganti <marchana@marvell.com>
> > Signed-off-by: Ayuj Verma <ayverma@marvell.com>
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>

Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index ef24b72..a34e34d 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;