line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::X509::Extension::basicConstraints; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
778
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=encoding utf-8 |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Crypt::Perl::X509::Extension::basicConstraints |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
5
|
use parent qw( Crypt::Perl::X509::Extension ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
34
|
use Crypt::Perl::X (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
4
|
use constant OID => '2.5.29.19'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
86
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
5
|
use constant ASN1 => <
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
157
|
|
21
|
|
|
|
|
|
|
basicConstraints ::= SEQUENCE { |
22
|
|
|
|
|
|
|
cA BOOLEAN, |
23
|
|
|
|
|
|
|
pathLenConstraint INTEGER OPTIONAL |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
END |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new { |
28
|
6
|
|
|
6
|
0
|
25
|
my ($class, $ca_yn, $pl_constraint) = @_; |
29
|
|
|
|
|
|
|
|
30
|
6
|
|
|
|
|
56
|
return bless { _ca => $ca_yn, _pl_constraint => $pl_constraint }, $class; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _encode_params { |
34
|
6
|
|
|
6
|
|
17
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
my $data = { |
37
|
|
|
|
|
|
|
cA => $self->{'_ca'} ? 1 : 0, |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
( defined $self->{'_pl_constraint'} |
40
|
6
|
50
|
|
|
|
42
|
? ( pathLenConstraint => $self->{'_pl_constraint'} ) |
|
|
50
|
|
|
|
|
|
41
|
|
|
|
|
|
|
: () |
42
|
|
|
|
|
|
|
), |
43
|
|
|
|
|
|
|
}; |
44
|
|
|
|
|
|
|
|
45
|
6
|
|
|
|
|
22
|
return $data; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |