Compare commits
2 Commits
7a3e5e472a
...
fc2031eb7c
Author | SHA1 | Date | |
---|---|---|---|
fc2031eb7c | |||
17ff01d066 |
@ -40,9 +40,9 @@ my %supported_types = (
|
||||
MX => "yes",
|
||||
NS => "yes",
|
||||
PTR => "yes",
|
||||
SSHFP => "not yet implemented",
|
||||
SSHFP => "yes",
|
||||
SRV => "yes",
|
||||
TLSA => "not yet implemented",
|
||||
TLSA => "yes",
|
||||
TXT => "yes",
|
||||
);
|
||||
sub is_unsupported($) {
|
||||
@ -136,6 +136,17 @@ sub format_record($$$$) {
|
||||
$record->{caa_property} = $property;
|
||||
$record->{caa_tag} = $property;
|
||||
$record->{data} = $data;
|
||||
} elsif ($type eq 'SSHFP') {
|
||||
my ($algo, $keytype, $data) = split(/\s+/, $value);
|
||||
$record->{sshfp_type} = $keytype;
|
||||
$record->{sshfp_algorithm} = $algo;
|
||||
$record->{data} = $data;
|
||||
} elsif ($type eq 'TLSA') {
|
||||
my ($usage, $selector, $matching, $data) = split(/\s+/, $value);
|
||||
$record->{tlsa_usage} = $usage;
|
||||
$record->{tlsa_selector} = $selector;
|
||||
$record->{tlsa_matching} = $matching;
|
||||
$record->{data} = $data;
|
||||
}
|
||||
|
||||
return $record;
|
||||
@ -158,6 +169,19 @@ sub reformat_data($$) {
|
||||
$data->{caa_property} || $data->{caa_tag},
|
||||
$data->{data}
|
||||
);
|
||||
} elsif($type eq 'SSHFP') {
|
||||
return sprintf('%d %d %s',
|
||||
$data->{sshfp_algorithm},
|
||||
$data->{sshfp_type},
|
||||
$data->{data},
|
||||
);
|
||||
} elsif($type eq 'TLSA') {
|
||||
return sprintf('%d %d %d %s',
|
||||
$data->{tlsa_usage},
|
||||
$data->{tlsa_selector},
|
||||
$data->{tlsa_matching},
|
||||
$data->{data},
|
||||
);
|
||||
}
|
||||
|
||||
return $data->{data};
|
||||
|
Loading…
x
Reference in New Issue
Block a user