diff options
author | Neal H. Walfield <[email protected]> | 2015-03-28 15:55:10 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-03-28 15:55:37 +0000 |
commit | f26ba14028d34845ae10aae552b90681907e377d (patch) | |
tree | 4ebc5e70dcd9c54a7aa6ddfd0647b056d64e88a5 | |
parent | dirmngr: Fix resource leaks and check rare errors. (diff) | |
download | gnupg-f26ba14028d34845ae10aae552b90681907e377d.tar.gz gnupg-f26ba14028d34845ae10aae552b90681907e377d.zip |
gpg: Only use the last specified keyserver.
* g10/gpg.c (main): Only use the last specified keyserver.
--
Signed-off-by: Neal H. Walfield <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g10/gpg.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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; } } |