File Coverage

lib/Crypt/Perl/X509/Extension/policyConstraints.pm
Criterion Covered Total %
statement 22 22 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 1 0.0
total 30 31 96.7


line stmt bran cond sub pod time code
1             package Crypt::Perl::X509::Extension::policyConstraints;
2              
3 1     1   836 use strict;
  1         2  
  1         30  
4 1     1   5 use warnings;
  1         2  
  1         40  
5              
6             =encoding utf-8
7              
8             =head1 NAME
9              
10             Crypt::Perl::X509::Extension::policyConstraints
11              
12             =head1 SYNOPSIS
13              
14             my $usage_obj = Crypt::Perl::X509::Extension::policyConstraints->new(
15             requireExplicitPolicy => 4,
16             inhibitPolicyMapping => 6,
17             );
18              
19             =head1 SEE ALSO
20              
21             L
22              
23             =cut
24              
25 1     1   5 use parent qw( Crypt::Perl::X509::Extension );
  1         2  
  1         8  
26              
27 1     1   68 use constant OID => '2.5.29.36';
  1         1  
  1         90  
28              
29 1     1   6 use constant CRITICAL => 1;
  1         2  
  1         65  
30              
31 1     1   7 use constant ASN1 => <
  1         2  
  1         134  
32             SkipCerts ::= INTEGER
33              
34             policyConstraints ::= SEQUENCE {
35             requireExplicitPolicy [0] SkipCerts OPTIONAL,
36             inhibitPolicyMapping [1] SkipCerts OPTIONAL
37             }
38             END
39              
40             sub new {
41 6     6 0 41 my ($class, %opts) = @_;
42              
43 6         31 return bless \%opts, $class;
44             }
45              
46             sub _encode_params {
47 6     6   17 my ($self) = @_;
48              
49 6         31 return { %$self };
50             }
51              
52             1;