mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-18 22:30:07 +01:00
Rename LUKS2_keyslot_reencrypt_create function.
The function never writes on-disk. Also removed validation function call-in since it will be called later before writing on-disk and metadata does not have to be complete at the moment of LUKS2_keyslot_reencrypt_allocate call.
This commit is contained in:
committed by
Milan Broz
parent
ce8aab39ca
commit
bc26c764c6
@@ -213,7 +213,7 @@ int LUKS2_keyslot_reencrypt_store(struct crypt_device *cd,
|
|||||||
const void *buffer,
|
const void *buffer,
|
||||||
size_t buffer_length);
|
size_t buffer_length);
|
||||||
|
|
||||||
int LUKS2_keyslot_reencrypt_create(struct crypt_device *cd,
|
int LUKS2_keyslot_reencrypt_allocate(struct crypt_device *cd,
|
||||||
struct luks2_hdr *hdr,
|
struct luks2_hdr *hdr,
|
||||||
int keyslot,
|
int keyslot,
|
||||||
const struct crypt_params_reencrypt *params);
|
const struct crypt_params_reencrypt *params);
|
||||||
|
|||||||
@@ -598,7 +598,7 @@ int LUKS2_keyslot_open(struct crypt_device *cd,
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LUKS2_keyslot_reencrypt_create(struct crypt_device *cd,
|
int LUKS2_keyslot_reencrypt_allocate(struct crypt_device *cd,
|
||||||
struct luks2_hdr *hdr,
|
struct luks2_hdr *hdr,
|
||||||
int keyslot,
|
int keyslot,
|
||||||
const struct crypt_params_reencrypt *params)
|
const struct crypt_params_reencrypt *params)
|
||||||
@@ -628,9 +628,6 @@ int LUKS2_keyslot_reencrypt_create(struct crypt_device *cd,
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LUKS2_hdr_validate(cd, hdr->jobj, hdr->hdr_size - LUKS2_HDR_BIN_LEN))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2487,7 +2487,7 @@ static int reencrypt_init(struct crypt_device *cd,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = LUKS2_keyslot_reencrypt_create(cd, hdr, reencrypt_keyslot,
|
r = LUKS2_keyslot_reencrypt_allocate(cd, hdr, reencrypt_keyslot,
|
||||||
params);
|
params);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto err;
|
goto err;
|
||||||
|
|||||||
Reference in New Issue
Block a user