Branch Coverage

blib/lib/XML/Sig/OO.pm
Criterion Covered Total %
branch 105 170 61.7


line true false branch
286 26 1 if ($cert->can($method))
320 32 25 if ($method eq 'toStringEC14N') { }
336 22 6 if defined $target
801 0 25 if $self->key_type eq "dsa" and $self->signature_method ne "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
805 0 25 unless exists $self->namespaces->{$self->tag_namespace}
806 0 25 unless exists $self->tune_cert_cbs->{$self->signature_method}
807 5 20 if (defined $self->key_file and not defined $self->sign_cert)
809 0 5 unless $result
826 69 0 unless defined $xml
827 69 0 unless defined $ns
869 0 21 unless $sig and $digest
877 1 17 if $#{$list;} == -1
891 21 1 unless defined $x
894 0 22 unless $result
898 0 22 unless $result
902 0 22 unless $result
906 0 22 unless $result
911 0 22 unless $value eq $cmp
938 17 29 if ($algo eq "http://www.w3.org/2001/10/xml-exc-c14n#" or $algo eq "http://www.w3.org/2001/10/xml-exc-c14n#WithComments")
941 1 16 if ($rawprefixes ne "")
944 1 16 $rawprefixes ? :
950 0 23 unless $#{$data;} > -1
963 0 23 unless defined $id
967 0 23 unless defined $node
982 0 23 unless defined $digest_value
983 0 23 unless exists $self->digest_cbs->{$digest_value}
996 0 23 unless defined $digest_value
1009 21 1 unless defined $x
1015 17 5 if (my $string = $x->findvalue($x509_path)) { }
4 1 elsif ($x->findvalue($rsa_path)) { }
1 0 elsif ($x->findvalue($dsa_path)) { }
1016 0 17 unless defined $string
1044 0 4 unless defined $value
1047 3 1 $dsa_pub->can($opt) ? :
1053 1 0 if $dsa_pub->verify(&sha1($ref->{'xml'}), $ref->{'sig'})
1078 25 230 unless &looks_like_number($nth)
1092 0 22 unless $result
1109 1 16 if (defined $self->cacert)
1112 0 1 unless $ca->verify($cert)
1113 0 1 if ($@)
1116 0 1 if defined $result
1125 0 17 unless $rsa_pub->verify($ref->{'xml'}, $ref->{'sig'})
1146 0 22 unless $result
1150 0 22 unless $result
1153 0 22 unless $result
1157 0 22 unless $result
1179 0 4 if $mod =~ /^\s*$/su
1183 0 4 if $exp =~ /^\s*$/su
1194 0 4 unless $rsa_pub->verify($ref->{'xml'}, $ref->{'sig'})
1208 0 22 unless $result
1215 0 44 unless $result
1230 0 22 unless $result
1235 0 22 unless $result
1260 0 22 unless $#{$data;} > -1
1273 0 22 unless defined $encoded
1289 0 29 unless defined $node
1306 0 22 unless defined $method_url
1319 0 27 unless exists $self->tune_cert_cbs->{$method}
1352 0 79 unless exists $self->mutate_cbs->{$type}
1462 0 6 unless defined $file
1463 0 6 unless -r $file
1466 0 6 unless $io
1482 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) { }
1484 4 1 if ($1 eq 'RSA') { }
1511 0 4 unless $rsaKey
1528 0 1 unless $x509Key
1544 0 1 unless $dsa_key
1559 0 7 unless defined $node
1573 0 6 unless defined $node
1587 0 5 unless defined $self->sign_cert
1590 0 5 if $total == 0
1593 0 6 unless $result
1610 0 6 unless $result
1614 0 6 unless $result
1628 0 6 unless $result
1634 0 12 unless $result
1643 1 5 if ($self->key_type eq 'dsa') { }
5 0 elsif ($self->key_type eq 'rsa') { }
1649 0 5 unless $result
1694 1 4 if (defined(my $file = $self->cert_file)) { }
0 4 elsif (defined $self->cert_string) { }
1696 1 0 if ($result) { }
1719 1 4 if $result