Files
s390-tools/rust/pvsecret/src/cmd/lock.rs
T
Steffen Eiden dd82c26f87 rust: Add tool to manage UV-secrets
Add `pvsecret` a tool to create, add, list, and delete Ultravisor
secrets. `pvsecret` uses the functionality from the pv-crate
to provide an command line tool to manage the secrets.

Add a new target group PV_TARGETS in rust/Makefile that additionally
requires openssl and libcurl as pv with the feature "request" uses
openssl and libcurl fearures.

Acked-by: Jan Höppner <hoeppner@linux.ibm.com>
Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
[hoeppner@linux.ibm.com: Adapt man pages and help output]
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2023-08-04 11:41:09 +02:00

15 lines
301 B
Rust

// SPDX-License-Identifier: MIT
//
// Copyright IBM Corp. 2023
use anyhow::Result;
use log::warn;
use pv::uv::{LockCmd, UvDevice};
/// Do a Lock Secret Store UVC
pub fn lock() -> Result<()> {
UvDevice::open()?.send_cmd(&mut LockCmd)?;
warn!("Successfully locked secret store");
Ok(())
}