mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
dirmngr: Print a WARNING status for DNS config problems.
* dirmngr/dirmngr-status.h: New. * dirmngr/dirmngr.h: Include dirmngr-status.h and move some prototypes to that file. * dirmngr/t-support.c: New. * dirmngr/Makefile.am (dirmngr_SOURCES): Add dirmngr-status.h. (t_common_src): Add t-support.c. * dirmngr/server.c (dirmngr_status_printf): Bypass if CTRL is NULL. * dirmngr/dns-stuff.c: Include dirmngr-status.h. (libdns_init): Print WARNING status line. Change call callers to take and pass a CTRL argument. * g10/call-dirmngr.c (ks_status_cb): Print info for new WARNING status. -- To test this you can change RESOLV_CONF_NAME in dns-stuff.c and run gpg --recv-key -v SOMETHING. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
9aa1b368ef
commit
bd4048c533
16 changed files with 196 additions and 93 deletions
|
@ -137,12 +137,14 @@ void reload_dns_stuff (int force);
|
|||
void free_dns_addrinfo (dns_addrinfo_t ai);
|
||||
|
||||
/* Function similar to getaddrinfo. */
|
||||
gpg_error_t resolve_dns_name (const char *name, unsigned short port,
|
||||
gpg_error_t resolve_dns_name (ctrl_t ctrl,
|
||||
const char *name, unsigned short port,
|
||||
int want_family, int want_socktype,
|
||||
dns_addrinfo_t *r_dai, char **r_canonname);
|
||||
|
||||
/* Function similar to getnameinfo. */
|
||||
gpg_error_t resolve_dns_addr (const struct sockaddr_storage *addr, int addrlen,
|
||||
gpg_error_t resolve_dns_addr (ctrl_t ctrl,
|
||||
const struct sockaddr_storage *addr, int addrlen,
|
||||
unsigned int flags, char **r_name);
|
||||
|
||||
/* Return true if NAME is a numerical IP address. */
|
||||
|
@ -152,16 +154,18 @@ int is_ip_address (const char *name);
|
|||
int is_onion_address (const char *name);
|
||||
|
||||
/* Get the canonical name for NAME. */
|
||||
gpg_error_t get_dns_cname (const char *name, char **r_cname);
|
||||
gpg_error_t get_dns_cname (ctrl_t ctrl, const char *name, char **r_cname);
|
||||
|
||||
/* Return a CERT record or an arbitrary RR. */
|
||||
gpg_error_t get_dns_cert (const char *name, int want_certtype,
|
||||
gpg_error_t get_dns_cert (ctrl_t ctrl,
|
||||
const char *name, int want_certtype,
|
||||
void **r_key, size_t *r_keylen,
|
||||
unsigned char **r_fpr, size_t *r_fprlen,
|
||||
char **r_url);
|
||||
|
||||
/* Return an array of SRV records. */
|
||||
gpg_error_t get_dns_srv (const char *name,
|
||||
gpg_error_t get_dns_srv (ctrl_t ctrl,
|
||||
const char *name,
|
||||
const char *service, const char *proto,
|
||||
struct srventry **list, unsigned int *r_count);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue