Branch Coverage

blib/lib/Net/SSL.pm
Criterion Covered Total %
branch 10 102 9.8


line true false branch
13 2 0 if (eval { do { require IO::Socket::IP; 1 } }) { }
32 0 0 if $^O eq 'MSWin32' or $^O eq 'NetWare'
63 0 1 if (my $proxy = $self->proxy)
65 0 0 unless ($arg->{'PeerPort'})
73 0 0 unless (shift())->SUPER::timeout
83 0 1 if ($@)
89 0 1 if (my $rv = *$self->{'ssl_ctx'}->set_verify)
93 0 1 if ($self->proxy) { }
96 0 0 if (not $proxy_connect or $@)
102 1 0 @_ == 1 ? :
104 1 0 unless ($self->SUPER::connect(@_))
119 0 0 if $ssl->can('set_tlsext_host_name')
132 0 0 if (not defined $rv or $rv <= 0)
142 0 0 if ($@)
203 0 0 unless defined $n
211 0 0 unless defined $n
235 0 0 unless defined $n
263 0 0 unless @stack
266 0 0 if ref $stack_object and $stack_object->isa('LWP::UserAgent')
274 0 0 if (my $val = shift())
285 0 0 unless $proxy_port
288 0 0 unless $proxy_addr
291 0 0 unless $peer_addr
292 0 0 unless $peer_port
299 0 0 if ($peer_addr =~ /\Q$domain\E$/)
305 0 0 if ($is_proxied) { }
306 0 0 unless $self->SUPER::connect($proxy_port, $proxy_addr)
312 0 0 unless $self->SUPER::connect($peer_port, $peer_addr_packed)
317 0 0 if ($ENV{'HTTPS_PROXY_USERNAME'} or $ENV{'HTTPS_PROXY_PASSWORD'}) { }
332 0 0 if (send_useragent_to_proxy())
334 0 0 if ($lwp_object and $lwp_object->agent)
352 0 0 unless length $header
354 0 0 if $n <= 0
357 0 0 if defined $timeout
358 0 0 $header =~ m[HTTP/[0-9]+[.][0-9]+\s+200\s+]is ? :
360 0 0 unless ($conn_ok)
372 2 0 unless $proxy_server
378 0 0 unless $peer_addr
379 0 0 unless $peer_port
387 0 0 if ($peer_addr =~ /\Q$domain\E\z/)
408 0 3 if ($file)
409 0 0 unless -e $file
410 0 0 unless -r $file
412 0 0 if (/PKCS12/) { }
0 0 elsif (/CERT/) { }
0 0 elsif (/KEY/) { }
414 0 0 unless $ctx->use_pkcs12_file($file, $ENV{'HTTPS_PKCS12_PASSWORD'})
418 0 0 unless $ctx->use_certificate_file($file, 1)
421 0 0 unless $ctx->use_PrivateKey_file($file, 1)
430 0 1 if ($count == 2)
431 0 0 unless ($ctx->check_private_key)