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