gpg: Try hard to use MDC also for sign+symenc.
authorWerner Koch <wk@gnupg.org>
Mon, 12 Oct 2015 07:31:44 +0000 (09:31 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 12 Oct 2015 07:31:44 +0000 (09:31 +0200)
commit4584125802be11833a5b289e864b45eedc2b45fd
treec9c1196c84f70b0bfc69a50adfe216da06c30408
parentb0627ec25903f48e4b57eb2c1348507e69a4d6f5
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>
g10/encrypt.c
g10/main.h
g10/sign.c
tests/openpgp/conventional-mdc.test