moved key_derivation.rs from pbs_datastore to pbs-config/src/key_config.rs

Also moved pbs-datastore/src/crypt_config.rs to pbs-tools/src/crypt_config.rs.
We do not want to depend on pbs-api-types there, so I use [u8;32] instead of
Fingerprint.
This commit is contained in:
Dietmar Maurer
2021-09-07 09:22:14 +02:00
parent ed2080762c
commit bbdda58b35
38 changed files with 79 additions and 65 deletions

View File

@ -11,6 +11,7 @@ serde_json = "1.0"
proxmox = { version = "0.13.0", features = [ "api-macro", "cli" ] }
pbs-config = { path = "../pbs-config" }
pbs-client = { path = "../pbs-client" }
pbs-datastore = { path = "../pbs-datastore" }
pbs-runtime = { path = "../pbs-runtime" }

View File

@ -12,6 +12,8 @@ use proxmox::api::cli::{
};
use proxmox::api::{api, cli::*};
use pbs_tools::cli::outfile_or_stdout;
use pbs_tools::crypt_config::CryptConfig;
use pbs_datastore::dynamic_index::DynamicIndexReader;
use pbs_datastore::file_formats::{
COMPRESSED_BLOB_MAGIC_1_0, DYNAMIC_SIZED_CHUNK_INDEX_1_0, ENCRYPTED_BLOB_MAGIC_1_0,
@ -19,11 +21,10 @@ use pbs_datastore::file_formats::{
};
use pbs_datastore::fixed_index::FixedIndexReader;
use pbs_datastore::index::IndexFile;
use pbs_datastore::{load_and_decrypt_key, CryptConfig, DataBlob};
use pbs_datastore::DataBlob;
use pbs_config::key_config::load_and_decrypt_key;
use pbs_client::tools::key_source::get_encryption_key_password;
use pbs_tools::cli::outfile_or_stdout;
/// Decodes a blob and writes its content either to stdout or into a file
fn decode_blob(

View File

@ -7,17 +7,17 @@ use serde_json::Value;
use proxmox::api::api;
use proxmox::api::cli::{CliCommand, CliCommandMap, CommandLineInterface};
use proxmox::tools::digest_to_hex;
use pbs_tools::crypt_config::CryptConfig;
use pbs_datastore::dynamic_index::DynamicIndexReader;
use pbs_datastore::file_formats::{DYNAMIC_SIZED_CHUNK_INDEX_1_0, FIXED_SIZED_CHUNK_INDEX_1_0};
use pbs_datastore::fixed_index::FixedIndexReader;
use pbs_datastore::index::IndexFile;
use pbs_datastore::{load_and_decrypt_key, CryptConfig, DataBlob};
use pbs_datastore::DataBlob;
use pbs_config::key_config::load_and_decrypt_key;
use pbs_client::tools::key_source::get_encryption_key_password;
use proxmox::tools::digest_to_hex;
#[api(
input: {
properties: {