Blob Blame History Raw
diff -rupN cryptsetup-2.3.3.old/lib/luks2/luks2.h cryptsetup-2.3.3/lib/luks2/luks2.h
--- cryptsetup-2.3.3.old/lib/luks2/luks2.h	2022-01-17 16:17:59.479948764 +0100
+++ cryptsetup-2.3.3/lib/luks2/luks2.h	2022-01-17 16:20:30.466477626 +0100
@@ -284,7 +284,7 @@ int LUKS2_keyslot_reencrypt_store(struct
 	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);
diff -rupN cryptsetup-2.3.3.old/lib/luks2/luks2_keyslot.c cryptsetup-2.3.3/lib/luks2/luks2_keyslot.c
--- cryptsetup-2.3.3.old/lib/luks2/luks2_keyslot.c	2022-01-17 16:17:59.478948761 +0100
+++ cryptsetup-2.3.3/lib/luks2/luks2_keyslot.c	2022-01-17 16:19:00.458162353 +0100
@@ -596,7 +596,7 @@ int LUKS2_keyslot_open(struct crypt_devi
 	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)
@@ -626,9 +626,6 @@ int LUKS2_keyslot_reencrypt_create(struc
 		return r;
 	}
 
-	if (LUKS2_hdr_validate(cd, hdr->jobj, hdr->hdr_size - LUKS2_HDR_BIN_LEN))
-		return -EINVAL;
-
 	return 0;
 }
 
diff -rupN cryptsetup-2.3.3.old/lib/luks2/luks2_reencrypt.c cryptsetup-2.3.3/lib/luks2/luks2_reencrypt.c
--- cryptsetup-2.3.3.old/lib/luks2/luks2_reencrypt.c	2022-01-17 16:17:59.478948761 +0100
+++ cryptsetup-2.3.3/lib/luks2/luks2_reencrypt.c	2022-01-17 16:19:00.459162357 +0100
@@ -2375,7 +2375,7 @@ static int reencrypt_init(struct crypt_d
 			goto err;
 	}
 
-	r = LUKS2_keyslot_reencrypt_create(cd, hdr, reencrypt_keyslot,
+	r = LUKS2_keyslot_reencrypt_allocate(cd, hdr, reencrypt_keyslot,
 					   params);
 	if (r < 0)
 		goto err;