aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2006-02-24 14:27:22 +0000
committerDavid Shaw <[email protected]>2006-02-24 14:27:22 +0000
commitf4f5ea43e76fff8941a8148e70f237b7c4033b41 (patch)
treec9bde0dd601fb120ca0b4b81ff279a318cb42b52 /g10/gpg.c
parent* keyserver.c (parse_keyserver_options): Only change max_cert if it is (diff)
downloadgnupg-f4f5ea43e76fff8941a8148e70f237b7c4033b41.tar.gz
gnupg-f4f5ea43e76fff8941a8148e70f237b7c4033b41.zip
* keydb.h, getkey.c (release_akl), gpg.c (main): Add
--no-auto-key-locate. * options.h, gpg.c (main): Keep track of each keyserver registered so we can match on them later. * keyserver-internal.h, keyserver.c (cmp_keyserver_spec, keyserver_match), gpgv.c: New. Find a keyserver that matches ours and return its spec. * getkey.c (get_pubkey_byname): Use it here to get the per-keyserver options from an earlier keyserver.
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c33
1 files changed, 23 insertions, 10 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index a3557e7ff..03440538f 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1,6 +1,6 @@
/* gpg.c - The GnuPG utility (main for gpg)
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- * 2005 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ * 2006 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -361,6 +361,7 @@ enum cmd_and_opt_values
oRequireBacksigs,
oNoRequireBacksigs,
oAutoKeyLocate,
+ oNoAutoKeyLocate,
oNoop
};
@@ -698,15 +699,16 @@ static ARGPARSE_OPTS opts[] = {
#if defined(ENABLE_CARD_SUPPORT) && defined(HAVE_LIBUSB)
{ oDebugCCIDDriver, "debug-ccid-driver", 0, "@"},
#endif
- /* These are aliases to help users of the PGP command line product
- use gpg with minimal pain. Many commands are common already as
- they seem to have borrowed commands from us. Now I'm returning
- the favor. */
+ /* These two are aliases to help users of the PGP command line
+ product use gpg with minimal pain. Many commands are common
+ already as they seem to have borrowed commands from us. Now
+ I'm returning the favor. */
{ oLocalUser, "sign-with", 2, "@" },
{ oRecipient, "user", 2, "@" },
{ oRequireBacksigs, "require-backsigs", 0, "@"},
{ oNoRequireBacksigs, "no-require-backsigs", 0, "@"},
{ oAutoKeyLocate, "auto-key-locate", 2, "@"},
+ { oNoAutoKeyLocate, "no-auto-key-locate", 0, "@"},
{0,NULL,0,NULL}
};
@@ -2416,10 +2418,18 @@ main (int argc, char **argv )
#endif /* __riscos__ */
break;
case oKeyServer:
- opt.keyserver=parse_keyserver_uri(pargs.r.ret_str,0,
- configname,configlineno);
- if(!opt.keyserver)
- log_error(_("could not parse keyserver URL\n"));
+ {
+ struct keyserver_spec *keyserver;
+ keyserver=parse_keyserver_uri(pargs.r.ret_str,0,
+ configname,configlineno);
+ if(!keyserver)
+ log_error(_("could not parse keyserver URL\n"));
+ else
+ {
+ keyserver->next=opt.keyserver;
+ opt.keyserver=keyserver;
+ }
+ }
break;
case oKeyServerOptions:
if(!parse_keyserver_options(pargs.r.ret_str))
@@ -2655,6 +2665,9 @@ main (int argc, char **argv )
log_error(_("invalid auto-key-locate list\n"));
}
break;
+ case oNoAutoKeyLocate:
+ release_akl();
+ break;
case oNoop: break;