examples/fips_validation: fix print for zero length payload

NIST GCM decrypt result vectors expects to have following print
for zero length payload instead of having no print.
"pt" = ""

Fixes: b09aac2d6e2b ("examples/fips_validation: add JSON to GCM test")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
This commit is contained in:
Archana Muniganti 2022-06-30 16:51:23 +05:30 committed by Akhil Goyal
parent 577c85e996
commit ad42b228c6

View File

@ -327,6 +327,9 @@ parse_test_gcm_json_writeback(struct fips_val *val)
writeback_hex_str("", info.one_line_text, &tmp_val);
json_object_set_new(json_info.json_write_case, PT_JSON_STR,
json_string(info.one_line_text));
} else {
json_object_set_new(json_info.json_write_case, PT_JSON_STR,
json_string(""));
}
} else {
json_object_set_new(json_info.json_write_case, "testPassed", json_false());