mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
dirmngr: Do not use a SRV record for HKP if a port was specified.
* dirmngr/http.h (parsed_uri_s): Add field EXPLICIT_PORT. * dirmngr/http.c (do_parse_uri): That it. * dirmngr/ks-engine-hkp.c (map_host): Add arg NO_SRV. (make_host_part): Ditto. (ks_hkp_resolve): Set NO_SRV from EXPLICIT_PORT. (ks_hkp_search): Ditto. (ks_hkp_get): Ditto. (ks_hkp_put): Ditto. -- This implements the behaviour of the keyserver helpers from 1.4 and 2.0. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
2baba11fad
commit
c2cbe2f87c
3 changed files with 40 additions and 28 deletions
|
@ -1169,6 +1169,7 @@ do_parse_uri (parsed_uri_t uri, int only_local_part,
|
|||
uri->opaque = 0;
|
||||
uri->v6lit = 0;
|
||||
uri->onion = 0;
|
||||
uri->explicit_port = 0;
|
||||
|
||||
/* A quick validity check. */
|
||||
if (strspn (p, VALID_URI_CHARS) != n)
|
||||
|
@ -1241,6 +1242,7 @@ do_parse_uri (parsed_uri_t uri, int only_local_part,
|
|||
{
|
||||
*p3++ = '\0';
|
||||
uri->port = atoi (p3);
|
||||
uri->explicit_port = 1;
|
||||
}
|
||||
|
||||
if ((n = remove_escapes (uri->host)) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue