mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-18 22:30:07 +01:00
tcryptDump: fix support for --veracrypt-pim
the user provided PIM value was not forwarded to the respective implementation dumping the VeraCrypt header information. extends the tcrypt-compat-test such that tcryptDump is performed on VeraCrypt containers as well.
This commit is contained in:
@@ -446,6 +446,7 @@ static int action_tcryptDump(void)
|
||||
.keyfiles_count = opt_keyfiles_count,
|
||||
.flags = CRYPT_TCRYPT_LEGACY_MODES |
|
||||
(opt_veracrypt ? CRYPT_TCRYPT_VERA_MODES : 0),
|
||||
.veracrypt_pim = (opt_veracrypt_pim > 0) ? opt_veracrypt_pim : 0,
|
||||
};
|
||||
int r;
|
||||
|
||||
|
||||
@@ -73,9 +73,11 @@ export LANG=C
|
||||
[ ! -d $TST_DIR ] && tar xjf $srcdir/tcrypt-images.tar.bz2 --no-same-owner
|
||||
|
||||
echo "HEADER CHECK"
|
||||
for file in $(ls $TST_DIR/[tv]c_*) ; do
|
||||
for file in $(ls $TST_DIR/[t]c_* $TST_DIR/vcpim_*) ; do
|
||||
echo -n " $file"
|
||||
echo $PASSWORD | $CRYPTSETUP tcryptDump --veracrypt $file >/dev/null || fail
|
||||
PIM_OPT=""
|
||||
[[ $file =~ vcpim.* ]] && PIM_OPT="--veracrypt-pim $PIM"
|
||||
echo $PASSWORD | $CRYPTSETUP tcryptDump --veracrypt $PIM_OPT $file >/dev/null || fail
|
||||
echo " [OK]"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user