diff options
author | Werner Koch <[email protected]> | 2011-11-24 14:48:24 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2011-11-24 15:15:08 +0000 |
commit | 231d27e0fec905be52d679961332947c3331f15f (patch) | |
tree | d04cff926996d2be6b1a58c3d696ab3f75fc97c6 /dirmngr/ks-engine-hkp.c | |
parent | Updated the German translation. (diff) | |
download | gnupg-231d27e0fec905be52d679961332947c3331f15f.tar.gz gnupg-231d27e0fec905be52d679961332947c3331f15f.zip |
Make HKP keyserver engine work again.
We had some debug code here which prevented it from working.
The host selection code still needs a review!
* ks-engine-http.c (ks_http_help): Do not print help for hkp.
* ks-engine-hkp.c (ks_hkp_help): Print help only for hkp.
(send_request): Remove test code.
(map_host): Use xtrymalloc.
* certcache.c (classify_pattern): Remove unused variable and make
explicit substring search work.
Diffstat (limited to '')
-rw-r--r-- | dirmngr/ks-engine-hkp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c index d4a12111b..98187ab01 100644 --- a/dirmngr/ks-engine-hkp.c +++ b/dirmngr/ks-engine-hkp.c @@ -209,7 +209,7 @@ map_host (const char *name) int refidx; reftblsize = 100; - reftbl = xmalloc (reftblsize * sizeof *reftbl); + reftbl = xtrymalloc (reftblsize * sizeof *reftbl); if (!reftbl) return NULL; refidx = 0; @@ -280,7 +280,7 @@ map_host (const char *name) else { if (ai->ai_family == AF_INET) - hosttable[tmpidx]->v4 = 1; + hosttable[tmpidx]->v4 = 1; if (ai->ai_family == AF_INET6) hosttable[tmpidx]->v6 = 1; @@ -409,7 +409,7 @@ ks_hkp_help (ctrl_t ctrl, parsed_uri_t uri) if (!uri) err = ks_print_help (ctrl, " hkp"); - else if (uri->is_http) + else if (uri->is_http && !strcmp (uri->scheme, "hkp")) err = ks_print_help (ctrl, data); else err = 0; @@ -472,7 +472,7 @@ send_request (ctrl_t ctrl, const char *request, const char *hostportstr, char *request_buffer = NULL; *r_fp = NULL; - return gpg_error (GPG_ERR_NOT_SUPPORTED); + once_more: err = http_open (&http, post_cb? HTTP_REQ_POST : HTTP_REQ_GET, |