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'}
152 0 239 unless $xpc->exists("//xenc:EncryptedData")
154 0 239 unless $self->{'key_obj'}
181 1 237 unless $key
207 0 1 unless $key
210 0 1 unless $encrypted_nodes->size
235 240 0 unless $name
261 236 2 if ($new)
268 0 2 if (($node->parentNode->localname // "") eq "EncryptedID")
302 477 0 if $nodes->size
312 477 0 if $nodes->size
322 175 64 if $value
332 213 264 if $value
343 212 27 if $value
385 224 2 if (defined $self->{'key_name'} and $self->{'key_name'} ne "")
390 211 15 if ($self->{'oaep_params'} ne "")
417 240 0 exists $methods{$method} ? :
429 224 0 defined $keyname ? :
535 142 96 unless ($method =~ /gcm/)
548 0 96 unless $gcm->decrypt_done($tag)
569 96 130 if ($method =~ /gcm/)
592 238 1 unless $@
604 12 227 if ($algo eq "http://www.w3.org/2001/04/xmlenc#rsa-1_5")
608 52 175 if ($algo eq "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p")
611 0 52 if ($CryptX::VERSION lt 0.081) { }
633 175 0 if ($algo eq "http://www.w3.org/2009/xmlenc11#rsa-oaep")
636 0 175 if ($CryptX::VERSION lt 0.081) { }
665 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') { }
669 0 44 if ($CryptX::VERSION lt 0.081) { }
673 35 9 defined $self->{'oaep_label_hash'} && $self->{'oaep_label_hash'} ne '' ? :
679 175 0 defined $self->{'oaep_mgf_alg'} ? :
680 0 175 if ($CryptX::VERSION lt 0.081) { }
684 175 0 defined $self->{'oaep_label_hash'} && $self->{'oaep_label_hash'} ne '' ? :
691 0 226 if $DEBUG
715 0 226 if ($xpc->findvalue('dsig:KeyInfo/dsig:RetrievalMethod/@Type', $context) eq 'http://www.w3.org/2001/04/xmlenc#EncryptedKey') { }
722 0 0 unless ($keyinfo)
790 240 0 if (open my $KEY, '<', $file) { }
795 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/) { }
798 0 0 if ($key_used eq 'RSA') { }
844 0 240 if $@
848 240 0 if ($rsaKey) { }
852 240 0 if (not $self->{'x509'})
889 0 0 if $@
894 0 0 if ($x509Key) { }
923 0 227 if $@
926 0 227 unless (-r $file)
929 0 227 unless open my $CERT, "<", $file
936 0 227 unless $cert
997 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'})
1011 211 15 if ($self->{'oaep_params'} ne "")
1020 175 0 if ($self->{'key_transport'} eq "http://www.w3.org/2009/xmlenc11#rsa-oaep" and $self->{'oaep_mgf_alg'})
1040 224 2 if (defined $self->{'key_name'})