mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
libdevmapper: Support dm-crypt integrity_key_size option
This patch implement support for setting specific integrity key size option in dm-crypt, available since dm-crypt version 1.28.0. This can be used for setting non-standard HMAC key length. Mostly based on code from Ingo Franzki <ifranzki@linux.ibm.com>
This commit is contained in:
@@ -609,8 +609,7 @@ int PLAIN_activate(struct crypt_device *cd,
|
||||
|
||||
r = dm_crypt_target_set(&dmd.segment, 0, dmd.size, crypt_data_device(cd),
|
||||
vk, crypt_get_cipher_spec(cd), crypt_get_iv_offset(cd),
|
||||
crypt_get_data_offset(cd), crypt_get_integrity(cd),
|
||||
crypt_get_integrity_tag_size(cd), crypt_get_sector_size(cd));
|
||||
crypt_get_data_offset(cd), NULL, 0, 0, crypt_get_sector_size(cd));
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -3701,7 +3700,7 @@ int crypt_resize(struct crypt_device *cd, const char *name, uint64_t new_size)
|
||||
r = dm_crypt_target_set(&dmd.segment, 0, new_size, crypt_data_device(cd),
|
||||
tgt->u.crypt.vk, crypt_get_cipher_spec(cd),
|
||||
crypt_get_iv_offset(cd), crypt_get_data_offset(cd),
|
||||
crypt_get_integrity(cd), crypt_get_integrity_tag_size(cd),
|
||||
crypt_get_integrity(cd), crypt_get_integrity_tag_size(cd), 0 /* FIXME */,
|
||||
crypt_get_sector_size(cd));
|
||||
if (r < 0)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user