mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-22 04:25:12 +00:00
add argon2 kdf test
This commit is contained in:
parent
ef1541f7a2
commit
11a5776456
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
export test_description="Testing tomb with KDF key"
|
export test_description="Testing tomb with KDF keys"
|
||||||
|
|
||||||
source ./setup
|
source ./setup
|
||||||
|
|
||||||
@ -28,4 +28,31 @@ if test_have_prereq KDF; then
|
|||||||
'
|
'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# clean to avoid overwrite errors
|
||||||
|
# rm -f "$tomb_key" "$tomb"
|
||||||
|
|
||||||
|
if test_have_prereq ARGON2; then
|
||||||
|
test_export "argon2"
|
||||||
|
test_expect_success 'Testing KDF ARGON2: tomb creation' '
|
||||||
|
tt_dig -s 20 &&
|
||||||
|
tt_forge --tomb-pwd $DUMMYPASS --kdftype argon2 --kdfmem 18 --kdf 1 &&
|
||||||
|
print $DUMMYPASS \
|
||||||
|
| gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key \
|
||||||
|
| xxd &&
|
||||||
|
tt_lock --tomb-pwd $DUMMYPASS --kdf 1
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'Testing KDF ARGON2: tomb passwd' '
|
||||||
|
tt passwd -k $tomb_key --kdf 1 \
|
||||||
|
--unsafe --tomb-old-pwd $DUMMYPASS --tomb-pwd $DUMMYPASSNEW &&
|
||||||
|
tt passwd -k $tomb_key --kdf 1 \
|
||||||
|
--unsafe --tomb-old-pwd $DUMMYPASSNEW --tomb-pwd $DUMMYPASS
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'Testing KDF ARGON2: tomb open & close' '
|
||||||
|
tt_open --tomb-pwd $DUMMYPASS --kdf 1 &&
|
||||||
|
tt_close
|
||||||
|
'
|
||||||
|
fi
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -58,6 +58,7 @@ command -v decloakify > /dev/null && test_set_prereq DECLOAKIFY
|
|||||||
command -v sphinx > /dev/null && test_set_prereq SPHINX
|
command -v sphinx > /dev/null && test_set_prereq SPHINX
|
||||||
command -v oracle > /dev/null && test_set_prereq ORACLE
|
command -v oracle > /dev/null && test_set_prereq ORACLE
|
||||||
command -v doas > /dev/null && test_set_prereq DOAS
|
command -v doas > /dev/null && test_set_prereq DOAS
|
||||||
|
command -v argon2 > /dev/null && test_set_prereq ARGON2
|
||||||
|
|
||||||
|
|
||||||
# GnuPG config
|
# GnuPG config
|
||||||
|
Loading…
Reference in New Issue
Block a user