[v1] examples/fips_validation: add parsing for AES GMAC
Checks
Commit Message
Added functionality to parse algorithm for AES GMAC test
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
examples/fips_validation/fips_validation.c | 2 ++
examples/fips_validation/fips_validation.h | 1 +
examples/fips_validation/main.c | 6 ++++++
3 files changed, 9 insertions(+)
@@ -458,6 +458,8 @@ fips_test_parse_one_json_vector_set(void)
/* Vector sets contain the algorithm type, and nothing else we need. */
if (strstr(algo_str, "AES-GCM"))
info.algo = FIPS_TEST_ALGO_AES_GCM;
+ else if (strstr(algo_str, "AES-GMAC"))
+ info.algo = FIPS_TEST_ALGO_AES_GMAC;
else if (strstr(algo_str, "HMAC"))
info.algo = FIPS_TEST_ALGO_HMAC;
else if (strstr(algo_str, "CMAC"))
@@ -36,6 +36,7 @@ enum fips_test_algorithms {
FIPS_TEST_ALGO_AES = 0,
FIPS_TEST_ALGO_AES_CBC,
FIPS_TEST_ALGO_AES_GCM,
+ FIPS_TEST_ALGO_AES_GMAC,
FIPS_TEST_ALGO_AES_CMAC,
FIPS_TEST_ALGO_AES_CCM,
FIPS_TEST_ALGO_AES_XTS,
@@ -1817,6 +1817,11 @@ init_test_ops(void)
else
test_ops.test = fips_generic_test;
break;
+ case FIPS_TEST_ALGO_AES_GMAC:
+ test_ops.prepare_op = prepare_auth_op;
+ test_ops.prepare_xform = prepare_gmac_xform;
+ test_ops.test = fips_generic_test;
+ break;
case FIPS_TEST_ALGO_AES_GCM:
test_ops.prepare_op = prepare_aead_op;
test_ops.prepare_xform = prepare_gcm_xform;
@@ -1994,6 +1999,7 @@ fips_test_one_test_group(void)
json_object_set_new(json_info.json_write_group, "tests", write_tests);
switch (info.algo) {
+ case FIPS_TEST_ALGO_AES_GMAC:
case FIPS_TEST_ALGO_AES_GCM:
ret = parse_test_gcm_json_init();
break;