90_setkey.sh (952B)
1 #!/usr/bin/env zsh 2 3 export test_description="Testing set key" 4 5 source ./setup 6 7 test_export "test" # Using already generated tomb 8 test_expect_success 'Testing set key' ' 9 tt forge -k $tomb_key_new --tomb-pwd $DUMMYPASS \ 10 --ignore-swap --unsafe --use-urandom --force && 11 tt setkey -k $tomb_key_new $tomb_key $tomb \ 12 --unsafe --tomb-pwd $DUMMYPASS --tomb-old-pwd $DUMMYPASS && 13 tt open -k $tomb_key_new $tomb \ 14 --unsafe --tomb-pwd $DUMMYPASS && 15 print $DUMMYPASS \ 16 | gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key_new \ 17 | hexdump -C && 18 tt_close 19 ' 20 21 test_export "recipient" # Using already generated tomb 22 test_expect_success 'Testing tomb with GnuPG keys: setkey' ' 23 tt forge $tomb_key_new -g -r $KEY2 --ignore-swap --unsafe --use-urandom && 24 tt setkey -k $tomb_key_new $tomb_key $tomb -g -r $KEY2 && 25 tt open -k $tomb_key_new $tomb -g && 26 tt_close 27 ' 28 29 test_done