summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Toorop <willem@nlnetlabs.nl>2014-08-25 13:36:08 +0200
committerWillem Toorop <willem@nlnetlabs.nl>2014-08-25 13:36:08 +0200
commitcd93274e01236f5acff27b8dd655006a31498dd7 (patch)
tree625c06246032d2ce0d59ba0f884d89726836a8da
parent14625f4313d6443fcd4cb48190ccb38ee01b6429 (diff)
downloadldns-cd93274e01236f5acff27b8dd655006a31498dd7.tar.gz
CDNSKEY and OPENPGPKEY draft rr types
-rw-r--r--Changelog2
-rw-r--r--configure.ac16
-rw-r--r--ldns/rr.h6
-rw-r--r--rr.c15
4 files changed, 38 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index b43ad596..cff2794e 100644
--- a/Changelog
+++ b/Changelog
@@ -16,6 +16,8 @@ TBD
* Fix configure to make ldns compile with LibreSSL 2.0
* drill now also accepts dig style -y option
(-y <[algo:]name:key> i.s.o. -y <name:key[:algo]>)
+ * CDNSKEY and OPENPGPKEY draft rr types.
+ enable with: --enable-rrtype-cdnskey and --enable-rrtype-openpgpkey
1.6.17 2014-01-10
* Fix ldns_dnssec_zone_new_frm_fp_l to allow the last parsed line of a
diff --git a/configure.ac b/configure.ac
index 8c3f217a..eaff025a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -400,6 +400,22 @@ case "$enable_rrtype_cds" in
no|*)
;;
esac
+AC_ARG_ENABLE(rrtype-cdnskey, AC_HELP_STRING([--enable-rrtype-cdnskey], [Enable draft RR type cdnskey.]))
+case "$enable_rrtype_cdnskey" in
+ yes)
+ AC_DEFINE_UNQUOTED([RRTYPE_CDNSKEY], [], [Define this to enable RR type CDNSKEY.])
+ ;;
+ no|*)
+ ;;
+esac
+AC_ARG_ENABLE(rrtype-openpgpkey, AC_HELP_STRING([--enable-rrtype-openpgpkey], [Enable draft RR type openpgpkey.]))
+case "$enable_rrtype_openpgpkey" in
+ yes)
+ AC_DEFINE_UNQUOTED([RRTYPE_OPENPGPKEY], [], [Define this to enable RR type OPENPGPKEY.])
+ ;;
+ no|*)
+ ;;
+esac
AC_ARG_ENABLE(rrtype-uri, AC_HELP_STRING([--enable-rrtype-uri], [Enable draft RR type uri.]))
case "$enable_rrtype_uri" in
yes)
diff --git a/ldns/rr.h b/ldns/rr.h
index ff499395..6dcce80b 100644
--- a/ldns/rr.h
+++ b/ldns/rr.h
@@ -189,8 +189,12 @@ enum ldns_enum_rr_type
LDNS_RR_TYPE_RKEY = 57,
/** draft-ietf-dnsop-trust-history */
LDNS_RR_TYPE_TALINK = 58,
- /** draft-barwood-dnsop-ds-publis */
+ /** draft-ietf-dnsop-delegation-trust-maintainance */
LDNS_RR_TYPE_CDS = 59,
+ /** draft-ietf-dnsop-delegation-trust-maintainance */
+ LDNS_RR_TYPE_CDNSKEY = 60,
+ /** draft-ietf-dane-openpgpkey */
+ LDNS_RR_TYPE_OPENPGPKEY = 61,
LDNS_RR_TYPE_SPF = 99, /* RFC 4408 */
diff --git a/rr.c b/rr.c
index d51c4af2..67686133 100644
--- a/rr.c
+++ b/rr.c
@@ -1943,6 +1943,9 @@ static const ldns_rdf_type type_dhcid_wireformat[] = {
static const ldns_rdf_type type_talink_wireformat[] = {
LDNS_RDF_TYPE_DNAME, LDNS_RDF_TYPE_DNAME
};
+static const ldns_rdf_type type_openpgpkey_wireformat[] = {
+ LDNS_RDF_TYPE_B64
+};
/* nsec3 is some vars, followed by same type of data of nsec */
static const ldns_rdf_type type_nsec3_wireformat[] = {
/* LDNS_RDF_TYPE_NSEC3_VARS, LDNS_RDF_TYPE_NSEC3_NEXT_OWNER, LDNS_RDF_TYPE_NSEC*/
@@ -2171,8 +2174,20 @@ static ldns_rr_descriptor rdata_field_descriptors[] = {
{LDNS_RR_TYPE_NULL, "TYPE59", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
#endif
+#ifdef RRTYPE_CDNSKEY
+ /* 60 */
+ {LDNS_RR_TYPE_CDNSKEY, "CDNSKEY", 4, 4, type_dnskey_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
+#else
{LDNS_RR_TYPE_NULL, "TYPE60", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
+#endif
+
+#ifdef RRTYPE_OPENPGPKEY
+ /* 61 */
+ {LDNS_RR_TYPE_OPENPGPKEY, "OPENPGPKEY", 1, 1, type_openpgpkey_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
+#else
{LDNS_RR_TYPE_NULL, "TYPE61", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
+#endif
+
{LDNS_RR_TYPE_NULL, "TYPE62", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
{LDNS_RR_TYPE_NULL, "TYPE63", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
{LDNS_RR_TYPE_NULL, "TYPE64", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },