pvattest: Add firmware check version 2

Add Response version 2 which includes more details about the
verification process.

Reviewed-by: Marc Hartmayer <marc@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2026-04-20 11:21:26 +02:00
committed by Jan Höppner
parent e53f5ccfea
commit 8878ba4fd2
5 changed files with 190 additions and 4 deletions
+21
View File
@@ -216,6 +216,17 @@ pub enum OutputType {
Yaml,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum, Debug, Default)]
pub enum FirmwareCheckVersion {
/// Use firmware check API version 1.0.
#[default]
#[value(name = "1")]
V1,
/// Use firmware check API version 2.0.
#[value(name = "2")]
V2,
}
#[derive(Args, Debug)]
pub struct CheckOpt {
/// Specify the attestation response to check whether the policies are validated.
@@ -303,6 +314,16 @@ pub struct CheckOpt {
#[arg(long)]
pub firmware: bool,
/// Specify the firmware verification request version.
#[arg(
long,
visible_alias("fw-ver"),
requires("firmware"),
value_enum,
default_value_t
)]
pub firmware_check_version: FirmwareCheckVersion,
/// Specify the endpoint to use for firmware version verification.
///
/// Use an endpoint you trust. Requires the --firmware option.