line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::OPENPGPKEY; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
46
|
|
5
|
|
|
|
|
|
|
our $VERSION = (qw$Id: OPENPGPKEY.pm 1896 2023-01-30 12:59:25Z willem $)[2]; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
13
|
use base qw(Net::DNS::RR); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
88
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::DNS::RR::OPENPGPKEY - DNS OPENPGPKEY resource record |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
8
|
use integer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
35
|
use MIME::Base64; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
404
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _decode_rdata { ## decode rdata from wire-format octet string |
22
|
1
|
|
|
1
|
|
2
|
my ( $self, $data, $offset ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
2
|
my $length = $self->{rdlength}; |
25
|
1
|
|
|
|
|
3
|
$self->keybin( substr $$data, $offset, $length ); |
26
|
1
|
|
|
|
|
2
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _encode_rdata { ## encode rdata as wire-format octet string |
31
|
5
|
|
|
5
|
|
8
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
5
|
|
|
|
|
9
|
return pack 'a*', $self->keybin; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _format_rdata { ## format rdata portion of RR string. |
38
|
3
|
|
|
3
|
|
5
|
my $self = shift; |
39
|
|
|
|
|
|
|
|
40
|
3
|
|
|
|
|
5
|
my @base64 = split /\s+/, encode_base64( $self->keybin ); |
41
|
3
|
|
|
|
|
13
|
return @base64; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub _parse_rdata { ## populate RR from rdata in argument list |
46
|
2
|
|
|
2
|
|
5
|
my ( $self, @argument ) = @_; |
47
|
|
|
|
|
|
|
|
48
|
2
|
|
|
|
|
6
|
$self->key(@argument); |
49
|
2
|
|
|
|
|
5
|
return; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub key { |
54
|
5
|
|
|
5
|
1
|
17
|
my ( $self, @value ) = @_; |
55
|
5
|
100
|
|
|
|
16
|
return MIME::Base64::encode( $self->keybin(), "" ) unless scalar @value; |
56
|
3
|
|
|
|
|
18
|
return $self->keybin( MIME::Base64::decode( join "", @value ) ); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub keybin { |
61
|
16
|
|
|
16
|
1
|
673
|
my ( $self, @value ) = @_; |
62
|
16
|
|
|
|
|
30
|
for (@value) { $self->{keybin} = $_ } |
|
4
|
|
|
|
|
8
|
|
63
|
16
|
|
100
|
|
|
94
|
return $self->{keybin} || ""; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
__END__ |