aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-06-27 22:53:09 +0000
committerDavid Shaw <[email protected]>2004-06-27 22:53:09 +0000
commitaf77fd89fa74b9482c5ea7eae39bdfd8471aea93 (patch)
tree9e42c6cc88ba8c9582bae84fd30be7ad2fbd7bca
parent* mainproc.c (proc_symkey_enc), seckey-cert.c (do_check): Check the S2K (diff)
downloadgnupg-af77fd89fa74b9482c5ea7eae39bdfd8471aea93.tar.gz
gnupg-af77fd89fa74b9482c5ea7eae39bdfd8471aea93.zip
* sign.c (sign_symencrypt_file): Allow using --force-mdc in --sign
--symmetric messages.
-rw-r--r--g10/ChangeLog3
-rw-r--r--g10/sign.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 5e3e2bb81..82dcd3804 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,5 +1,8 @@
2004-06-27 David Shaw <[email protected]>
+ * sign.c (sign_symencrypt_file): Allow using --force-mdc in --sign
+ --symmetric messages.
+
* mainproc.c (proc_symkey_enc), seckey-cert.c (do_check): Check
the S2K hash algorithm before we try to generate a passphrase
using it. This prevents hitting BUG() when generating a
diff --git a/g10/sign.c b/g10/sign.c
index 25f08faf4..86a524b2b 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1064,6 +1064,13 @@ sign_symencrypt_file (const char *fname, STRLIST locusr)
goto leave;
}
+ /* We have no way to tell if the recipient can handle messages
+ with an MDC, so this defaults to no. Perhaps in a few years,
+ this can be defaulted to yes. Note that like regular
+ encrypting, --force-mdc overrides --disable-mdc. */
+ if(opt.force_mdc)
+ cfx.dek->use_mdc=1;
+
/* now create the outfile */
rc = open_outfile (fname, opt.armor? 1:0, &out);
if (rc)