Branch Coverage

blib/lib/Crypt/X509.pm
Criterion Covered Total %
branch 93 152 61.1


line true false branch
120 2 9 if (not defined $parser or $parser->error)
176 0 1 if $v == 0
177 0 1 if $v == 1
178 1 0 if $v == 2
218 0 0 if ($self->{'tbsCertificate'}{'validity'}{'notBefore'}{'utcTime'}) { }
0 0 elsif ($self->{'tbsCertificate'}{'validity'}{'notBefore'}{'generalTime'}) { }
246 2 2 if ($self->{'tbsCertificate'}{'validity'}{'notAfter'}{'utcTime'}) { }
2 0 elsif ($self->{'tbsCertificate'}{'validity'}{'notAfter'}{'generalTime'}) { }
327 2 0 if ($self->PubKeyAlg eq 'RSA') { }
405 12 0 if ($oid2attr{$i->{'type'}}) { }
428 0 4 if (scalar @sequence > 1) { }
443 3 11 if ($i->{'type'} eq $oid)
564 12 0 if ($oid2attr{$i->{'type'}}) { }
582 3 12 if ($i->{'type'} eq $oid)
695 0 3 unless (defined $exts)
698 3 2 if ($ext->{'extnID'} eq '2.5.29.15')
701 0 3 if ($parsKeyU->error)
707 3 0 if ($ext->{'critical'})
708 3 0 if ($keyu & 32768)
709 0 3 if ($keyu & 16384)
710 2 1 if ($keyu & 8192)
711 2 1 if ($keyu & 4096)
712 1 2 if ($keyu & 2048)
713 0 3 if ($keyu & 1024)
714 0 3 if ($keyu & 512)
715 0 3 if ($keyu & 256)
716 0 3 if ($keyu & 128)
750 0 2 unless (defined $exts)
753 2 12 if ($ext->{'extnID'} eq '2.5.29.37')
754 1 1 if defined $ext->{'oids'}
757 0 1 if ($parsExtKeyUsage->error)
761 0 2 unless $oid2extkeyusage{$_}
762 0 1 if ($ext->{'critical'})
788 0 1 unless (defined $exts)
791 1 4 if ($ext->{'extnID'} eq '2.5.29.17')
794 0 1 if ($parsSubjAlt->error)
848 2 7 if ($ext->{'extnID'} eq '2.5.29.17')
851 0 2 if ($parsSubjAlt->error)
868 0 7 unless (defined $exts)
870 6 1 if (defined $self->{'tbsCertificate'}{'AuthorityKeyIdentifier'})
874 1 9 if ($ext->{'extnID'} eq '2.5.29.35')
877 0 1 if ($pars->error)
903 0 1 if (not defined $rdn) { }
913 3 0 if ($oid2attr{$i->{'type'}}) { }
928 0 6 if (not defined $rdn) { }
935 3 12 if ($i->{'type'} eq $oid)
962 0 0 if (defined $self->_AuthorityKeyIdentifier)
1042 0 1 unless (defined $exts)
1045 1 1 if ($ext->{'extnID'} eq '2.5.29.31')
1049 0 1 if ($crlp->error)
1074 0 1 unless (defined $extensions)
1077 1 0 if ($extension->{'extnID'} eq '2.5.29.31')
1084 1 1 if (exists $each_fullName->{'directoryName'}) { }
1 0 elsif (exists $each_fullName->{'uniformResourceIdentifier'}) { }
1112 6 0 if ($oid2attr{$i->{'type'}}) { }
1135 0 0 unless (defined $extensions)
1138 0 0 if ($extension->{'extnID'} eq '2.5.29.32')
1167 0 1 unless (defined $extensions)
1170 1 6 if ($extension->{'extnID'} eq '1.2.840.113533.7.65.0')
1198 0 0 unless (defined $extensions)
1201 0 0 if ($extension->{'extnID'} eq '2.5.29.9')
1229 0 1 unless (defined $extensions)
1232 1 1 if ($extension->{'extnID'} eq '2.5.29.19')
1233 1 0 if ($extension->{'critical'})
1261 0 1 unless (defined $extensions)
1263 0 1 if (defined $self->{'tbsCertificate'}{'SubjectKeyIdentifier'})
1267 1 3 if ($extension->{'extnID'} eq '2.5.29.14')
1270 0 1 if ($parser->error)
1307 0 1 unless (defined $extensions)
1310 1 2 if ($extension->{'extnID'} eq '1.3.6.1.5.5.7.1.11')
1347 0 1 unless (defined $extensions)
1350 1 5 if ($extension->{'extnID'} eq '1.3.6.1.4.1.3401.8.1.1')
1353 0 1 if ($pgpextension->{'version'} != 0) { }
1358 1 0 if exists $pgpextension->{'keyCreation'}{$timetype}
1371 2 17 if (not defined $what or '' eq $what)
1372 1 18 unless (defined $asn)