move fingerprint helpers from pbs-tools to pbs-api-types
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
@ -21,6 +21,7 @@ use pbs_api_types::{
|
||||
};
|
||||
|
||||
use pbs_api_types::{PRIV_TAPE_AUDIT, PRIV_TAPE_READ, PRIV_TAPE_WRITE};
|
||||
|
||||
use pbs_config::CachedUserInfo;
|
||||
use pbs_tape::{
|
||||
BlockReadError,
|
||||
@ -695,7 +696,7 @@ pub async fn read_label(
|
||||
flat.encryption_key_fingerprint = set
|
||||
.encryption_key_fingerprint
|
||||
.as_ref()
|
||||
.map(|fp| pbs_tools::format::as_fingerprint(fp.bytes()));
|
||||
.map(|fp| fp.to_string());
|
||||
|
||||
let encrypt_fingerprint = set.encryption_key_fingerprint.clone()
|
||||
.map(|fp| (fp, set.uuid.clone()));
|
||||
|
@ -317,7 +317,7 @@ impl TapeDriver for LtoTapeHandle {
|
||||
}
|
||||
|
||||
let output = if let Some((fingerprint, uuid)) = key_fingerprint {
|
||||
let fingerprint = pbs_tools::format::as_fingerprint(fingerprint.bytes());
|
||||
let fingerprint = fingerprint.to_string();
|
||||
run_sg_tape_cmd("encryption", &[
|
||||
"--fingerprint", &fingerprint,
|
||||
"--uuid", &uuid.to_string(),
|
||||
|
Reference in New Issue
Block a user