cryptsetup: Adjust XTS keys size also if cipher is specified with capi: prefix.

Fixes: #776
This commit is contained in:
Milan Broz
2025-05-15 12:24:47 +02:00
parent bd2f7eb671
commit e5c2892cd5
4 changed files with 5 additions and 5 deletions

View File

@@ -1589,7 +1589,7 @@ int luksFormat(struct crypt_device **r_cd, struct crypt_keyslot_context **r_kc)
goto out;
}
keysize = get_adjusted_key_size(cipher_mode, ARG_UINT32(OPT_KEY_SIZE_ID),
keysize = get_adjusted_key_size(cipher, cipher_mode, ARG_UINT32(OPT_KEY_SIZE_ID),
DEFAULT_LUKS1_KEYBITS, integrity_keysize);
if (ARG_SET(OPT_HW_OPAL_ONLY_ID))