mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust/pv_core: Attestation support
Add functionality for: * sending attestation requests to the uvdevice and retrieve the response * create/read the attestation exchange format file format Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
// Copyright IBM Corp. 2023
|
||||
// Copyright IBM Corp. 2023, 2024
|
||||
|
||||
/// Result type for this crate
|
||||
pub type Result<T, E = Error> = std::result::Result<T, E>;
|
||||
@@ -49,6 +49,18 @@ pub enum Error {
|
||||
#[error("Input contains unsupported user-data type: {0:#06x}")]
|
||||
UnsupportedUserData(u16),
|
||||
|
||||
#[error("The input has not the correct format: {field} is too large. Maximal size {max_size}")]
|
||||
AttDataSizeLarge { field: &'static str, max_size: u32 },
|
||||
|
||||
#[error("The input has not the correct format: {field} is too small. Minimal size {min_size}")]
|
||||
AttDataSizeSmall { field: &'static str, min_size: u32 },
|
||||
|
||||
#[error("The attestation request has an unknown algorithm type (.0)")]
|
||||
BinArcbInvAlgorithm(u32),
|
||||
|
||||
#[error("The attestation request does not specify a measurement size or measurement data.")]
|
||||
BinArcbNoMeasurement,
|
||||
|
||||
// errors from other crates
|
||||
#[error(transparent)]
|
||||
Io(#[from] std::io::Error),
|
||||
|
||||
Reference in New Issue
Block a user