mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
tests: Add some more gpgtar tests.
* tests/openpgp/gpgtar.test: Add more tests. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
ee0fb42cd1
commit
1c8eae95a8
@ -25,6 +25,8 @@ TESTFILES="$plain_files $data_files"
|
|||||||
TESTDIR=gpgtar.d
|
TESTDIR=gpgtar.d
|
||||||
FILELIST="${TESTDIR}/filelist"
|
FILELIST="${TESTDIR}/filelist"
|
||||||
PPFILE="${TESTDIR}/passphrase"
|
PPFILE="${TESTDIR}/passphrase"
|
||||||
|
PPFLAGS="--gpg-args --passphrase-file=$PPFILE"
|
||||||
|
|
||||||
GPG=../../g10/gpg2
|
GPG=../../g10/gpg2
|
||||||
GPGARGS="$opt_always --no-permission-warning"
|
GPGARGS="$opt_always --no-permission-warning"
|
||||||
|
|
||||||
@ -73,25 +75,44 @@ do_test()
|
|||||||
for TOOL in "$GPGTAR" "$GPGZIP"
|
for TOOL in "$GPGTAR" "$GPGZIP"
|
||||||
#for TOOL in "$GPGZIP"
|
#for TOOL in "$GPGZIP"
|
||||||
do
|
do
|
||||||
|
# Asymmetric encryption.
|
||||||
do_test "$TOOL" \
|
do_test "$TOOL" \
|
||||||
"--encrypt --recipient $usrname2" \
|
"--encrypt --recipient $usrname2" \
|
||||||
"--list-archive" \
|
"--list-archive" \
|
||||||
"--decrypt"
|
"--decrypt"
|
||||||
|
|
||||||
|
# Asymmetric encryption and signing.
|
||||||
do_test "$TOOL" \
|
do_test "$TOOL" \
|
||||||
"--encrypt --recipient $usrname2 --sign --local-user $usrname3" \
|
"--encrypt --recipient $usrname2 --sign --local-user $usrname3" \
|
||||||
"--list-archive" \
|
"--list-archive" \
|
||||||
"--decrypt"
|
"--decrypt"
|
||||||
|
|
||||||
|
# Signing only.
|
||||||
do_test "$TOOL" \
|
do_test "$TOOL" \
|
||||||
"--sign --local-user $usrname3" \
|
"--sign --local-user $usrname3" \
|
||||||
"--list-archive" \
|
"--list-archive" \
|
||||||
"--decrypt"
|
"--decrypt"
|
||||||
|
|
||||||
|
# Symmetric encryption.
|
||||||
do_test "$TOOL" \
|
do_test "$TOOL" \
|
||||||
"--gpg-args --passphrase-file=$PPFILE --symmetric" \
|
"${PPFLAGS} --symmetric" \
|
||||||
"--gpg-args --passphrase-file=$PPFILE --list-archive" \
|
"${PPFLAGS} --list-archive" \
|
||||||
"--gpg-args --passphrase-file=$PPFILE --decrypt"
|
"${PPFLAGS} --decrypt"
|
||||||
|
|
||||||
|
# Symmetric encryption, explicitly choose cipher.
|
||||||
|
for a in `all_cipher_algos`; do
|
||||||
|
do_test "$TOOL" \
|
||||||
|
"${PPFLAGS} --gpg-args --cipher=$a --symmetric" \
|
||||||
|
"${PPFLAGS} --list-archive" \
|
||||||
|
"${PPFLAGS} --decrypt"
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
# Asymmetric and symmetric encryption, and signing.
|
||||||
|
do_test "$TOOL" \
|
||||||
|
"${PPFLAGS} --encrypt --symmetric --recipient $usrname2 --sign --local-user $usrname3" \
|
||||||
|
"${PPFLAGS} --list-archive" \
|
||||||
|
"${PPFLAGS} --decrypt"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Success!
|
# Success!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user