master key: store blob name in constant

since we will use it in more than one place.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2020-12-16 14:41:05 +01:00
committed by Dietmar Maurer
parent fe6c19383b
commit 9990af3042
2 changed files with 3 additions and 1 deletions

View File

@ -54,6 +54,7 @@ use proxmox_backup::backup::{
CryptConfig,
CryptMode,
DynamicIndexReader,
ENCRYPTED_KEY_BLOB_NAME,
FixedChunkStream,
FixedIndexReader,
IndexFile,
@ -1064,7 +1065,7 @@ async fn create_backup(
}
if let Some(rsa_encrypted_key) = rsa_encrypted_key {
let target = "rsa-encrypted.key.blob";
let target = ENCRYPTED_KEY_BLOB_NAME;
println!("Upload RSA encoded key to '{:?}' as {}", repo, target);
let stats = client
.upload_blob_from_data(rsa_encrypted_key, target, false, false)