summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-10-12 09:31:44 +0200
committerWerner Koch <wk@gnupg.org>2015-10-12 09:31:44 +0200
commit4584125802be11833a5b289e864b45eedc2b45fd (patch)
treec9c1196c84f70b0bfc69a50adfe216da06c30408 /tests
parentPost release updates. (diff)
downloadgnupg2-4584125802be11833a5b289e864b45eedc2b45fd.tar.xz
gnupg2-4584125802be11833a5b289e864b45eedc2b45fd.zip
gpg: Try hard to use MDC also for sign+symenc.
* g10/encrypt.c (use_mdc): Make it a global func. * g10/sign.c (sign_symencrypt_file): Use that function to decide whether to use an MDC. * tests/openpgp/conventional-mdc.test: Add a simple test case. -- We used --force-mdc in sign+symenc mode (-cs) only with --force-mdc. That broke our assumption from commit 625e292 (GnuPG 2.1.9) that all uses of modern ciphers are using MDC. Reported-by: Ben Kibbey <bjk@luxsci.net> Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/openpgp/conventional-mdc.test11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/openpgp/conventional-mdc.test b/tests/openpgp/conventional-mdc.test
index 744e11ef3..031fc0e12 100755
--- a/tests/openpgp/conventional-mdc.test
+++ b/tests/openpgp/conventional-mdc.test
@@ -31,5 +31,14 @@ for ciph in `all_cipher_algos`; do
cmp z y || error "$ciph/$i: mismatch"
done
done
-
progress_end
+
+#info Checking sign+symencrypt
+for i in $plain_files $data_files; do
+ echo "Hier spricht HAL" | $GPG --passphrase-fd 0 $s2k -cs -o x --yes $i
+ echo "Hier spricht HAL" | $GPG --passphrase-fd 0 $s2k -o y --yes x
+ cmp $i y || error "$i: mismatch in sign+symenc"
+done
+
+
+# eof