From 2b5e7b049123aff094c7de79ba57a5df09471b2e Mon Sep 17 00:00:00 2001 From: Steffen Eiden Date: Wed, 20 Mar 2024 15:36:52 +0100 Subject: [PATCH] pvattest: Fix root-ca parsing The parser setup falsely set the argument type as filename array, but code expected a single filename. Fixed by setting up the parser correctly to expect a single file name. Fixes: 3ab06d77fb1b ("pvattest: Create, perform, and verify attestation measurements") Reviewed-by: Marc Hartmayer Signed-off-by: Steffen Eiden --- pvattest/src/argparse.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pvattest/src/argparse.c b/pvattest/src/argparse.c index fe5662f9..5924ddc8 100644 --- a/pvattest/src/argparse.c +++ b/pvattest/src/argparse.c @@ -192,13 +192,13 @@ static gboolean hex_str_toull(const char *nptr, uint64_t *dst, GError **error) } /* NOTE REQUIRED */ -#define _entry_root_ca(__arg_data, __indent) \ - { \ - .long_name = "root-ca", .short_name = 0, .flags = G_OPTION_FLAG_NONE, \ - .arg = G_OPTION_ARG_FILENAME_ARRAY, .arg_data = __arg_data, \ - .description = "Use FILE as the trusted root CA instead the\n" __indent \ - "root CAs that are installed on the system (optional).\n", \ - .arg_description = "FILE", \ +#define _entry_root_ca(__arg_data, __indent) \ + { \ + .long_name = "root-ca", .short_name = 0, .flags = G_OPTION_FLAG_NONE, \ + .arg = G_OPTION_ARG_FILENAME, .arg_data = __arg_data, \ + .description = "Use FILE as the trusted root CA instead the\n" __indent \ + "root CAs that are installed on the system (optional).\n", \ + .arg_description = "FILE", \ } /* NOTE REQUIRED */