Branch Coverage

blib/lib/IO/Socket/SSL/Utils.pm
Criterion Covered Total %
branch 28 116 24.1


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
42 0 0 unless my $bio = &Net::SSLeay::BIO_new_file($file, "r")
46 0 0 if (my $cert = &Net::SSLeay::PEM_read_bio_X509($bio)) { }
51 0 0 if ($error & 4095) == 108 and @certs
61 0 0 unless open my $fh, ">", $file
63 0 0 unless my $string = &Net::SSLeay::PEM_get_string_X509($cert)
76 0 592 unless $cert
89 0 0 unless my $bio = &Net::SSLeay::BIO_new_file($file, "r")
93 0 0 unless $key
100 0 0 unless my $string = &Net::SSLeay::PEM_get_string_PrivateKey($key)
102 0 0 unless open my $fh, ">", $file
112 0 0 unless $key
191 0 0 if (not exists $subj{$k}) { }
0 0 elsif (not ref $subj{$k}) { }
203 0 0 if (my(@names) = &Net::SSLeay::X509_get_subjectAltNames($cert))
207 0 0 if ($t eq "IP")
208 0 0 if (length $v == 4) { }
0 0 elsif (length $v == 16) { }
214 0 0 if ($v[$i] == 0) { }
215 0 0 if ($last0) { }
218 0 0 if ++$last0->[2] > $best0->[2]
227 0 0 if ($best0) { }
229 0 0 if $best0->[0] > 0
231 0 0 if $best0->[1] < $#v
246 0 0 $nid > 0 ? :
0 0 $nid > 0 ? :
256 0 0 if (defined &Net::SSLeay::P_X509_get_ocsp_uri) { }
261 0 0 unless $_->{'sn'}
262 0 0 unless $_->{'sn'} eq "authorityInfoAccess"
271 0 120 @_ % 2 ? :
307 0 116 ref $v ? :
308 0 0 unless &Net::SSLeay::X509_NAME_add_entry_by_txt($subj_e, $k, 4096, $_, -1, 0) or &Net::SSLeay::X509_NAME_add_entry_by_txt($subj_e, $k, 20, $_, -1, 0) or &Net::SSLeay::X509_NAME_add_entry_by_txt($subj_e, $k, 4, $_, -1, 0)
320 22 98 if (my $altsubj = delete $args{'subjectAltNames'})
334 2 118 if (my $p = delete $args{'purpose'})
335 0 2 if (not ref $p) { }
0 2 elsif (ref $p eq 'ARRAY') { }
336 0 0 !$1 || $1 eq '+' ? :
340 0 0 unless /^([+-]?)(\w+)$/
341 0 0 !$1 || $1 eq '+' ? :
345 2 0 $v && $v ne '-' ? :
349 10 110 if (delete $args{'CA'})
356 108 12 unless (%purpose)
393 2382 258 unless exists $purpose{lc $_->[0]}
394 258 0 if (delete $purpose{lc $_->[0]}) { }
402 0 120 if %purpose
409 10 110 if (%basic_constraints) { }
415 120 0 if %key_usage
417 120 0 if %cert_type
419 110 10 if %ext_key_usage
427 120 0 unless $args{'ext'}
431 0 0 if $have_ext{$nid}
433 0 0 if ($nid == 177) { }
438 0 0 if $ext->{'critical'}
442 0 0 if $ext->{'critical'}
485 0 6 unless &Net::SSLeay::EVP_get_digestbyname($digest_name)