line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::X509::GeneralNames; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
1528
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
135
|
|
4
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
103
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
22
|
use parent qw( Crypt::Perl::ASN1::Encodee ); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
17
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
1824
|
use Crypt::Perl::X509::GeneralName (); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
162
|
|
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
4
|
|
24
|
use constant ASN1 => Crypt::Perl::X509::GeneralName::ASN1() . <
|
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
819
|
|
11
|
|
|
|
|
|
|
GeneralNames ::= SEQUENCE OF ANY -- GeneralName |
12
|
|
|
|
|
|
|
END |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
54
|
|
|
54
|
0
|
6745
|
my ($class, @type_vals) = @_; |
16
|
|
|
|
|
|
|
|
17
|
54
|
|
|
|
|
103
|
my @sequence; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Accept either pairs of two-member arrays (new, preferred format) |
20
|
|
|
|
|
|
|
# or flat key/value pairs. |
21
|
54
|
|
|
|
|
149
|
while (@type_vals) { |
22
|
96
|
100
|
|
|
|
330
|
if ('ARRAY' eq ref $type_vals[0]) { |
|
|
50
|
|
|
|
|
|
23
|
94
|
|
|
|
|
268
|
push @sequence, shift @type_vals; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
elsif ( !ref $type_vals[0] ) { |
26
|
2
|
|
|
|
|
7
|
push @sequence, [ shift(@type_vals) => shift(@type_vals) ]; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
54
|
|
|
|
|
264
|
return bless \@sequence, $class; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _encode_params { |
34
|
55
|
|
|
55
|
|
208
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
|
36
|
55
|
|
|
|
|
196
|
my @params = @$self; |
37
|
55
|
|
|
|
|
436
|
$_ = Crypt::Perl::X509::GeneralName->new(@$_) for @params; |
38
|
|
|
|
|
|
|
|
39
|
55
|
|
|
|
|
179
|
return [ map { $_->encode() } @params ]; |
|
98
|
|
|
|
|
4327
|
|
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |