Branch Coverage

blib/lib/XML/Enc.pm
Criterion Covered Total %
branch 64 102 62.7


line true false branch
68 64 0 if (exists $params->{'key'})
72 52 12 if (exists $params->{'cert'})
76 64 0 if (exists $params->{'no_xml_declaration'})
77 64 0 $params->{'no_xml_declaration'} ? :
80 49 15 exists $params->{'data_enc_method'} ? :
83 49 15 exists $params->{'key_transport'} ? :
86 35 29 exists $params->{'oaep_mgf_alg'} ? :
89 2 62 exists $params->{'oaep_params'} ? :
99 0 64 unless $self->{'key'}
128 60 2 if ($type eq 'http://www.w3.org/2001/04/xmlenc#Element') { }
134 60 0 if (defined $newnode)
180 1 50 if ($self->{'oaep_params'} ne "")
223 64 0 exists $methods{$method} ? :
251 35 29 exists $methods{$method} ? :
266 70 0 exists $methods{$method} ? :
275 1 62 if ($xpc->findvalue("dsig:KeyInfo/dsig:RetrievalMethod/\@Type", $context) eq "http://www.w3.org/2001/04/xmlenc#EncryptedKey")
282 0 1 unless ($keyinfo)
308 49 15 exists $methods{$method} ? :
329 41 21 if (defined $encmethods{$method} & !($method =~ /gcm/)) { }
21 0 elsif (defined $encmethods{$method} & $method =~ /gcm/) { }
340 0 21 unless ($gcm->decrypt_done($tag))
363 30 21 if (defined $encmethods{$method} & !($method =~ /gcm/)) { }
21 0 elsif (defined $encmethods{$method} & $method =~ /gcm/) { }
390 12 51 if ($keymethod->{'Algorithm'} eq 'http://www.w3.org/2001/04/xmlenc#rsa-1_5') { }
16 35 elsif ($keymethod->{'Algorithm'} eq 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p') { }
35 0 elsif ($keymethod->{'Algorithm'} eq 'http://www.w3.org/2009/xmlenc11#rsa-oaep') { }
402 0 0 if $DEBUG
413 7 44 if ($keymethod eq 'http://www.w3.org/2001/04/xmlenc#rsa-1_5') { }
9 35 elsif ($keymethod eq 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p') { }
35 0 elsif ($keymethod eq 'http://www.w3.org/2009/xmlenc11#rsa-oaep') { }
425 0 51 if $DEBUG
454 1 62 if ($xpc->findvalue("dsig:KeyInfo/dsig:RetrievalMethod/\@Type", $context) eq "http://www.w3.org/2001/04/xmlenc#EncryptedKey")
461 0 1 unless ($keyinfo)
479 0 51 if ($xpc->findvalue('dsig:KeyInfo/dsig:RetrievalMethod/@Type', $context) eq 'http://www.w3.org/2001/04/xmlenc#EncryptedKey') { }
486 0 0 unless ($keyinfo)
554 64 0 if (open my $KEY, '<', $file) { }
559 0 64 if ($text =~ /BEGIN ([DR]SA) PRIVATE KEY/) { }
0 64 elsif ($text =~ /BEGIN EC PRIVATE KEY/) { }
64 0 elsif ($text =~ /BEGIN PRIVATE KEY/) { }
0 0 elsif ($text =~ /BEGIN CERTIFICATE/) { }
562 0 0 if ($key_used eq 'RSA') { }
608 0 64 if $@
612 64 0 if ($rsaKey) { }
616 64 0 if (not $self->{'x509'})
653 0 0 if $@
658 0 0 if ($x509Key) { }
687 0 52 if $@
690 52 0 if (open my $CERT, '<', $file) { }
697 52 0 if ($cert) { }
765 1 50 if ($self->{'oaep_params'} ne "")
774 35 16 if ($self->{'key_transport'} eq "http://www.w3.org/2009/xmlenc11#rsa-oaep")