| 1 |
package DNS::LDNS::DNSSecDataChain; |
| 2 |
|
| 3 |
use 5.008008; |
| 4 |
use strict; |
| 5 |
use warnings; |
| 6 |
|
| 7 |
use DNS::LDNS; |
| 8 |
|
| 9 |
our $VERSION = '0.61'; |
| 10 |
|
| 11 |
sub rrset { |
| 12 |
my $self = shift; |
| 13 |
return DNS::LDNS::GC::own($self->_rrset, $self); |
| 14 |
} |
| 15 |
|
| 16 |
sub signatures { |
| 17 |
my $self = shift; |
| 18 |
return DNS::LDNS::GC::own($self->_signatures, $self); |
| 19 |
} |
| 20 |
|
| 21 |
sub parent { |
| 22 |
my $self = shift; |
| 23 |
return DNS::LDNS::GC::own($self->_parent, $self); |
| 24 |
} |
| 25 |
|
| 26 |
sub derive_trust_tree { |
| 27 |
my ($self, $rr) = @_; |
| 28 |
|
| 29 |
if (!DNS::LDNS::GC::is_owned($rr) or DNS::LDNS::GC::owner($rr) ne $self) { |
| 30 |
die "The rr ($rr) must be in the data chain ($self)"; |
| 31 |
} |
| 32 |
return DNS::LDNS::GC::own($self->_derive_trust_tree($rr), $self); |
| 33 |
} |
| 34 |
|
| 35 |
sub derive_trust_tree_time { |
| 36 |
my ($self, $rr, $checktime) = @_; |
| 37 |
|
| 38 |
if (!DNS::LDNS::GC::is_owned($rr) or DNS::LDNS::GC::owner($rr) ne $self) { |
| 39 |
die "The rr ($rr) must be in the data chain ($self)"; |
| 40 |
} |
| 41 |
return DNS::LDNS::GC::own( |
| 42 |
$self->_derive_trust_tree_time($rr, $checktime), $self); |
| 43 |
} |
| 44 |
|
| 45 |
|
| 46 |
1; |
| 47 |
__END__ |
| 48 |
|
| 49 |
=head1 NAME |
| 50 |
|
| 51 |
DNS::LDNS::DNSSecDataChain - DNSSec data chain element |
| 52 |
|
| 53 |
=head1 SYNOPSIS |
| 54 |
|
| 55 |
use DNS::LDNS ':all' |
| 56 |
|
| 57 |
chain = new DNS::LDNS::DNSSecDataChain |
| 58 |
chain->print(fp) |
| 59 |
chain->derive_trust_tree(rr) |
| 60 |
chain->derive_trust_tree_time(rr, checktime) |
| 61 |
|
| 62 |
# Node attributes |
| 63 |
rrset = chain->rrset |
| 64 |
rrset = chain->signatures |
| 65 |
rrtype = chain->parent_type |
| 66 |
pchain = chain->parent |
| 67 |
rcode = chain->packet_rcode |
| 68 |
rrtype = chain->packet_qtype |
| 69 |
bool = chain->packet_nodata |
| 70 |
|
| 71 |
=head1 SEE ALSO |
| 72 |
|
| 73 |
http://www.nlnetlabs.nl/projects/ldns |
| 74 |
|
| 75 |
=head1 AUTHOR |
| 76 |
|
| 77 |
Erik Pihl Ostlyngen, E<lt>[email protected]<gt> |
| 78 |
|
| 79 |
=head1 COPYRIGHT AND LICENSE |
| 80 |
|
| 81 |
Copyright (C) 2013 by UNINETT Norid AS |
| 82 |
|
| 83 |
This library is free software; you can redistribute it and/or modify |
| 84 |
it under the same terms as Perl itself, either Perl version 5.14.2 or, |
| 85 |
at your option, any later version of Perl 5 you may have available. |
| 86 |
|
| 87 |
=cut |