Skip to content

Commit e66b88d

Browse files
test: define the key size for our tests (latchset#320)
Older cryptsetup had a different default value for the key size, e.g. 256, whereas newer ones have changed it to 512. Let's specify the key size when creating our LUKS devices for the tests, to make the devices more similar even when running in older versions of cryptsetup. We now use 512 as the key size for our test devices.
1 parent 4600bd6 commit e66b88d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/luks/tests/tests-common-functions.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ new_device() {
6464

6565
fallocate -l64M "${DEV}"
6666
cryptsetup luksFormat --type "${LUKS}" --pbkdf pbkdf2 \
67-
--pbkdf-force-iterations 1000 --batch-mode \
67+
--pbkdf-force-iterations 1000 --key-size 512 --batch-mode \
6868
--force-password "${DEV}" <<< "${PASS}"
6969
# Caching the just-formatted device for possible reuse.
7070
cp -f "${DEV}" "${DEV_CACHED}"
@@ -88,7 +88,7 @@ new_device_keyfile() {
8888

8989
fallocate -l64M "${DEV}"
9090
cryptsetup luksFormat --type "${LUKS}" --pbkdf pbkdf2 \
91-
--pbkdf-force-iterations 1000 --batch-mode \
91+
--pbkdf-force-iterations 1000 --key-size 512 --batch-mode \
9292
"${DEV}" "${KEYFILE}"
9393
}
9494

0 commit comments

Comments
 (0)