1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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.
This commit is contained in:
Werner Koch 2024-12-04 11:02:33 +01:00
parent 7b0d49785d
commit 7b0be541a9
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -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