]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: systemd-cryptenroll: unlock volume with keyfile 24138/head
authorJan B <git@keksgesicht.net>
Wed, 27 Jul 2022 20:10:07 +0000 (22:10 +0200)
committerJan B <git@keksgesicht.net>
Thu, 11 Aug 2022 10:32:52 +0000 (12:32 +0200)
test/units/testsuite-70.sh

index 6ebb1c72c959df391e9a7a5da50773b04f36b8cf..fdd24e2862556abf9e09264284060eea6511813e 100755 (executable)
@@ -11,6 +11,9 @@ dd if=/dev/zero of=$img bs=1024k count=20 status=none
 echo -n passphrase >/tmp/passphrase
 cryptsetup luksFormat -q --pbkdf pbkdf2 --pbkdf-force-iterations 1000 --use-urandom $img /tmp/passphrase
 
+# Unlocking via keyfile
+systemd-cryptenroll --unlock-key-file=/tmp/passphrase --tpm2-device=auto $img
+
 # Enroll unlock with default PCR policy
 env PASSWORD=passphrase systemd-cryptenroll --tpm2-device=auto $img
 /usr/lib/systemd/systemd-cryptsetup attach test-volume $img - tpm2-device=auto,headless=1