1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

dirmngr: Rearrange files to fix de6d831.

* dirmngr/http-common.c: New.
* dirmngr/http-common.h: New.
* dirmngr/Makefile.am (dirmngr_SOURCES): Add them.
(t_http_SOURCES): Add them.
(t_ldap_parse_uri_SOURCES): Add them.
* dirmngr/misc.c (get_default_keyserver): Move to ...
* dirmngr/http-common.c: here.
* dirmngr/http.c: Include http-common.h instead of misc.h.
* dirmngr/http-ntbtls.c: Ditto.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2017-03-02 18:17:58 +01:00
parent de6d8313f6
commit 1890896fe6
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
8 changed files with 81 additions and 31 deletions

View file

@ -30,29 +30,6 @@
#include "util.h"
#include "misc.h"
/* Return a static string with the default keyserver. If NAME_ONLY is
* given only the name part is returned. */
const char *
get_default_keyserver (int name_only)
{
static const char *result;
if (!name_only)
return DIRMNGR_DEFAULT_KEYSERVER;
if (!result)
{
/* Strip the scheme from the constant. */
result = strstr (DIRMNGR_DEFAULT_KEYSERVER, "://");
log_assert (result && strlen (result) > 3);
result += 3;
/* Assert that there is no port given. */
log_assert (strchr (result, ':'));
}
return result;
}
/* Convert the hex encoded STRING back into binary and store the
result into the provided buffer RESULT. The actual size of that