aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/ks-engine-hkp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-01-08 17:04:59 +0000
committerWerner Koch <[email protected]>2017-01-08 17:04:59 +0000
commit16078f3deea5b82ea26e2f01dbd3ef3a5ce25410 (patch)
treea8da190a48cb319aaab1d25a35e0ba060fd51194 /dirmngr/ks-engine-hkp.c
parentdirmngr: Strip root zone suffix from libdns SRV results. (diff)
downloadgnupg-16078f3deea5b82ea26e2f01dbd3ef3a5ce25410.tar.gz
gnupg-16078f3deea5b82ea26e2f01dbd3ef3a5ce25410.zip
dirmngr: Change internal SRV lookup API.
* dirmngr/dns-stuff.c (get_dns_srv): Add args SERVICE and PROTO. * dirmngr/http.c (connect_server): Simplify SRV lookup. * dirmngr/ks-engine-hkp.c (map_host): Ditto. * dirmngr/t-dns-stuff.c (main): Adjust for changed get_dns_srv. -- This new API is more convenient because it includes commonly used code. Note that right now http.c's SRV record code is not used. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/ks-engine-hkp.c')
-rw-r--r--dirmngr/ks-engine-hkp.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
index a6c22f8cd..283e805f0 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
@@ -426,7 +426,6 @@ map_host (ctrl_t ctrl, const char *name, int force_reselect,
int refidx;
int is_pool = 0;
char *cname;
- char *srvrecord;
struct srventry *srvs;
unsigned int srvscount;
@@ -448,16 +447,7 @@ map_host (ctrl_t ctrl, const char *name, int force_reselect,
if (!is_ip_address (name))
{
/* Check for SRV records. */
- srvrecord = xtryasprintf ("_hkp._tcp.%s", name);
- if (srvrecord == NULL)
- {
- err = gpg_error_from_syserror ();
- xfree (reftbl);
- return err;
- }
-
- err = get_dns_srv (srvrecord, &srvs, &srvscount);
- xfree (srvrecord);
+ err = get_dns_srv (name, "hkp", NULL, &srvs, &srvscount);
if (err)
{
xfree (reftbl);