rust/pv_core: Retrieve Secret UVC

Create the uvdevice-IOCTL functionality for the new Retrieve Secret UVC.

Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Acked-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
2024-03-05 11:56:57 +01:00
committed by Jan Höppner
parent 69eb06f39e
commit 01cd81ecf5
4 changed files with 118 additions and 3 deletions
+7
View File
@@ -4,6 +4,8 @@
use std::path::PathBuf;
use crate::uv::SecretId;
/// Result type for this crate
pub type Result<T, E = Error> = std::result::Result<T, E>;
@@ -70,6 +72,11 @@ pub enum Error {
#[error("The attestation request does not specify a measurement size or measurement data.")]
BinArcbNoMeasurement,
#[error(
"The secret with the ID {id} cannot be retrieved. The requested size is too large ({size})"
)]
InvalidRetrievableSecretType { id: SecretId, size: usize },
// errors from other crates
#[error(transparent)]
Io(#[from] std::io::Error),