Branch Coverage

blib/lib/XML/Enc.pm
Criterion Covered Total %
branch 88 136 64.7


line true false branch
72 0 464 unless $SYMMETRIC->{$algo}
86 0 212 unless $ENC_DIGEST->{$algo}
99 240 0 if (exists $params->{'key'})
103 227 13 if (exists $params->{'cert'})
107 240 0 if (exists $params->{'no_xml_declaration'})
108 240 0 $params->{'no_xml_declaration'} ? :
111 224 16 exists $params->{'data_enc_method'} ? :
114 224 16 exists $params->{'key_transport'} ? :
117 210 30 if (exists $params->{'oaep_mgf_alg'})
120 210 30 if (exists $params->{'oaep_label_hash'})
124 212 28 exists $params->{'oaep_params'} ? :
126 224 16 if exists $params->{'key_name'}
147 0 239 unless $xpc->exists("//xenc:EncryptedData")
149 0 239 unless $self->{'key_obj'}
172 1 237 unless $key
198 0 1 unless $key
201 0 1 unless $encrypted_nodes->size
226 240 0 unless $name
252 236 2 if ($new)
259 0 2 if (($node->parentNode->localname // "") eq "EncryptedID")
293 477 0 if $nodes->size
303 477 0 if $nodes->size
313 175 64 if $value
323 213 264 if $value
334 212 27 if $value
371 224 2 if (defined $self->{'key_name'} and $self->{'key_name'} ne "")
376 211 15 if ($self->{'oaep_params'} ne "")
403 240 0 exists $methods{$method} ? :
415 224 0 defined $keyname ? :
521 142 96 unless ($method =~ /gcm/)
534 0 96 unless $gcm->decrypt_done($tag)
555 96 130 if ($method =~ /gcm/)
578 238 1 unless $@
590 12 227 if ($algo eq "http://www.w3.org/2001/04/xmlenc#rsa-1_5")
594 52 175 if ($algo eq "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p")
597 0 52 if ($CryptX::VERSION lt 0.081) { }
619 175 0 if ($algo eq "http://www.w3.org/2009/xmlenc11#rsa-oaep")
622 0 175 if ($CryptX::VERSION lt 0.081) { }
651 7 219 if ($keymethod eq 'http://www.w3.org/2001/04/xmlenc#rsa-1_5') { }
44 175 elsif ($keymethod eq 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p') { }
175 0 elsif ($keymethod eq 'http://www.w3.org/2009/xmlenc11#rsa-oaep') { }
655 0 44 if ($CryptX::VERSION lt 0.081) { }
659 35 9 defined $self->{'oaep_label_hash'} && $self->{'oaep_label_hash'} ne '' ? :
665 175 0 defined $self->{'oaep_mgf_alg'} ? :
666 0 175 if ($CryptX::VERSION lt 0.081) { }
670 175 0 defined $self->{'oaep_label_hash'} && $self->{'oaep_label_hash'} ne '' ? :
677 0 226 if $DEBUG
701 0 226 if ($xpc->findvalue('dsig:KeyInfo/dsig:RetrievalMethod/@Type', $context) eq 'http://www.w3.org/2001/04/xmlenc#EncryptedKey') { }
708 0 0 unless ($keyinfo)
776 240 0 if (open my $KEY, '<', $file) { }
781 0 240 if ($text =~ /BEGIN ([DR]SA) PRIVATE KEY/) { }
0 240 elsif ($text =~ /BEGIN EC PRIVATE KEY/) { }
240 0 elsif ($text =~ /BEGIN PRIVATE KEY/) { }
0 0 elsif ($text =~ /BEGIN CERTIFICATE/) { }
784 0 0 if ($key_used eq 'RSA') { }
830 0 240 if $@
834 240 0 if ($rsaKey) { }
838 240 0 if (not $self->{'x509'})
875 0 0 if $@
880 0 0 if ($x509Key) { }
909 0 227 if $@
912 0 227 unless (-r $file)
915 0 227 unless open my $CERT, "<", $file
922 0 227 unless $cert
983 210 9 if ($self->{'key_transport'} eq "http://www.w3.org/2009/xmlenc11#rsa-oaep" or $self->{'key_transport'} eq "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p" and $self->{'oaep_label_hash'})
997 211 15 if ($self->{'oaep_params'} ne "")
1006 175 0 if ($self->{'key_transport'} eq "http://www.w3.org/2009/xmlenc11#rsa-oaep" and $self->{'oaep_mgf_alg'})
1026 224 2 if (defined $self->{'key_name'})