1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpg: New option --compatibility-flags

* g10/gpg.c (oCompatibilityFlags): New.
(opts): Add option.
(compatibility_flags): New list.
(main): Set flags and print help.
* g10/options.h (opt): Add field compatibility_flags.
--

No flags are yet defined but it is good to have the framework.
This commit is contained in:
Werner Koch 2022-10-31 15:01:24 +01:00
parent adbe5a35a5
commit 865386c0cf
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 35 additions and 1 deletions

View file

@ -290,6 +290,9 @@ struct
int only_sign_text_ids;
int no_symkey_cache; /* Disable the cache used for --symmetric. */
/* Compatibility flags (COMPAT_FLAG_xxxx). */
unsigned int compat_flags;
} opt;
/* CTRL is used to keep some global variables we currently can't
@ -346,8 +349,11 @@ struct {
EXTERN_UNLESS_MAIN_MODULE int memory_debug_mode;
EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode;
/* Compatibility flags */
/* #define COMPAT_FOO 1 */
/* Compatibility flags. */
/* Compliance test macors. */
#define GNUPG (opt.compliance==CO_GNUPG || opt.compliance==CO_DE_VS)
#define RFC2440 (opt.compliance==CO_RFC2440)
#define RFC4880 (opt.compliance==CO_RFC4880)