mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-07 17:00:03 +01:00
Remove unnecessary query for volume key size.
In fact we need only stored key size in examined keyslot. It's valid for default segment volume keys and in case of non-default segment keys it always returns -1 and fallbacks to stored key size query instead.
This commit is contained in:
@@ -380,9 +380,7 @@ static int LUKS2_open_and_verify(struct crypt_device *cd,
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
key_size = LUKS2_get_volume_key_size(hdr, segment);
|
key_size = LUKS2_get_keyslot_stored_key_size(hdr, keyslot);
|
||||||
if (key_size < 0)
|
|
||||||
key_size = LUKS2_get_keyslot_stored_key_size(hdr, keyslot);
|
|
||||||
if (key_size < 0)
|
if (key_size < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user