From 33fde99138ac44b5cf0430cdb54a102974ad3b17 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Fri, 4 Aug 2023 11:05:21 +0000 Subject: [PATCH] rust: pv/pvsecret: some typo fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It reads 'add-secret requests' and not 'add secret requests'. Reviewed-by: Jan Höppner Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- rust/pv/src/error.rs | 2 +- rust/pv/src/lib.rs | 2 +- rust/pv/src/uvdevice.rs | 2 +- rust/pv/src/uvsecret.rs | 2 +- rust/pv/src/uvsecret/asrcb.rs | 6 +++--- rust/pvsecret/src/cli.rs | 2 +- rust/pvsecret/src/cmd/create.rs | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rust/pv/src/error.rs b/rust/pv/src/error.rs index 56b3342c..97043b1b 100644 --- a/rust/pv/src/error.rs +++ b/rust/pv/src/error.rs @@ -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 diff --git a/rust/pv/src/lib.rs b/rust/pv/src/lib.rs index 5b67da59..d72ac93e 100644 --- a/rust/pv/src/lib.rs +++ b/rust/pv/src/lib.rs @@ -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::{ diff --git a/rust/pv/src/uvdevice.rs b/rust/pv/src/uvdevice.rs index a4852586..01b6ba60 100644 --- a/rust/pv/src/uvdevice.rs +++ b/rust/pv/src/uvdevice.rs @@ -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; diff --git a/rust/pv/src/uvsecret.rs b/rust/pv/src/uvsecret.rs index b9fa3560..64702eca 100644 --- a/rust/pv/src/uvsecret.rs +++ b/rust/pv/src/uvsecret.rs @@ -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")] diff --git a/rust/pv/src/uvsecret/asrcb.rs b/rust/pv/src/uvsecret/asrcb.rs index 3279cdaf..a38e6d8f 100644 --- a/rust/pv/src/uvsecret/asrcb.rs +++ b/rust/pv/src/uvsecret/asrcb.rs @@ -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 diff --git a/rust/pvsecret/src/cli.rs b/rust/pvsecret/src/cli.rs index 10dbd1b2..5b3e2354 100644 --- a/rust/pvsecret/src/cli.rs +++ b/rust/pvsecret/src/cli.rs @@ -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))] diff --git a/rust/pvsecret/src/cmd/create.rs b/rust/pvsecret/src/cmd/create.rs index 431ea0f9..a8beb564 100644 --- a/rust/pvsecret/src/cmd/create.rs +++ b/rust/pvsecret/src/cmd/create.rs @@ -29,7 +29,7 @@ fn write_out>(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 { - debug!("Build Add Secret Request"); + debug!("Build add-secret request"); let secret = match &opt.secret { AddSecretType::Meta => GuestSecret::Null,