-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extras/tests: add test for argon2 functionality
rename original kdf test accordingly to be pbkdf2 related.
- Loading branch information
Showing
3 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env zsh | ||
|
||
export test_description="Testing tomb with argon2 KDF key" | ||
|
||
source ./setup | ||
|
||
if test_have_prereq ARGON; then | ||
test_export "argon" | ||
test_expect_success 'Testing argon2 KDF: tomb creation' ' | ||
tt_dig -s 20 && | ||
tt_forge --tomb-pwd $DUMMYPASS --kdf argon2 && | ||
print $DUMMYPASS \ | ||
| gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key \ | ||
| xxd && | ||
tt_lock --tomb-pwd $DUMMYPASS | ||
' | ||
|
||
test_expect_success 'Testing argon2 KDF: tomb passwd' ' | ||
tt passwd -k $tomb_key --kdf argon2 \ | ||
--unsafe --tomb-old-pwd $DUMMYPASS --tomb-pwd $DUMMYPASSNEW && | ||
tt passwd -k $tomb_key --kdf argon2 \ | ||
--unsafe --tomb-old-pwd $DUMMYPASSNEW --tomb-pwd $DUMMYPASS | ||
' | ||
|
||
test_expect_success 'Testing argon2 KDF: tomb open & close' ' | ||
tt_open --tomb-pwd $DUMMYPASS && | ||
tt_close | ||
' | ||
fi | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters