[v4,1/3] examples/fips_validation: add aes_cbc specific enum
Checks
Commit Message
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 | 2 +-
examples/fips_validation/fips_validation.h | 1 +
examples/fips_validation/main.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
@@ -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;
@@ -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,
@@ -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;