src/bin/proxmox-backup-client.rs: sign index.json

This commit is contained in:
Dietmar Maurer
2019-08-02 10:00:15 +02:00
parent 69ecd8d5b0
commit b335f5b713
2 changed files with 8 additions and 3 deletions

View File

@ -597,6 +597,7 @@ impl BackupClient {
file_name: &str,
crypt_config: Option<Arc<CryptConfig>>,
compress: bool,
sign_only: bool,
) -> impl Future<Item=BackupStats, Error=Error> {
let h2 = self.h2.clone();
@ -606,7 +607,11 @@ impl BackupClient {
futures::future::ok(())
.and_then(move |_| {
let blob = if let Some(ref crypt_config) = crypt_config {
DataBlob::encode(&data, Some(crypt_config), compress)?
if sign_only {
DataBlob::create_signed(&data, crypt_config, compress)?
} else {
DataBlob::encode(&data, Some(crypt_config), compress)?
}
} else {
DataBlob::encode(&data, None, compress)?
};