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 324abcc..68b5572 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 69d738b..8192369 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 ceabea7..9c49515 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;