aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Kozina <okozina@redhat.com>2023-10-18 15:02:06 +0200
committerOndrej Kozina <okozina@redhat.com>2023-10-18 15:02:09 +0200
commit385c0afebe833754dc663e68aab310be7cb1fcb3 (patch)
tree1812676fdaa9379707a16693af719c3f3682d130
parent1f007061d6131feb6a9472bd7f03821fb1ebc5e7 (diff)
downloadcryptsetup-385c0afebe833754dc663e68aab310be7cb1fcb3.tar.gz
Fix tests in FIPS mode.
In FIPS mode, if test passphrase is shorter than 8 bytes, keyslot passphrase check routine returns different error code (-EINVAL) than expected (-EPERM).
-rwxr-xr-xtests/compat-test22
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/compat-test2 b/tests/compat-test2
index 223d8c32..2c026f47 100755
--- a/tests/compat-test2
+++ b/tests/compat-test2
@@ -1043,7 +1043,7 @@ if [ $HAVE_KEYRING -gt 0 -a -d /proc/sys/kernel/keys ]; then
# token 3 assigned to keyslot 1 (wrong passphrase)
echo "$PWD3" | $CRYPTSETUP luksAddKey -q -S1 $FAST_PBKDF_OPT --token-id 0 $LOOPDEV || fail
$CRYPTSETUP token add $LOOPDEV --key-description $TEST_TOKEN2 -S1 --token-id 3 || fail
- load_key user $TEST_TOKEN2 "blabla" "$TEST_KEYRING" || fail "Cannot load 32 byte user key type"
+ load_key user $TEST_TOKEN2 "$PWDW" "$TEST_KEYRING" || fail "Cannot load 32 byte user key type"
# specific token, specific keyslot
$CRYPTSETUP open --test-passphrase --token-id 0 -S0 $LOOPDEV --token-only <&- || fail