[pbs-devel] [PATCH proxmox-backup-qemu 1/2] encryption key tracking: use fingerprint
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Nov 24 16:44:20 CET 2020
On November 24, 2020 4:36 pm, Dietmar Maurer wrote:
> Does this improve something? I can't see the purpose of this change.
it allows use to display this remembered fingerprint (e.g., in the
'invalidating bitmap' message or via the WIP 'query-proxmox-support'.
(also, I'd rather harmonize this now while PVE->PBS is still in beta,
and not afterwards)
>> @@ -152,7 +154,8 @@ pub(crate) fn check_last_encryption_key(
>> let digest_guard = PREVIOUS_CRYPT_CONFIG_DIGEST.lock().unwrap();
>> match (*digest_guard, config) {
>> (Some(last_digest), Some(current_config)) => {
>> - crypt_config_digest(current_config) == last_digest
>> + current_config.fingerprint().bytes() == &last_digest
>> + || crypt_config_digest(current_config) == last_digest
>> },
>> (None, None) => true,
>> _ => false,
>> @@ -440,7 +443,13 @@ pub(crate) async fn finish_backup(
>>
>> {
>> let crypt_config_digest = match crypt_config {
>> - Some(current_config) => Some(crypt_config_digest(current_config)),
>> + Some(current_config) => {
>> + let fp = current_config
>> + .fingerprint()
>> + .bytes()
>> + .to_owned();
>> + Some(fp)
>> + },
>> None => None,
>> };
>>
>
More information about the pbs-devel
mailing list