mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust/pv: User-data signing and verifying
Add the ability to generate signed user-data and to verify the signature. Reviewed-by: Marc Hartmayer <mhartmay@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:
committed by
Jan Höppner
parent
f36c34038b
commit
34bef977e8
@@ -67,6 +67,13 @@ impl AddSecretMagic {
|
||||
let kind = UserDataType::try_from(kind)?;
|
||||
Ok(Self::from(kind))
|
||||
}
|
||||
|
||||
/// Returns the [`UserDataType`] of this [`AddSecretMagic`].
|
||||
pub fn kind(&self) -> UserDataType {
|
||||
// Panic: Will never panic. The value is cheched during construcion of the object for
|
||||
// beeing one of the enum values.
|
||||
self.kind.get().try_into().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
/// Types of (non architectured) user data for an add-secret request
|
||||
|
||||
Reference in New Issue
Block a user