aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-10-21 08:29:02 +0000
committerWerner Koch <[email protected]>2015-10-21 08:29:02 +0000
commit5055b617a94587580bc16a56bb82333077b05693 (patch)
tree30dd680f2f7a97e6e934594e6fd5e05be365a4e4
parentcommon: Add status code for use by g13. (diff)
downloadgnupg-5055b617a94587580bc16a56bb82333077b05693.tar.gz
gnupg-5055b617a94587580bc16a56bb82333077b05693.zip
dirmngr: Rename file dns-cert.c.
* dirmngr/dns-cert.c: Rename to dirmngr/dns-stuff.c. * dirmngr/dns-cert.h: Rename to dirmngr/dns-stuff.h and change includers. * dirmngr/t-dns-cert.c: Rename to dirmngr/t-dns-stuff.c. * dirmngr/Makefile.am: Adjust. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--dirmngr/Makefile.am8
-rw-r--r--dirmngr/dns-stuff.c (renamed from dirmngr/dns-cert.c)7
-rw-r--r--dirmngr/dns-stuff.h (renamed from dirmngr/dns-cert.h)13
-rw-r--r--dirmngr/server.c2
-rw-r--r--dirmngr/t-dns-stuff.c (renamed from dirmngr/t-dns-cert.c)7
5 files changed, 22 insertions, 15 deletions
diff --git a/dirmngr/Makefile.am b/dirmngr/Makefile.am
index ae16660e7..8cb1bb761 100644
--- a/dirmngr/Makefile.am
+++ b/dirmngr/Makefile.am
@@ -61,7 +61,7 @@ dirmngr_SOURCES = dirmngr.c dirmngr.h server.c crlcache.c crlfetch.c \
certcache.c certcache.h \
cdb.h cdblib.c misc.c dirmngr-err.h \
ocsp.c ocsp.h validate.c validate.h \
- dns-cert.c dns-cert.h \
+ dns-stuff.c dns-stuff.h \
http.c http.h \
ks-action.c ks-action.h ks-engine.h \
ks-engine-hkp.c ks-engine-http.c ks-engine-finger.c ks-engine-kdns.c
@@ -114,7 +114,7 @@ t_common_ldadd = $(libcommon) no-libgcrypt.o $(LIBASSUAN_LIBS) \
$(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) \
$(DNSLIBS) $(LIBINTL) $(LIBICONV)
-module_tests = t-dns-cert
+module_tests = t-dns-stuff
if USE_LDAP
module_tests += t-ldap-parse-uri
@@ -141,7 +141,7 @@ t_ldap_parse_uri_SOURCES = \
t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd)
-t_dns_cert_SOURCES = t-dns-cert.c dns-cert.c
-t_dns_cert_LDADD = $(t_common_ldadd)
+t_dns_stuff_SOURCES = t-dns-stuff.c dns-stuff.c
+t_dns_stuff_LDADD = $(t_common_ldadd)
$(PROGRAMS) : $(libcommon) $(libcommonpth)
diff --git a/dirmngr/dns-cert.c b/dirmngr/dns-stuff.c
index 712dfc017..c2d40c9ad 100644
--- a/dirmngr/dns-cert.c
+++ b/dirmngr/dns-stuff.c
@@ -1,7 +1,8 @@
-/* dns-cert.c - DNS CERT code (rfc-4398)
+/* dns-stuff.c - DNS related code including CERT RR (rfc-4398)
* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2006, 2009, 2015 Werner Koch
*
- * This file is part of GNUPG.
+ * This file is part of GnuPG.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either
@@ -48,7 +49,7 @@
#include "util.h"
#include "host2net.h"
-#include "dns-cert.h"
+#include "dns-stuff.h"
/* Not every installation has gotten around to supporting CERTs
yet... */
diff --git a/dirmngr/dns-cert.h b/dirmngr/dns-stuff.h
index e5cd4eb84..aea0e69f6 100644
--- a/dirmngr/dns-cert.h
+++ b/dirmngr/dns-stuff.h
@@ -1,5 +1,6 @@
-/* dns-cert.h - DNS CERT definition
+/* dns-stuff.c - DNS related code including CERT RR (rfc-4398)
* Copyright (C) 2006 Free Software Foundation, Inc.
+ * Copyright (C) 2006, 2015 Werner Koch
*
* This file is part of GnuPG.
*
@@ -26,8 +27,8 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GNUPG_DIRMNGR_DNS_CERT_H
-#define GNUPG_DIRMNGR_DNS_CERT_H
+#ifndef GNUPG_DIRMNGR_DNS_STUFF_H
+#define GNUPG_DIRMNGR_DNS_STUFF_H
#define DNS_CERTTYPE_ANY 0 /* Internal catch all type. */
@@ -47,7 +48,11 @@
#define DNS_CERTTYPE_RRBASE 1024 /* Base of special constants. */
#define DNS_CERTTYPE_RR61 (DNS_CERTTYPE_RRBASE + 61)
+/* Calling this function switches the DNS code into Tor mode if
+ possibe. Return 0 on success. */
gpg_error_t enable_dns_tormode (void);
+
+/* Return a CERT record or an arbitray RR. */
gpg_error_t get_dns_cert (const char *name, int want_certtype,
void **r_key, size_t *r_keylen,
unsigned char **r_fpr, size_t *r_fprlen,
@@ -55,4 +60,4 @@ gpg_error_t get_dns_cert (const char *name, int want_certtype,
-#endif /*GNUPG_DIRMNGR_DNS_CERT_H*/
+#endif /*GNUPG_DIRMNGR_DNS_STUFF_H*/
diff --git a/dirmngr/server.c b/dirmngr/server.c
index f6225d438..23ecdd8b9 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -50,7 +50,7 @@
#if USE_LDAP
# include "ldap-parse-uri.h"
#endif
-#include "dns-cert.h"
+#include "dns-stuff.h"
#include "mbox-util.h"
/* To avoid DoS attacks we limit the size of a certificate to
diff --git a/dirmngr/t-dns-cert.c b/dirmngr/t-dns-stuff.c
index 61536c566..e34f80971 100644
--- a/dirmngr/t-dns-cert.c
+++ b/dirmngr/t-dns-stuff.c
@@ -1,5 +1,6 @@
-/* t-dns-cert.c - Module test for dns-cert.c
+/* t-dns-cert.c - Module test for dns-stuff.c
* Copyright (C) 2011 Free Software Foundation, Inc.
+ * Copyright (C) 2011, 2015 Werner Koch
*
* This file is part of GnuPG.
*
@@ -23,7 +24,7 @@
#include <assert.h>
#include "util.h"
-#include "dns-cert.h"
+#include "dns-stuff.h"
int
@@ -49,7 +50,7 @@ main (int argc, char **argv)
name = *argv;
else
{
- fputs ("usage: t-dns-cert [name]\n", stderr);
+ fputs ("usage: t-dns-stuff [name]\n", stderr);
return 1;
}