Branch Coverage

blib/lib/Crypt/X509.pm
Criterion Covered Total %
branch 92 150 61.3


line true false branch
100 2 9 if (not defined $parser or $parser->error)
156 0 1 if $v == 0
157 0 1 if $v == 1
158 1 0 if $v == 2
198 0 0 if ($self->{'tbsCertificate'}{'validity'}{'notBefore'}{'utcTime'}) { }
0 0 elsif ($self->{'tbsCertificate'}{'validity'}{'notBefore'}{'generalTime'}) { }
226 2 2 if ($self->{'tbsCertificate'}{'validity'}{'notAfter'}{'utcTime'}) { }
2 0 elsif ($self->{'tbsCertificate'}{'validity'}{'notAfter'}{'generalTime'}) { }
307 2 0 if ($self->PubKeyAlg eq 'RSA') { }
385 12 0 if ($oid2attr{$i->{'type'}}) { }
403 3 11 if ($i->{'type'} eq $oid)
524 12 0 if ($oid2attr{$i->{'type'}}) { }
542 3 12 if ($i->{'type'} eq $oid)
655 0 3 unless (defined $exts)
658 3 2 if ($ext->{'extnID'} eq '2.5.29.15')
661 0 3 if ($parsKeyU->error)
667 3 0 if ($ext->{'critical'})
668 3 0 if ($keyu & 32768)
669 0 3 if ($keyu & 16384)
670 2 1 if ($keyu & 8192)
671 2 1 if ($keyu & 4096)
672 1 2 if ($keyu & 2048)
673 0 3 if ($keyu & 1024)
674 0 3 if ($keyu & 512)
675 0 3 if ($keyu & 256)
676 0 3 if ($keyu & 128)
710 0 2 unless (defined $exts)
713 2 12 if ($ext->{'extnID'} eq '2.5.29.37')
714 1 1 if defined $ext->{'oids'}
717 0 1 if ($parsExtKeyUsage->error)
721 0 2 unless $oid2extkeyusage{$_}
722 0 1 if ($ext->{'critical'})
748 0 1 unless (defined $exts)
751 1 4 if ($ext->{'extnID'} eq '2.5.29.17')
754 0 1 if ($parsSubjAlt->error)
808 2 7 if ($ext->{'extnID'} eq '2.5.29.17')
811 0 2 if ($parsSubjAlt->error)
828 0 7 unless (defined $exts)
830 6 1 if (defined $self->{'tbsCertificate'}{'AuthorityKeyIdentifier'})
834 1 9 if ($ext->{'extnID'} eq '2.5.29.35')
837 0 1 if ($pars->error)
863 0 1 if (not defined $rdn) { }
873 3 0 if ($oid2attr{$i->{'type'}}) { }
888 0 6 if (not defined $rdn) { }
895 3 12 if ($i->{'type'} eq $oid)
922 0 0 if (defined $self->_AuthorityKeyIdentifier)
1002 0 1 unless (defined $exts)
1005 1 1 if ($ext->{'extnID'} eq '2.5.29.31')
1009 0 1 if ($crlp->error)
1034 0 1 unless (defined $extensions)
1037 1 0 if ($extension->{'extnID'} eq '2.5.29.31')
1044 1 1 if (exists $each_fullName->{'directoryName'}) { }
1 0 elsif (exists $each_fullName->{'uniformResourceIdentifier'}) { }
1072 6 0 if ($oid2attr{$i->{'type'}}) { }
1095 0 0 unless (defined $extensions)
1098 0 0 if ($extension->{'extnID'} eq '2.5.29.32')
1127 0 1 unless (defined $extensions)
1130 1 6 if ($extension->{'extnID'} eq '1.2.840.113533.7.65.0')
1158 0 0 unless (defined $extensions)
1161 0 0 if ($extension->{'extnID'} eq '2.5.29.9')
1189 0 1 unless (defined $extensions)
1192 1 1 if ($extension->{'extnID'} eq '2.5.29.19')
1193 1 0 if ($extension->{'critical'})
1221 0 1 unless (defined $extensions)
1223 0 1 if (defined $self->{'tbsCertificate'}{'SubjectKeyIdentifier'})
1227 1 3 if ($extension->{'extnID'} eq '2.5.29.14')
1230 0 1 if ($parser->error)
1267 0 1 unless (defined $extensions)
1270 1 2 if ($extension->{'extnID'} eq '1.3.6.1.5.5.7.1.11')
1307 0 1 unless (defined $extensions)
1310 1 5 if ($extension->{'extnID'} eq '1.3.6.1.4.1.3401.8.1.1')
1313 0 1 if ($pgpextension->{'version'} != 0) { }
1318 1 0 if exists $pgpextension->{'keyCreation'}{$timetype}
1331 2 17 if (not defined $what or '' eq $what)
1332 1 18 unless (defined $asn)