Permalink
Browse files

Add support for OPENPGPKEY RRTYPE.

OPENPGPKEY is defined in draft-ietf-dane-openpgpkey.

The IANA has assigned RRTYPE 61.

Its content is a single binary blob, its presentation is a single hex blob.

Thanks to Aki Tuomi, JP Mens and Peter van Dijk for bug reports and insights.

Signed-off-by: James Cloos <cloos@jhcloos.com>
  • Loading branch information...
1 parent 5ed07a4 commit 6277b14282d863999c8a2a4c237165aeeb051313 @jhcloos jhcloos committed with mind04 Mar 13, 2015
Showing with 16 additions and 1 deletion.
  1. +5 −0 pdns/dnsrecords.cc
  2. +9 −0 pdns/dnsrecords.hh
  3. +2 −1 pdns/qtype.hh
View
@@ -284,6 +284,10 @@ boilerplate_conv(TLSA, 52,
conv.xfrHexBlob(d_cert, true);
)
+boilerplate_conv(OPENPGPKEY, 61,
+ conv.xfrHexBlob(d_cert, true);
+ )
+
#undef DS
DSRecordContent::DSRecordContent() : DNSRecordContent(43) {}
boilerplate_conv(DS, 43,
@@ -525,6 +529,7 @@ void reportOtherTypes()
NSEC3RecordContent::report();
NSEC3PARAMRecordContent::report();
TLSARecordContent::report();
+ OPENPGPKEYRecordContent::report();
DLVRecordContent::report();
DNSRecordContent::regist(QClass::ANY, QType::TSIG, &TSIGRecordContent::make, &TSIGRecordContent::make, "TSIG");
DNSRecordContent::regist(QClass::ANY, QType::TKEY, &TKEYRecordContent::make, &TKEYRecordContent::make, "TKEY");
View
@@ -348,6 +348,15 @@ private:
string d_cert;
};
+class OPENPGPKEYRecordContent : public DNSRecordContent
+{
+public:
+ includeboilerplate(OPENPGPKEY)
+
+private:
+ string d_cert;
+};
+
class RRSIGRecordContent : public DNSRecordContent
{
View
@@ -82,7 +82,7 @@ public:
#undef DS
enum typeenum {A=1, NS=2, CNAME=5, SOA=6, MR=9, PTR=12, HINFO=13, MX=15, TXT=16, RP=17, AFSDB=18, SIG=24, KEY=25, AAAA=28, LOC=29, SRV=33, NAPTR=35, KX=36,
CERT=37, A6=38, DNAME=39, OPT=41, DS=43, SSHFP=44, IPSECKEY=45, RRSIG=46, NSEC=47, DNSKEY=48, DHCID=49, NSEC3=50, NSEC3PARAM=51,
- TLSA=52, SPF=99, EUI48=108, EUI64=109, TKEY=249, TSIG=250, IXFR=251, AXFR=252, MAILB=253, MAILA=254, ANY=255, URL=256, MBOXFW=257, CURL=258, ADDR=259, DLV=32769} types;
+ TLSA=52, OPENPGPKEY=61, SPF=99, EUI48=108, EUI64=109, TKEY=249, TSIG=250, IXFR=251, AXFR=252, MAILB=253, MAILA=254, ANY=255, URL=256, MBOXFW=257, CURL=258, ADDR=259, DLV=32769} types;
typedef pair<string,uint16_t> namenum;
static vector<namenum> names;
@@ -153,6 +153,7 @@ private:
qtype_insert("NSEC3", 50);
qtype_insert("NSEC3PARAM", 51);
qtype_insert("TLSA", 52);
+ qtype_insert("OPENPGPKEY", 61);
qtype_insert("SPF", 99);
qtype_insert("EUI48", 108);
qtype_insert("EUI64", 109);

0 comments on commit 6277b14

Please sign in to comment.