Why can't gpg check GNUPGHOME on Windows by default?
Jared Robinson
jrobinson at airswitch.net
Wed Aug 1 16:49:01 CEST 2001
I already posted this once, but got no responses. Here goes again.
Why can't the windows version of GPG check the GNUPGHOME environment
variable like it does on UNIX -- before it looks in the registry for its
home directory? It is much easier to set an environment variable than
to set a registry key. This behavior makes it easier for an external
program to call gpg/gpgv with a custom home directory.
I have included the patch. One could do the same thing for gpgv.c as
well.
************************************************************************
diff -urN g10.c.original g10.c
--- g10.c.orig Wed Aug 1 07:35:21 2001
+++ g10.c Wed Aug 1 07:38:18 2001
@@ -651,13 +651,16 @@
opt.max_cert_depth = 5;
opt.pgp2_workarounds = 1;
opt.auto_key_retrieve = 1;
- #ifdef __MINGW32__
- opt.homedir = read_w32_registry_string( NULL,
"Software\\GNU\\GnuPG", "HomeDir" );
- #else
opt.homedir = getenv("GNUPGHOME");
- #endif
if( !opt.homedir || !*opt.homedir ) {
- opt.homedir = GNUPG_HOMEDIR;
+ #ifdef __MINGW32__
+ opt.homedir = read_w32_registry_string( NULL,
"Software\\GNU\\GnuPG", "HomeDir" );
+ if( !opt.homedir || !*opt.homedir ) {
+ opt.homedir = GNUPG_HOMEDIR;
+ }
+ #else
+ opt.homedir = GNUPG_HOMEDIR;
+ #endif
}
/* check whether we have a config file on the commandline */
************************************************************************
- Jared Robinson
jared_robinson at email.com
More information about the Gnupg-devel
mailing list