summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJan B <git@keksgesicht.net>2022-07-27 22:10:07 +0200
committerJan B <git@keksgesicht.net>2022-08-11 12:32:52 +0200
commit7fd55538aa4d227709b5dc9c3460b54675b45ee1 (patch)
treec8f6a06091de58d86022366f3a6531e8f429dc14 /test
parent1f4190244bc4134919dcf7c29428029a74755e61 (diff)
downloadsystemd-7fd55538aa4d227709b5dc9c3460b54675b45ee1.tar.gz
tests: systemd-cryptenroll: unlock volume with keyfile
Diffstat (limited to 'test')
-rwxr-xr-xtest/units/testsuite-70.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/units/testsuite-70.sh b/test/units/testsuite-70.sh
index 6ebb1c72c9..fdd24e2862 100755
--- a/test/units/testsuite-70.sh
+++ b/test/units/testsuite-70.sh
@@ -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