gpg: Make --auto-key-retrieve work with dirmngr configured server.
authorWerner Koch <wk@gnupg.org>
Thu, 21 Jan 2016 10:49:27 +0000 (11:49 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 21 Jan 2016 10:49:27 +0000 (11:49 +0100)
commit09117e769a093467cb47154f36d7dda613313e33
tree91337ec1aa1669180aa685660caf247fef6d3fa5
parentbdb61351776c038d668310d9b5e5c32588ef6519
gpg: Make --auto-key-retrieve work with dirmngr configured server.

* g10/call-dirmngr.c (gpg_dirmngr_ks_list): Make R_KEYSERVER optional.
* g10/keyserver.c (keyserver_any_configured): New.
(keyserver_put): Remove arg keyserver because this will always receive
opt.keyserver which is anyway used when connecting dirmngr.  Do not
check opt.keyserver.
(keyserver_import_cert): Replace opt.keyserver by
keyserver_any_configured.
* g10/mainproc.c (check_sig_and_print): Ditto.
* g10/import.c (revocation_present): Ditto.
* g10/getkey.c (get_pubkey_byname): Ditto.
* g10/gpgv.c (keyserver_any_configured): Add stub.
* g10/test-stubs.c (keyserver_any_configured): Add stub.
--

The keyserver should be configured in dirmngr.conf and thus we can't
use opt.keyserver in gpg to decide whether a keyserver has been
configured.

GnuPG-bug-id: 2147
Signed-off-by: Werner Koch <wk@gnupg.org>
g10/call-dirmngr.c
g10/getkey.c
g10/gpgv.c
g10/import.c
g10/keyserver-internal.h
g10/keyserver.c
g10/mainproc.c
g10/test-stubs.c