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