1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-02-12 18:23:04 +01:00

gpg: --compliance={pgp7, pgp8} also now restore default options

* g10/gpg.c (set_compliance_option): oPGP7 and oPGP8 both restore
policy-relevant default options before setting the compliance flag.

--

With this change, any ordering of --compliance options will always
result in the options selected from the last option given.

GnuPG-bug-id: 7501
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
Daniel Kahn Gillmor via Gnupg-devel 2025-01-31 12:37:18 -05:00 committed by Werner Koch
parent 0bdf585993
commit 04d58ff847
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -2317,8 +2317,14 @@ set_compliance_option (enum cmd_and_opt_values option)
opt.s2k_cipher_algo = CIPHER_ALGO_3DES; opt.s2k_cipher_algo = CIPHER_ALGO_3DES;
opt.flags.allow_old_cipher_algos = 1; opt.flags.allow_old_cipher_algos = 1;
break; break;
case oPGP7: opt.compliance = CO_PGP7; break; case oPGP7:
case oPGP8: opt.compliance = CO_PGP8; break; set_compliance_option (oGnuPG);
opt.compliance = CO_PGP7;
break;
case oPGP8:
set_compliance_option (oGnuPG);
opt.compliance = CO_PGP8;
break;
case oGnuPG: case oGnuPG:
/* set up default options affected by policy compliance: */ /* set up default options affected by policy compliance: */
opt.compliance = CO_GNUPG; opt.compliance = CO_GNUPG;