gpg: Only use the last specified keyserver.

* g10/gpg.c (main): Only use the last specified keyserver.

--

Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
Neal H. Walfield 2015-03-28 16:55:10 +01:00
parent bec10ae4b5
commit f26ba14028
1 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,7 @@
/* gpg.c - The GnuPG utility (main for gpg)
* Copyright (C) 1998-2011 Free Software Foundation, Inc.
* Copyright (C) 1997-2014 Werner Koch
* Copyright (C) 2015 g10 Code GmbH
*
* This file is part of GnuPG.
*
@ -2829,7 +2830,13 @@ main (int argc, char **argv)
log_error (_("could not parse keyserver URL\n"));
else
{
keyserver->next = opt.keyserver;
/* We only support a single keyserver. Later ones
override earlier ones. (Since we parse the
config file first and then the command line
arguments, the command line takes
precedence.) */
if (opt.keyserver)
free_keyserver_spec (opt.keyserver);
opt.keyserver = keyserver;
}
}