aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dns-stuff.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-10-26 15:32:03 +0000
committerWerner Koch <[email protected]>2015-10-26 15:34:19 +0000
commit4524a2a3714f263d56bb7db349c169b456994fd9 (patch)
tree42196995be5336dad31f93d87603124a83644a00 /dirmngr/dns-stuff.h
parentdirmngr,w32: Remove gethostbyname hack and make it build again. (diff)
downloadgnupg-4524a2a3714f263d56bb7db349c169b456994fd9.tar.gz
gnupg-4524a2a3714f263d56bb7db349c169b456994fd9.zip
dirmngr: Support Tor hidden services.
* dirmngr/dns-stuff.c (is_onion_address): New. * dirmngr/ks-engine-hkp.c (hostinfo_s): Add field "onion". (map_host): Special case onion addresses. (ks_hkp_print_hosttable): Print an 'O' for an onion address. * dirmngr/http.c (connect_server): Special case onion addresses. -- Note that this requires the latest libassuan from git. Onion addresses are always support regardless of the --use-tor flag. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/dns-stuff.h')
-rw-r--r--dirmngr/dns-stuff.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/dirmngr/dns-stuff.h b/dirmngr/dns-stuff.h
index c3effad83..515a859b1 100644
--- a/dirmngr/dns-stuff.h
+++ b/dirmngr/dns-stuff.h
@@ -110,6 +110,9 @@ gpg_error_t resolve_dns_addr (const struct sockaddr *addr, int addrlen,
/* Return true if NAME is a numerical IP address. */
int is_ip_address (const char *name);
+/* Return true if NAME is an onion address. */
+int is_onion_address (const char *name);
+
/* Get the canonical name for NAME. */
gpg_error_t get_dns_cname (const char *name, char **r_cname);