dirmngr: Implement a getnameinfo wrapper.
authorWerner Koch <wk@gnupg.org>
Sat, 24 Oct 2015 14:27:47 +0000 (16:27 +0200)
committerWerner Koch <wk@gnupg.org>
Sun, 25 Oct 2015 15:47:11 +0000 (16:47 +0100)
commit816505958ac4308ee0dfe787d1b706982428b6cc
tree5e30e1463c53d988ba5b698d8d179628b5a5401d
parent7f65e84ac035e8f7a25639a6b09eb6000115e337
dirmngr: Implement a getnameinfo wrapper.

* dirmngr/dns-stuff.h (DNS_NUMERICHOST): New.
(DNS_WITHBRACKET): New.
* dirmngr/dns-stuff.c (resolve_name_standard): Factor code out to...
(map_eai_to_gpg_error): new.
(resolve_addr_standard): New.
(resolve_dns_addr): New.

* dirmngr/ks-engine-hkp.c (is_ip_address): Move to ...
* dirmngr/dns-stuff.c (is_ip_address): here.  Add support for non
bracketed v6 addresses.

* dirmngr/t-dns-stuff.c: Remove header netdb.h.
(main): Add option --bracket.  Use resolve_dns_name instead of
getnameinfo.

Signed-off-by: Werner Koch <wk@gnupg.org>
dirmngr/dns-stuff.c
dirmngr/dns-stuff.h
dirmngr/ks-engine-hkp.c
dirmngr/t-dns-stuff.c