Branch Coverage

blib/lib/IO/Socket/SSL/Utils.pm
Criterion Covered Total %
branch 28 104 26.9


line true false branch
22 0 10 unless my $bio = &Net::SSLeay::BIO_new_file($file, 'r')
26 0 10 unless $cert
33 0 0 unless my $string = &Net::SSLeay::PEM_get_string_X509($cert)
35 0 0 unless open my $fh, '>', $file
45 0 592 unless $cert
58 0 0 unless my $bio = &Net::SSLeay::BIO_new_file($file, 'r')
62 0 0 unless $key
69 0 0 unless my $string = &Net::SSLeay::PEM_get_string_PrivateKey($key)
71 0 0 unless open my $fh, '>', $file
81 0 0 unless $key
93 0 78 unless my $cert = shift()
98 0 0 unless my $key = shift()
163 0 0 if (my(@names) = &Net::SSLeay::X509_get_subjectAltNames($cert))
167 0 0 if ($t eq 'IP')
168 0 0 if (length $v == 4) { }
0 0 elsif (length $v == 16) { }
174 0 0 if ($v[$i] == 0) { }
175 0 0 if ($last0) { }
178 0 0 if ++$last0->[2] > $best0->[2]
187 0 0 if ($best0) { }
189 0 0 if $best0->[0] > 0
191 0 0 if $best0->[1] < $#v
217 0 0 $nid > 0 ? :
0 0 $nid > 0 ? :
227 0 0 if (defined &Net::SSLeay::P_X509_get_ocsp_uri) { }
232 0 0 unless $_->{'sn'}
233 0 0 unless $_->{'sn'} eq 'authorityInfoAccess'
242 0 120 @_ % 2 ? :
277 0 0 unless &Net::SSLeay::X509_NAME_add_entry_by_txt($subj_e, $k, 4096, $v, -1, 0) or &Net::SSLeay::X509_NAME_add_entry_by_txt($subj_e, $k, 20, $v, -1, 0) or &Net::SSLeay::X509_NAME_add_entry_by_txt($subj_e, $k, 4, $v, -1, 0)
288 17 103 if (my $altsubj = delete $args{'subjectAltNames'})
302 2 118 if (my $p = delete $args{'purpose'})
303 0 2 if (not ref $p) { }
0 2 elsif (ref $p eq 'ARRAY') { }
304 0 0 !$1 || $1 eq '+' ? :
308 0 0 unless /^([+-]?)(\w+)$/
309 0 0 !$1 || $1 eq '+' ? :
313 2 0 $v && $v ne '-' ? :
317 10 110 if (delete $args{'CA'})
324 108 12 unless (%purpose)
361 2382 258 unless exists $purpose{lc $_->[0]}
362 258 0 if (delete $purpose{lc $_->[0]}) { }
370 0 120 if %purpose
377 10 110 if (%basic_constraints) { }
383 120 0 if %key_usage
385 120 0 if %cert_type
387 110 10 if %ext_key_usage
395 120 0 unless $args{'ext'}
399 0 0 if $have_ext{$nid}
401 0 0 if ($nid == 177) { }
406 0 0 if $ext->{'critical'}
410 0 0 if $ext->{'critical'}
453 0 6 unless &Net::SSLeay::EVP_get_digestbyname($digest_name)