1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-21 14:47:03 +01:00

* sign.c (sign_symencrypt_file): Allow using --force-mdc in --sign

--symmetric messages.
This commit is contained in:
David Shaw 2004-06-27 22:53:09 +00:00
parent eb5045d972
commit af77fd89fa
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2004-06-27 David Shaw <dshaw@jabberwocky.com> 2004-06-27 David Shaw <dshaw@jabberwocky.com>
* sign.c (sign_symencrypt_file): Allow using --force-mdc in --sign
--symmetric messages.
* mainproc.c (proc_symkey_enc), seckey-cert.c (do_check): Check * mainproc.c (proc_symkey_enc), seckey-cert.c (do_check): Check
the S2K hash algorithm before we try to generate a passphrase the S2K hash algorithm before we try to generate a passphrase
using it. This prevents hitting BUG() when generating a using it. This prevents hitting BUG() when generating a

View File

@ -1064,6 +1064,13 @@ sign_symencrypt_file (const char *fname, STRLIST locusr)
goto leave; 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 */ /* now create the outfile */
rc = open_outfile (fname, opt.armor? 1:0, &out); rc = open_outfile (fname, opt.armor? 1:0, &out);
if (rc) if (rc)