gpg: Print better diagnostics for keyserver operations.
authorWerner Koch <wk@gnupg.org>
Wed, 18 Feb 2015 11:14:22 +0000 (12:14 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 18 Feb 2015 11:14:22 +0000 (12:14 +0100)
commit0c3d7645dfad9968d0128fb35a304881121ec61b
tree04e7dc34730535b263e779f0bf04a32ad0868e5a
parentcb2ee2dc50ae2f15022db38214bd820dbea93aaa
gpg: Print better diagnostics for keyserver operations.

* g10/armor.c (parse_key_failed_line): New.
(check_input): Watch out for gpgkeys_ error lines.
* g10/filter.h (armor_filter_context_t): Add field key_failed_code.
* g10/import.c (import): Add arg r_gpgkeys_err.
(import_keys_internal): Ditto.
(import_keys_stream): Ditto.
* g10/keyserver.c (keyserver_errstr): New.
(keyserver_spawn): Detect "KEY " lines while sending.  Get gpgkeys_err
while receiving keys.
(keyserver_work): Add kludge for better error messages.
--

GnuPG-bug-id: 1832

Note that these changes can be backported to 1.4 but they don't make
sense for 2.1 due to the removal of the keyserver helpers.  The error
reporting could be improved even more but given that this is an old
GnuPG branch it is not justified to put too much effort into it.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/armor.c
g10/filter.h
g10/import.c
g10/keyserver.c
g10/main.h