mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust: pv/pvsecret: some typo fixes
It reads 'add-secret requests' and not 'add secret requests'. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
4b486e87cc
commit
33fde99138
@@ -79,7 +79,7 @@ pub enum Error {
|
||||
InvSecretList(#[source] std::io::Error),
|
||||
|
||||
#[cfg(feature = "uvsecret")]
|
||||
#[error("Input does not contain an Add Secret Request")]
|
||||
#[error("Input does not contain an add-secret request")]
|
||||
NoAsrcb,
|
||||
|
||||
// errors from other crates
|
||||
|
||||
@@ -126,7 +126,7 @@ pub mod request {
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "uvsecret")] {
|
||||
/// Functionalities for creating Add Secret requests
|
||||
/// Functionalities for creating add-secret requests
|
||||
pub mod uvsecret {
|
||||
#[cfg(feature = "request")]
|
||||
pub use crate::uvsecret::{
|
||||
|
||||
@@ -162,7 +162,7 @@ impl UvDevice {
|
||||
pub const LIST_SECRET_NR: u8 = ffi::UVIO_IOCTL_LIST_SECRETS_NR;
|
||||
/// IOCTL number for the lock ksecret UVC
|
||||
pub const LOCK_SECRET_NR: u8 = ffi::UVIO_IOCTL_LOCK_SECRETS_NR;
|
||||
/// Maximum length for addsecret requests
|
||||
/// Maximum length for add-secret requests
|
||||
pub const ADD_SECRET_MAX_LEN: usize = ffi::UVIO_ADD_SECRET_MAX_LEN;
|
||||
/// Size of the buffer for list secret requests
|
||||
pub const LIST_SECRETS_LEN: usize = ffi::UVIO_LIST_SECRETS_LEN;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#![cfg(feature = "uvsecret")]
|
||||
//! Provides functionality to manage the UV secret store.
|
||||
//!
|
||||
//! Provides functionality to build `Add Secret` requests.
|
||||
//! Provides functionality to build `add-secret` requests.
|
||||
//! Also provides interfaces, to dispatch `Add Secret`, `Lock Secret Store`,
|
||||
//! and `List Secrets` requests,
|
||||
#[cfg(feature = "request")]
|
||||
|
||||
@@ -149,9 +149,9 @@ impl AddSecretMagic {
|
||||
}
|
||||
}
|
||||
|
||||
/// Add Secret Request Control Block
|
||||
/// Add-secret request Control Block
|
||||
///
|
||||
/// An ASRCB wraps a secret to transport is securely to the Ultravisor.
|
||||
/// An ASRCB wraps a secret to transport it securely to the Ultravisor.
|
||||
///
|
||||
/// Layout:
|
||||
///```none
|
||||
@@ -185,7 +185,7 @@ pub struct AddSecretRequest {
|
||||
}
|
||||
|
||||
impl AddSecretRequest {
|
||||
/// Create a new Add Secret request.
|
||||
/// Create a new add-secret request.
|
||||
///
|
||||
/// The request has no extension secret, no configuration UID, no host-keys,
|
||||
/// and no user data
|
||||
|
||||
@@ -97,7 +97,7 @@ pub struct CreateSecretOpt {
|
||||
// FLAGS
|
||||
// each flag must conflict with `flags`
|
||||
// `flags` is hidden in the help menu
|
||||
/// Manually set the Add Secret Request flags.
|
||||
/// Manually set the add-secret request flags.
|
||||
///
|
||||
/// No validity checks made. Hidden in user documentation.
|
||||
#[arg(long, hide(true))]
|
||||
|
||||
@@ -29,7 +29,7 @@ fn write_out<D: AsRef<[u8]>>(path: &str, data: D, ctx: &str) -> pv::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Prepare an Add Secret Request
|
||||
/// Prepare an add-secret request
|
||||
pub fn create(opt: &CreateSecretOpt) -> Result<()> {
|
||||
if pv_guest_bit_set() {
|
||||
warn!("The system seems to be a Secure Execution guest");
|
||||
@@ -55,15 +55,15 @@ pub fn create(opt: &CreateSecretOpt) -> Result<()> {
|
||||
let rq = ReqEncrCtx::random(SymKeyType::Aes256).context("Failed to generate random input")?;
|
||||
let ser_asrbc = asrcb.encrypt(&rq)?;
|
||||
warn!("Successfully generated the request");
|
||||
write_out(&opt.output, ser_asrbc, "Add Secret Request")?;
|
||||
write_out(&opt.output, ser_asrbc, "add-secret request")?;
|
||||
info!("Successfully wrote the request to '{}'", &opt.output);
|
||||
|
||||
write_secret(&opt.secret, &asrcb)
|
||||
}
|
||||
|
||||
/// Set-up the `Add Secret Request` from command-line arguments
|
||||
/// Set-up the `add-secret request` from command-line arguments
|
||||
fn build_asrcb(opt: &CreateSecretOpt) -> Result<AddSecretRequest> {
|
||||
debug!("Build Add Secret Request");
|
||||
debug!("Build add-secret request");
|
||||
|
||||
let secret = match &opt.secret {
|
||||
AddSecretType::Meta => GuestSecret::Null,
|
||||
|
||||
Reference in New Issue
Block a user