From 7b0be541a994c3cb109f671632c24140edc715ae Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 4 Dec 2024 11:02:33 +0100 Subject: [PATCH] w32: Introduce Registry key GNUPG_ASSUME_COMPLIANCE. * common/compliance.c (get_assumed_de_vs_compliance): Also consider a registry entry. -- On Windows it is easier to set the registry key than to use an envvar. --- common/compliance.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/compliance.c b/common/compliance.c index f37f5a013..6c271c199 100644 --- a/common/compliance.c +++ b/common/compliance.c @@ -61,6 +61,18 @@ get_assumed_de_vs_compliance (void) { const char *s = getenv ("GNUPG_ASSUME_COMPLIANCE"); value = (s && !strcmp (s, "de-vs")); +#ifdef HAVE_W32_SYSTEM + if (!value) + { + char *tmp; + tmp = read_w32_registry_string (NULL, + gnupg_registry_dir (), + "GNUPG_ASSUME_COMPLIANCE"); + if (tmp && !strcmp (tmp, "de-vs")) + value = 1; + xfree (tmp); + } +#endif /* W32 */ } return value > 0; #endif