Branch Coverage

blib/lib/Convert/PEM.pm
Criterion Covered Total %
branch 30 52 57.6


line true false branch
25 0 3 if (not exists $param{'ASN'} && exists $param{'Name'}) { }
34 0 3 unless $asn->prepare($$pem{'ASN'})
50 0 4 unless open FH, $fname
63 0 3 unless my $fname = delete $param{'Filename'}
68 0 3 unless open FH, ">$fname"
78 0 8 unless my $blob = $param{'Content'}
82 0 8 unless my $dec = $pem->explode($blob)
84 0 8 unless $$dec{'Object'} eq $name
90 4 4 if (%headers and $headers{'Proc-Type'} eq '4,ENCRYPTED')
91 2 2 unless $buf = $pem->decrypt('Ciphertext', $buf, 'Info', $headers{'DEK-Info'}, 'Password', $param{'Password'})
98 0 6 if (my $macro = $param{'Macro'} || $$pem{'Macro'})
99 0 0 unless $asn = $asn->find($macro)
102 0 6 unless my $obj = $asn->decode($buf)
113 0 6 if (my $macro = $param{'Macro'} || $$pem{'Macro'})
114 0 0 unless $asn = $asn->find($macro)
117 0 6 unless my $buf = $asn->encode($param{'Content'})
121 2 4 if ($param{'Password'})
123 0 2 unless ($buf, $info) = $pem->encrypt('Plaintext', $buf, 'Password', $param{'Password'})
147 7 4 if ($headers)
150 17 0 if $k
169 3 4 if $headers
181 0 4 unless my $cmod = $Convert::PEM::CTYPES{$ctype}
188 2 2 unless my $buf = $cbc->decrypt($param{'Ciphertext'})
196 0 2 unless $param{'Password'}
198 0 2 unless my $cmod = $Convert::PEM::CTYPES{$ctype}
204 0 2 unless my $buf = $cbc->encrypt($param{'Plaintext'})