lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 595a19a3ef729b2f6622df6b192c03869471a530
parent 9a4b0a076c0c0f0b35b4a0a4a1562c2c55741990
Author: Sean Enck <sean@ttypty.com>
Date:   Sat, 17 Sep 2022 12:29:02 -0400

tests for multiple algorithms

Diffstat:
Mtests/Makefile | 7+++++--
Mtests/run.sh | 7++++++-
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile @@ -1,6 +1,9 @@ BUILD := DATA := bin +ALGOS := secretbox aesgcm -all: - ./run.sh $(BUILD) $(DATA) +all: $(ALGOS) + +$(ALGOS): + ./run.sh $(BUILD) $(DATA) $@ diff -u $(DATA)/actual.log expected.log diff --git a/tests/run.sh b/tests/run.sh @@ -9,6 +9,7 @@ export LOCKBOX_TOTP="totp" export LOCKBOX_INTERACTIVE="no" export LOCKBOX_HOOKDIR="$TESTS/hooks" export LOCKBOX_GIT="no" +export LOCKBOX_ALGORITHM="$3" rm -rf $TESTS mkdir -p $LOCKBOX_STORE @@ -59,4 +60,8 @@ _run() { _hook > $HOOK chmod 755 $HOOK -_run 2>&1 | sed "s#$LOCKBOX_STORE##g" > $TESTS/actual.log +LOG=$TESTS/actual.log +_run 2>&1 | sed "s#$LOCKBOX_STORE##g" > $LOG +if [[ "$3" != "secretbox" ]]; then + sed -i 's/cipher: message authentication failed/decrypt not ok/g' $LOG +fi