mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Add a new command: check. This allows users to perform policy checks on the Attestation result. The host-key hashes, and the user-data can be tested for certain values. While at it fix some typos and enable CSV parsing for the Additional-data flags. Example: ``` pvattest check attestresp checkresult -k hkd0.crt,hkd1.crt --host-key-check AttKeyCheck ``` Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
36 lines
754 B
Rust
36 lines
754 B
Rust
// SPDX-License-Identifier: MIT
|
|
//
|
|
// Copyright IBM Corp. 2024
|
|
//
|
|
pub mod check;
|
|
pub mod create;
|
|
#[cfg(target_arch = "s390x")]
|
|
pub mod perform;
|
|
pub mod verify;
|
|
|
|
pub use check::check;
|
|
pub use create::create;
|
|
pub use verify::verify;
|
|
|
|
pub const CMD_FN: &[&str] = &["+create", "+verify"];
|
|
// s390 branch
|
|
#[cfg(target_arch = "s390x")]
|
|
mod uv_cmd {
|
|
pub use super::perform::perform;
|
|
pub const UV_CMD_FN: &[&str] = &["+perform"];
|
|
}
|
|
|
|
// non s390-branch
|
|
#[cfg(not(target_arch = "s390x"))]
|
|
mod uv_cmd {
|
|
use std::process::ExitCode;
|
|
|
|
use anyhow::{bail, Result};
|
|
|
|
pub fn perform(_: &crate::cli::PerformAttOpt) -> Result<ExitCode> {
|
|
bail!("Command only available on s390x")
|
|
}
|
|
pub const UV_CMD_FN: &[&str] = &[];
|
|
}
|
|
pub use uv_cmd::*;
|