Branch Coverage

blib/lib/PDF/Make/Signature.pm
Criterion Covered Total %
branch 49 80 61.2


line true false branch
132 1 3 if ($args{'file'}) { }
1 2 elsif ($args{'key_file'} and $args{'cert_file'}) { }
175 3 4 if ($args{'file'}) { }
2 2 elsif ($args{'data'}) { }
176 1 2 unless open my $fh, "<", $args{'file'}
209 3 4 if ($args{'file'}) { }
2 2 elsif ($args{'data'}) { }
210 1 2 unless open my $fh, "<", $args{'file'}
265 1 2 unless $args{'identity'}
269 2 0 unless builtin::blessed($identity) and $identity->isa("PDF::Make::SigningIdentity")
313 0 0 if ($args{'visible'} or $args{'appearance'})
322 0 0 if (ref $args{'appearance'} eq 'CODE') { }
0 0 elsif (ref $args{'appearance'} eq 'HASH') { }
346 0 0 defined $stream ? :
0 0 defined $fonts ? :
0 0 defined $xobjects ? :
358 0 0 if ($config->{'timestamp_url'} and not $config->{'placeholder_size'})
365 0 0 if ($config->{'timestamp_url'} and not defined $config->{'tst_token'})
369 0 0 unless my $cms_der = _extract_contents_cms_bytes($signed)
388 0 0 unless ($resp->{'success'})
407 0 0 unless $pdf_bytes =~ m[/Contents \s* < ([0-9A-Fa-f]+) >]sx
444 1 0 unless my $identity = $config->{'identity'}
464 0 0 if ($@)
514 1 3 unless $file
515 2 1 unless -r $file
518 0 1 unless open my $fh, "<", $file
531 1 3 unless my $key_file = $args{'key_file'}
532 1 2 unless my $cert_file = $args{'cert_file'}
535 0 2 unless open my $fh, "<", $key_file
542 0 2 unless open $fh, "<", $cert_file
549 1 1 if ($args{'chain_file'})
550 0 1 unless open $fh, "<", $args{'chain_file'}
671 2 3 if ($args{'file'}) { }
2 1 elsif ($args{'data'}) { }
672 1 1 unless open my $fh, "<", $args{'file'}
686 2 1 if ($data =~ /^-----BEGIN CERTIFICATE-----/) { }
716 4 1 if (defined $self->{'key_usage'} and $self->{'key_usage'})
718 2 2 unless $self->{'key_usage'} & 3
722 2 0 if (defined $self->{'ext_key_usage'} and $self->{'ext_key_usage'})
724 1 1 unless $self->{'ext_key_usage'} & 252