diff options
author | Werner Koch <wk@gnupg.org> | 2015-10-12 09:31:44 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-10-12 09:31:44 +0200 |
commit | 4584125802be11833a5b289e864b45eedc2b45fd (patch) | |
tree | c9c1196c84f70b0bfc69a50adfe216da06c30408 /tests | |
parent | Post release updates. (diff) | |
download | gnupg2-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-x | tests/openpgp/conventional-mdc.test | 11 |
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 |