mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +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
b61ec23e48
commit
59e39e484a
@@ -234,7 +234,7 @@ int LUKS2_keyslot_reencrypt_store(struct crypt_device *cd,
|
||||
const void *buffer,
|
||||
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,
|
||||
int keyslot,
|
||||
const struct crypt_params_reencrypt *params);
|
||||
|
||||
@@ -605,7 +605,7 @@ int LUKS2_keyslot_open(struct crypt_device *cd,
|
||||
return r;
|
||||
}
|
||||
|
||||
int LUKS2_keyslot_reencrypt_create(struct crypt_device *cd,
|
||||
int LUKS2_keyslot_reencrypt_allocate(struct crypt_device *cd,
|
||||
struct luks2_hdr *hdr,
|
||||
int keyslot,
|
||||
const struct crypt_params_reencrypt *params)
|
||||
@@ -634,9 +634,6 @@ int LUKS2_keyslot_reencrypt_create(struct crypt_device *cd,
|
||||
return r;
|
||||
}
|
||||
|
||||
if (LUKS2_hdr_validate(cd, hdr->jobj, hdr->hdr_size - LUKS2_HDR_BIN_LEN))
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -2474,7 +2474,7 @@ static int reencrypt_init(struct crypt_device *cd,
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = LUKS2_keyslot_reencrypt_create(cd, hdr, reencrypt_keyslot,
|
||||
r = LUKS2_keyslot_reencrypt_allocate(cd, hdr, reencrypt_keyslot,
|
||||
params);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user