summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2015-12-01 12:01:12 +0100
committerJustus Winter <justus@g10code.com>2015-12-04 12:52:40 +0100
commit582e684a48eb4f3716cecf7dc73eb93046efcfad (patch)
treecff3e4c97fb5e661a5c44dfb5d0cf7bd8937f26e /tests
parenttools/gpgtar: Implement signing. (diff)
downloadgnupg2-582e684a48eb4f3716cecf7dc73eb93046efcfad.tar.xz
gnupg2-582e684a48eb4f3716cecf7dc73eb93046efcfad.zip
tools/gpgtar: Implement symmetric encryption.
* tests/openpgp/gpgtar.test: Add test case. * tools/gpgtar-create.c (gpgtar_create): Pass '--symmetric' flag to gpg. * tools/gpgtar.c (parse_arguments): We do handle the argument now. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/openpgp/gpgtar.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/openpgp/gpgtar.test b/tests/openpgp/gpgtar.test
index f71a88381..124ba404c 100755
--- a/tests/openpgp/gpgtar.test
+++ b/tests/openpgp/gpgtar.test
@@ -24,6 +24,7 @@ TESTFILES="$plain_files $data_files"
TESTDIR=gpgtar.d
FILELIST="${TESTDIR}/filelist"
+PPFILE="${TESTDIR}/passphrase"
GPG=../../g10/gpg2
GPGARGS="$opt_always --no-permission-warning"
@@ -46,6 +47,7 @@ do_test()
rm -rf -- "${TESTDIR}"
mkdir "${TESTDIR}"
+ echo frob >"$PPFILE"
$TOOL --gpg "$GPG" --gpg-args "$GPGARGS" $CREATE_FLAGS \
--output "${TESTDIR}/test.tar.pgp" $TESTFILES
@@ -69,6 +71,7 @@ do_test()
}
for TOOL in "$GPGTAR" "$GPGZIP"
+#for TOOL in "$GPGZIP"
do
do_test "$TOOL" \
"--encrypt --recipient $usrname2" \
@@ -84,6 +87,11 @@ do
"--sign --local-user $usrname3" \
"--list-archive" \
"--decrypt"
+
+ do_test "$TOOL" \
+ "--gpg-args --passphrase-file=$PPFILE --symmetric" \
+ "--gpg-args --passphrase-file=$PPFILE --list-archive" \
+ "--gpg-args --passphrase-file=$PPFILE --decrypt"
done
# Success!