mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
Fix wrong digest assignment to new LUKS2 (volume key) keyslot.
All new LUKS2 keyslots added by passphrase or by volume key were assigned to digest 0 despite the fact segment was assigned to different digest.
This commit is contained in:
committed by
Milan Broz
parent
869767a5cf
commit
fee1d659cf
@@ -3164,6 +3164,8 @@ int crypt_activate_by_volume_key(struct crypt_device *cd,
|
||||
r = LUKS2_digest_verify_by_segment(cd, &cd->u.luks2.hdr, CRYPT_DEFAULT_SEGMENT, vk);
|
||||
if (r == -EPERM || r == -ENOENT)
|
||||
log_err(cd, _("Volume key does not match the volume.\n"));
|
||||
if (r > 0)
|
||||
r = 0;
|
||||
|
||||
if (!r && (name || (flags & CRYPT_ACTIVATE_KEYRING_KEY)) &&
|
||||
crypt_use_keyring_for_vk(cd)) {
|
||||
|
||||
Reference in New Issue
Block a user