« blib/lib/Crypt/Perl/Ed25519/PrivateKey.pm
↑ Summary
lib/Crypt/Perl/X509/RelativeDistinguishedName.pm »
| 1 | package Crypt::Perl::X509::Extension::basicConstraints; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | |||||||||||||||
| 6 | =encoding utf-8 | ||||||||||||||
| 7 | |||||||||||||||
| 8 | =head1 NAME | ||||||||||||||
| 9 | |||||||||||||||
| 10 | Crypt::Perl::X509::Extension::basicConstraints | ||||||||||||||
| 11 | |||||||||||||||
| 12 | =cut | ||||||||||||||
| 13 | |||||||||||||||
| 14 | 1 | ▶ | use parent qw( Crypt::Perl::X509::Extension ); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 15 | |||||||||||||||
| 16 | 1 | ▶ | use Crypt::Perl::X (); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 17 | |||||||||||||||
| 18 | 1 | ▶ | use constant OID => '2.5.29.19'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 19 | |||||||||||||||
| 20 | 1 | ▶ | use constant ASN1 => <<END; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 21 | basicConstraints ::= SEQUENCE { | ||||||||||||||
| 22 | cA BOOLEAN, | ||||||||||||||
| 23 | pathLenConstraint INTEGER OPTIONAL | ||||||||||||||
| 24 | } | ||||||||||||||
| 25 | END | ||||||||||||||
| 26 | |||||||||||||||
| 27 | sub new { | ||||||||||||||
| 28 | 6 | ▶ | my ($class, $ca_yn, $pl_constraint) = @_; | ||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||
| 29 | |||||||||||||||
| 30 | 6 | return bless { _ca => $ca_yn, _pl_constraint => $pl_constraint }, $class; | |||||||||||||
| 31 | } | ||||||||||||||
| 32 | |||||||||||||||
| 33 | sub _encode_params { | ||||||||||||||
| 34 | 6 | ▶ | my ($self) = @_; | ||||||||||||
|
Subroutine
_encode_params: called CC=3 SCAR=11.7
| |||||||||||||||
| 35 | |||||||||||||||
| 36 | my $data = { | ||||||||||||||
| 37 | cA => $self->{'_ca'} ? 1 : 0, | ||||||||||||||
| 38 | |||||||||||||||
| 39 | ( defined $self->{'_pl_constraint'} | ||||||||||||||
| 40 | 6 | ▶ | ? ( pathLenConstraint => $self->{'_pl_constraint'} ) | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 41 | : () | ||||||||||||||
| 42 | ), | ||||||||||||||
| 43 | }; | ||||||||||||||
| 44 | |||||||||||||||
| 45 | 6 | return $data; | |||||||||||||
| 46 | } | ||||||||||||||
| 47 | |||||||||||||||
| 48 | 1 | 1; | |||||||||||||