diff options
author | Mukund Sivaraman <muks@isc.org> | 2014-01-14 05:06:57 +0100 |
---|---|---|
committer | Mukund Sivaraman <muks@isc.org> | 2014-01-14 07:51:24 +0100 |
commit | d88bd0463689b5d44ff6617ce080bb75f256bf96 (patch) | |
tree | 4cb403f1d36400db8a9ae912ec57fa8465421d77 /src/lib/util/python | |
parent | [master] Added ChangeLog entry for #3231. (diff) | |
download | kea-d88bd0463689b5d44ff6617ce080bb75f256bf96.tar.xz kea-d88bd0463689b5d44ff6617ce080bb75f256bf96.zip |
[2185] Add support for the TLSA RR type
Diffstat (limited to 'src/lib/util/python')
-rwxr-xr-x | src/lib/util/python/gen_wiredata.py.in | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/lib/util/python/gen_wiredata.py.in b/src/lib/util/python/gen_wiredata.py.in index b3858b6b26..1251f9252e 100755 --- a/src/lib/util/python/gen_wiredata.py.in +++ b/src/lib/util/python/gen_wiredata.py.in @@ -352,7 +352,7 @@ dict_rrtype = { 'none' : 0, 'a' : 1, 'ns' : 2, 'md' : 3, 'mf' : 4, 'cname' : 5, 'srv' : 33, 'naptr' : 35, 'kx' : 36, 'cert' : 37, 'a6' : 38, 'dname' : 39, 'opt' : 41, 'apl' : 42, 'ds' : 43, 'sshfp' : 44, 'ipseckey' : 45, 'rrsig' : 46, 'nsec' : 47, 'dnskey' : 48, - 'dhcid' : 49, 'nsec3' : 50, 'nsec3param' : 51, 'hip' : 55, + 'dhcid' : 49, 'nsec3' : 50, 'nsec3param' : 51, 'tlsa' : 52, 'hip' : 55, 'spf' : 99, 'unspec' : 103, 'tkey' : 249, 'tsig' : 250, 'dlv' : 32769, 'ixfr' : 251, 'axfr' : 252, 'mailb' : 253, 'maila' : 254, 'any' : 255 } @@ -1156,6 +1156,32 @@ class RRSIG(RR): f.write('# Tag=%d Signer=%s and Signature\n' % (self.tag, self.signer)) f.write('%04x %s %s\n' % (self.tag, name_wire, sig_wire)) +class TLSA(RR): + '''Implements rendering TLSA RDATA in the test data format. + + Configurable parameters are as follows (see the description of the + same name of attribute for the default value): + - certificate_usage (int): The certificate usage field value. + - selector (int): The selector field value. + - matching_type (int): The matching type field value. + - certificate_association_data (string): The certificate association data. + ''' + certificate_usage = 0 + selector = 0 + matching_type = 1 + certificate_association_data = 'd2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971' + def dump(self, f): + if self.rdlen is None: + self.rdlen = 2 + (len(self.certificate_association_data) / 2) + else: + self.rdlen = int(self.rdlen) + self.dump_header(f, self.rdlen) + f.write('# CERTIFICATE_USAGE=%d SELECTOR=%d MATCHING_TYPE=%d CERTIFICATE_ASSOCIATION_DATA=%s\n' %\ + (self.certificate_usage, self.selector, self.matching_type,\ + self.certificate_association_data)) + f.write('%02x %02x %02x %s\n' % (self.certificate_usage, self.selector, self.matching_type,\ + self.certificate_association_data)) + class TSIG(RR): '''Implements rendering TSIG RDATA in the test data format. |