Skip to content

Commit 6277b14

Browse files
jhcloosmind04
authored andcommitted
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>
1 parent 5ed07a4 commit 6277b14

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

pdns/dnsrecords.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ boilerplate_conv(TLSA, 52,
284284
conv.xfrHexBlob(d_cert, true);
285285
)
286286

287+
boilerplate_conv(OPENPGPKEY, 61,
288+
conv.xfrHexBlob(d_cert, true);
289+
)
290+
287291
#undef DS
288292
DSRecordContent::DSRecordContent() : DNSRecordContent(43) {}
289293
boilerplate_conv(DS, 43,
@@ -525,6 +529,7 @@ void reportOtherTypes()
525529
NSEC3RecordContent::report();
526530
NSEC3PARAMRecordContent::report();
527531
TLSARecordContent::report();
532+
OPENPGPKEYRecordContent::report();
528533
DLVRecordContent::report();
529534
DNSRecordContent::regist(QClass::ANY, QType::TSIG, &TSIGRecordContent::make, &TSIGRecordContent::make, "TSIG");
530535
DNSRecordContent::regist(QClass::ANY, QType::TKEY, &TKEYRecordContent::make, &TKEYRecordContent::make, "TKEY");

pdns/dnsrecords.hh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,15 @@ private:
348348
string d_cert;
349349
};
350350

351+
class OPENPGPKEYRecordContent : public DNSRecordContent
352+
{
353+
public:
354+
includeboilerplate(OPENPGPKEY)
355+
356+
private:
357+
string d_cert;
358+
};
359+
351360

352361
class RRSIGRecordContent : public DNSRecordContent
353362
{

pdns/qtype.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public:
8282
#undef DS
8383
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,
8484
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,
85-
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;
85+
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;
8686
typedef pair<string,uint16_t> namenum;
8787
static vector<namenum> names;
8888

@@ -153,6 +153,7 @@ private:
153153
qtype_insert("NSEC3", 50);
154154
qtype_insert("NSEC3PARAM", 51);
155155
qtype_insert("TLSA", 52);
156+
qtype_insert("OPENPGPKEY", 61);
156157
qtype_insert("SPF", 99);
157158
qtype_insert("EUI48", 108);
158159
qtype_insert("EUI64", 109);

0 commit comments

Comments
 (0)