Branch Coverage

blib/lib/XML/Sig/OO.pm
Criterion Covered Total %
branch 97 162 59.8


line true false branch
284 25 1 if ($cert->can($method))
326 21 6 if defined $target
767 0 24 if $self->key_type eq 'dsa' and $self->signature_method ne 'http://www.w3.org/2000/09/xmldsig#dsa-sha1'
771 0 24 unless exists $self->namespaces->{$self->tag_namespace}
772 0 24 unless exists $self->tune_cert_cbs->{$self->signature_method}
773 5 19 if (defined $self->key_file and not defined $self->sign_cert)
775 0 5 unless $result
792 66 0 unless defined $xml
793 66 0 unless defined $ns
835 0 20 unless $sig and $digest
843 1 16 if $#{$list;} == -1
857 20 1 unless defined $x
860 0 21 unless $result
864 0 21 unless $result
868 0 21 unless $result
872 0 21 unless $result
877 0 21 unless $value eq $cmp
901 0 22 unless $#{$data;} > -1
914 0 22 unless defined $id
918 0 22 unless defined $node
933 0 22 unless defined $digest_value
934 0 22 unless exists $self->digest_cbs->{$digest_value}
947 0 22 unless defined $digest_value
960 20 1 unless defined $x
966 16 5 if (my $string = $x->findvalue($x509_path)) { }
4 1 elsif ($x->findvalue($rsa_path)) { }
1 0 elsif ($x->findvalue($dsa_path)) { }
967 0 16 unless defined $string
995 0 4 unless defined $value
998 3 1 $dsa_pub->can($opt) ? :
1004 1 0 if $dsa_pub->verify(&sha1($ref->{'xml'}), $ref->{'sig'})
1029 25 220 unless &looks_like_number($nth)
1043 0 21 unless $result
1060 1 15 if (defined $self->cacert)
1063 0 1 unless $ca->verify($cert)
1064 0 1 if ($@)
1067 0 1 if defined $result
1076 0 16 unless $rsa_pub->verify($ref->{'xml'}, $ref->{'sig'})
1097 0 21 unless $result
1101 0 21 unless $result
1104 0 21 unless $result
1108 0 21 unless $result
1130 0 4 if $mod =~ /^\s*$/su
1134 0 4 if $exp =~ /^\s*$/su
1145 0 4 unless $rsa_pub->verify($ref->{'xml'}, $ref->{'sig'})
1159 0 21 unless $result
1164 0 42 unless $result
1179 0 21 unless $result
1184 0 21 unless $result
1209 0 21 unless $#{$data;} > -1
1222 0 21 unless defined $encoded
1238 0 28 unless defined $node
1255 0 21 unless defined $method_url
1268 0 26 unless exists $self->tune_cert_cbs->{$method}
1302 0 76 unless exists $self->mutate_cbs->{$type}
1412 0 6 unless defined $file
1413 0 6 unless -r $file
1416 0 6 unless $io
1432 5 1 if ($text =~ /BEGIN ([DR]SA) PRIVATE KEY/su) { }
0 1 elsif ($text =~ /BEGIN PRIVATE KEY/u) { }
1 0 elsif ($text =~ /BEGIN CERTIFICATE/u) { }
1434 4 1 if ($1 eq 'RSA') { }
1461 0 4 unless $rsaKey
1478 0 1 unless $x509Key
1494 0 1 unless $dsa_key
1509 0 7 unless defined $node
1523 0 6 unless defined $node
1537 0 5 unless defined $self->sign_cert
1540 0 5 if $total == 0
1543 0 6 unless $result
1560 0 6 unless $result
1564 0 6 unless $result
1578 0 6 unless $result
1584 0 12 unless $result
1593 1 5 if ($self->key_type eq 'dsa') { }
5 0 elsif ($self->key_type eq 'rsa') { }
1599 0 5 unless $result
1644 1 4 if (defined(my $file = $self->cert_file)) { }
0 4 elsif (defined $self->cert_string) { }
1646 1 0 if ($result) { }
1669 1 4 if $result