]> git.droids-corp.org - dpdk.git/commitdiff
examples/fips_validation: add AES-CBC in the enum
authorGowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Wed, 29 Jun 2022 12:35:04 +0000 (18:05 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Thu, 30 Jun 2022 04:54:21 +0000 (06:54 +0200)
Add algorithm enum specifically for AES_CBC instead of relying on
AES as such.

Fixes: 8b8546aaedf ("examples/fips_validation: add parsing for AES-CBC")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
examples/fips_validation/fips_validation.c
examples/fips_validation/fips_validation.h
examples/fips_validation/main.c

index 324abccb14f765d8701aed4a9daa5b56a5c79826..68b5572db297e211ef61ee4f844917b9c8d275dc 100644 (file)
@@ -463,7 +463,7 @@ fips_test_parse_one_json_vector_set(void)
        else if (strstr(algo_str, "CMAC"))
                info.algo = FIPS_TEST_ALGO_AES_CMAC;
        else if (strstr(algo_str, "AES-CBC"))
-               info.algo = FIPS_TEST_ALGO_AES;
+               info.algo = FIPS_TEST_ALGO_AES_CBC;
        else
                return -EINVAL;
 
index 69d738b718dd61881f24e45f6672648ff424b93b..819236983d2b05cc946b89f33110f3d342c42547 100644 (file)
@@ -34,6 +34,7 @@
 
 enum fips_test_algorithms {
                FIPS_TEST_ALGO_AES = 0,
+               FIPS_TEST_ALGO_AES_CBC,
                FIPS_TEST_ALGO_AES_GCM,
                FIPS_TEST_ALGO_AES_CMAC,
                FIPS_TEST_ALGO_AES_CCM,
index ceabea788e662aef00dd408299a7e95ca493fe11..9c4951595d9489253c58cb143d538e3f707292f2 100644 (file)
@@ -1781,6 +1781,7 @@ static int
 init_test_ops(void)
 {
        switch (info.algo) {
+       case FIPS_TEST_ALGO_AES_CBC:
        case FIPS_TEST_ALGO_AES:
                test_ops.prepare_op = prepare_cipher_op;
                test_ops.prepare_xform  = prepare_aes_xform;