line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::X509::GeneralNames; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
1354
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
110
|
|
4
|
4
|
|
|
4
|
|
15
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
100
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
17
|
use parent qw( Crypt::Perl::ASN1::Encodee ); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
17
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
1488
|
use Crypt::Perl::X509::GeneralName (); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
128
|
|
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
4
|
|
19
|
use constant ASN1 => Crypt::Perl::X509::GeneralName::ASN1() . <
|
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
718
|
|
11
|
|
|
|
|
|
|
GeneralNames ::= SEQUENCE OF ANY -- GeneralName |
12
|
|
|
|
|
|
|
END |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
54
|
|
|
54
|
0
|
5647
|
my ($class, @type_vals) = @_; |
16
|
|
|
|
|
|
|
|
17
|
54
|
|
|
|
|
123
|
my @sequence; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Accept either pairs of two-member arrays (new, preferred format) |
20
|
|
|
|
|
|
|
# or flat key/value pairs. |
21
|
54
|
|
|
|
|
180
|
while (@type_vals) { |
22
|
96
|
100
|
|
|
|
337
|
if ('ARRAY' eq ref $type_vals[0]) { |
|
|
50
|
|
|
|
|
|
23
|
94
|
|
|
|
|
278
|
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
|
|
|
|
|
300
|
return bless \@sequence, $class; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _encode_params { |
34
|
55
|
|
|
55
|
|
200
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
|
36
|
55
|
|
|
|
|
179
|
my @params = @$self; |
37
|
55
|
|
|
|
|
531
|
$_ = Crypt::Perl::X509::GeneralName->new(@$_) for @params; |
38
|
|
|
|
|
|
|
|
39
|
55
|
|
|
|
|
176
|
return [ map { $_->encode() } @params ]; |
|
98
|
|
|
|
|
4532
|
|
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |