mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
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).
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user