summaryrefslogtreecommitdiffstats
path: root/g10/encrypt.c
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 /g10/encrypt.c
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 'g10/encrypt.c')
-rw-r--r--g10/encrypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/encrypt.c b/g10/encrypt.c
index e2e1c05da..8bdbe8c2d 100644
--- a/g10/encrypt.c
+++ b/g10/encrypt.c
@@ -101,8 +101,8 @@ encrypt_seskey (DEK *dek, DEK **seskey, byte *enckey)
/* We try very hard to use a MDC */
-static int
-use_mdc(PK_LIST pk_list,int algo)
+int
+use_mdc (pk_list_t pk_list,int algo)
{
/* RFC-2440 don't has MDC */
if (RFC2440)