1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg: New option --require-compliance.

* g10/options.h (opt): Add field flags.require_compliance.
* g10/gpg.c (oRequireCompliance): New.
(opts): Add --require-compliance.
(main): Set option.
* g10/mainproc.c (proc_encrypted): Emit error if non de-vs compliant.
(check_sig_and_print): Ditto.
* g10/encrypt.c (encrypt_crypt): Ditto.
--

Note that in the --encrypt and --verify cased other checks may kick in
earlier than this new --require-compliance controlled one.
This commit is contained in:
Werner Koch 2022-03-08 10:13:44 +01:00
parent c11292fe73
commit 17890d4318
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
5 changed files with 67 additions and 6 deletions

View file

@ -430,6 +430,7 @@ enum cmd_and_opt_values
oNoIncludeKeyBlock,
oForceSignKey,
oForbidGenKey,
oRequireCompliance,
oNoop
};
@ -890,6 +891,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_s (oXauthority, "xauthority", "@"),
ARGPARSE_s_n (oNoAutostart, "no-autostart", "@"),
ARGPARSE_s_n (oForbidGenKey, "forbid-gen-key", "@"),
ARGPARSE_s_n (oRequireCompliance, "require-compliance", "@"),
/* Options which can be used in special circumstances. They are not
* published and we hope they are never required. */
ARGPARSE_s_n (oUseOnlyOpenPGPCard, "use-only-openpgp-card", "@"),
@ -3596,6 +3598,10 @@ main (int argc, char **argv)
mopt.forbid_gen_key = 1;
break;
case oRequireCompliance:
opt.flags.require_compliance = 1;
break;
case oNoop: break;
default: