aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-07-14 13:58:56 +0000
committerWerner Koch <[email protected]>2016-07-14 13:58:56 +0000
commitbe1e4560d5afb99a6a7b7c639cce980006530a9e (patch)
tree0ba98e2dbc56153cb5f6e1c50b2adc259965a40e /dirmngr
parentMerge branch 'master' into STABLE-BRANCH-2-2 (diff)
parentpo: Auto-update translations (diff)
downloadgnupg-be1e4560d5afb99a6a7b7c639cce980006530a9e.tar.gz
gnupg-be1e4560d5afb99a6a7b7c639cce980006530a9e.zip
Merge branch 'master' into STABLE-BRANCH-2-2
Diffstat (limited to 'dirmngr')
-rw-r--r--dirmngr/ks-engine-hkp.c8
-rw-r--r--dirmngr/ks-engine-http.c3
-rw-r--r--dirmngr/server.c9
3 files changed, 10 insertions, 10 deletions
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
index 636eaf781..bcc17504d 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
@@ -1207,12 +1207,16 @@ ks_hkp_search (ctrl_t ctrl, parsed_uri_t uri, const char *pattern,
pattern = fprbuf;
break;
case KEYDB_SEARCH_MODE_FPR16:
- bin2hex (desc.u.fpr, 16, fprbuf);
+ fprbuf[0] = '0';
+ fprbuf[1] = 'x';
+ bin2hex (desc.u.fpr, 16, fprbuf+2);
pattern = fprbuf;
break;
case KEYDB_SEARCH_MODE_FPR20:
case KEYDB_SEARCH_MODE_FPR:
- bin2hex (desc.u.fpr, 20, fprbuf);
+ fprbuf[0] = '0';
+ fprbuf[1] = 'x';
+ bin2hex (desc.u.fpr, 20, fprbuf+2);
pattern = fprbuf;
break;
default:
diff --git a/dirmngr/ks-engine-http.c b/dirmngr/ks-engine-http.c
index 00d0c4b80..adee04f1b 100644
--- a/dirmngr/ks-engine-http.c
+++ b/dirmngr/ks-engine-http.c
@@ -73,6 +73,7 @@ ks_http_fetch (ctrl_t ctrl, const char *url, estream_t *r_fp)
estream_t fp = NULL;
char *request_buffer = NULL;
+ once_more:
/* Note that we only use the system provided certificates with the
* fetch command. */
err = http_session_new (&session, NULL, NULL, HTTP_FLAG_TRUST_SYS);
@@ -81,7 +82,6 @@ ks_http_fetch (ctrl_t ctrl, const char *url, estream_t *r_fp)
http_session_set_log_cb (session, cert_log_cb);
*r_fp = NULL;
- once_more:
err = http_open (&http,
HTTP_REQ_GET,
url,
@@ -146,6 +146,7 @@ ks_http_fetch (ctrl_t ctrl, const char *url, estream_t *r_fp)
url = request_buffer;
http_close (http, 0);
http = NULL;
+ http_session_release (session);
goto once_more;
}
err = gpg_error_from_syserror ();
diff --git a/dirmngr/server.c b/dirmngr/server.c
index d3e57c037..db6f5a8ff 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -274,14 +274,12 @@ strcpy_escaped_plus (char *d, const unsigned char *s)
}
-/* This fucntion returns true if a Tor server is running. The sattus
+/* This function returns true if a Tor server is running. The sattus
is cached for the current conenction. */
static int
is_tor_running (ctrl_t ctrl)
{
-#if ASSUAN_VERSION_NUMBER >= 0x020402
- /* Check whether we can connect to the proxy. We use a
- special feature introduced with libassuan 2.4.2. */
+ /* Check whether we can connect to the proxy. */
if (!ctrl || !ctrl->server_local)
return 0; /* Ooops. */
@@ -300,9 +298,6 @@ is_tor_running (ctrl_t ctrl)
}
}
return (ctrl->server_local->tor_state > 0);
-#else /* Libassuan < 2.4.2 */
- return 0; /* We don't know. */
-#endif
}