Branch Coverage

blib/lib/VOMS/Lite/PEMHelper.pm
Criterion Covered Total %
branch 41 90 45.5


line true false branch
23 1 0 if (-e $file)
24 0 1 unless open AC, ">$file"
51 2 0 unless (defined $type)
59 0 2 unless open CERT, "<$file"
62 2 27 if ($line =~ /^-----BEGIN $type-----\r?$/)
63 0 2 wantarray ? :
2 25 if ($line =~ /^-----END $type-----\r?$/)
64 25 0 if ($read == 1)
65 25 0 if ($line =~ m[^([A-Za-z0-9+/=]+)\r?$])
70 0 2 if ($myCertData[0] eq '')
73 0 2 wantarray ? :
92 5 0 unless ($_[-1] =~ /^\x30/)
115 0 1 if (umask() != 63)
116 0 0 if ($^O =~ /^MSWin/) { }
119 1 0 if (-e $file)
121 0 1 unless open CERTKEY, ">$file"
139 0 3 unless (defined $passwd)
151 2 1 if ($passwd ne '')
195 0 3 if (umask() != 63)
196 0 0 if ($^O =~ /^MSWin/) { }
199 3 0 if (-e $file)
201 0 3 unless open KEY, ">$file"
217 3 0 unless (defined $type)
222 3 0 if (-e $file)
223 0 3 unless open CERT, ">$file"
242 0 1 unless open KEY, "<$file"
245 1 8 if ($line =~ /^-----BEGIN RSA PRIVATE KEY-----$/)
246 0 8 if ($line =~ /^-----BEGIN PRIVATE KEY-----$/)
247 1 7 if ($line =~ /^-----END RSA PRIVATE KEY-----$/)
248 0 7 if ($line =~ /^-----END PRIVATE KEY-----$/)
249 7 0 if ($read == 1)
250 0 7 if ($line =~ /^Proc-Type: ([0-9]+),(ENCRYPTED)$/) { }
0 7 elsif ($line =~ /^DEK-Info: (.*),(.*)$/) { }
7 0 elsif ($line =~ m[^([A-Za-z0-9+/=]+)$]) { }
254 0 7 if ($read == 2)
255 0 0 if ($line =~ m[^([A-Za-z0-9+/=]+)$])
261 0 1 if ($myKeyData eq '')
267 0 1 if ($read == 2)
271 1 0 if $PEMType ne 'ENCRYPTED'
272 0 0 if ($PEMEnc ne 'DES-EDE3-CBC')
273 0 0 unless ($SALT =~ /^[a-fA-F0-9]{16}$/)
274 0 0 if ($PEMV ne '4')
278 0 0 if (defined $passwd and $passwd eq '') { }
0 0 elsif (not defined $passwd) { }
311 0 0 if ("$unpad" =~ /[\001-\010]/) { }