Condition Coverage

blib/lib/Crypt/LE.pm
Criterion Covered Total %
condition 60 349 17.1


and 3 conditions

line !l l&&!r l&&r condition
310 16 0 2 exists $params{$key} and not ref $params{$key}
327 2 0 0 $params{'logger'} and &blessed($params{'logger'})
400 0 1 9 &Net::SSLeay::BIO_write($bio, $csr) and $in = &Net::SSLeay::PEM_read_bio_X509_REQ($bio)
407 0 0 9 $cn and $cn =~ /^.*?\bCN=([^\s,]+).*$/
418 0 0 9 $ext->{'extnID'} and $ext->{'extnID'} eq '2.5.29.17'
584 0 0 1 defined $version and $version =~ /^\d+$/
0 0 1 defined $version and $version =~ /^\d+$/ and $version <= 2
690 0 0 1 $status == 200 and $content
0 0 1 $status == 200 and $content and ref $content eq 'HASH'
692 0 0 0 do {
699 0 0 0 do {
707 1 0 0 $self->{'directory'} and $self->{'directory'}{'reg'}
762 0 0 0 $self->version == 1 and $self->{'links'}
0 0 0 $self->version == 1 and $self->{'links'} and $self->{'links'}{'terms-of-service'}
0 0 0 $self->version == 1 and $self->{'links'} and $self->{'links'}{'terms-of-service'} and !$content->{'agreement'} || $self->{'links'}{'terms-of-service'} ne $content->{'agreement'}
784 0 0 0 $self->{'registration_info'} and ref $self->{'registration_info'} eq 'HASH'
786 0 0 0 $self->{'registration_info'}{'contact'} and ref $self->{'registration_info'}{'contact'} eq 'ARRAY'
0 0 0 $self->{'registration_info'}{'contact'} and ref $self->{'registration_info'}{'contact'} eq 'ARRAY' and @{$self->{'registration_info'}{'contact'};}
790 0 0 0 not $self->{'registration_id'} and $self->{'directory'}{'reg'} =~ m[/([^/]+)$]
823 0 0 0 $contacts and ref $contacts eq 'ARRAY'
849 0 0 0 $status == 201 and $content->{'identifiers'}
0 0 0 $status == 201 and $content->{'identifiers'} and $content->{'authorizations'}
868 0 0 0 $content->{'identifier'} and $content->{'identifier'}{'value'}
872 0 0 0 $challenge and ref $challenge eq 'HASH'
0 0 0 $challenge and ref $challenge eq 'HASH' and $challenge->{'type'}
0 0 0 $challenge and ref $challenge eq 'HASH' and $challenge->{'type'} and $challenge->{'url'} || $challenge->{'uri'}
0 0 0 $challenge and ref $challenge eq 'HASH' and $challenge->{'type'} and $challenge->{'url'} || $challenge->{'uri'} and $challenge->{'status'} || $content->{'status'}
879 0 0 0 $challenge->{'token'} and $challenge->{'token'} =~ /$url_safe/
888 0 0 0 $self->{'challenges'} and exists $self->{'challenges'}{$domain}
999 0 0 0 $self->{'domains'} and $self->{'challenges'}
1000 0 0 0 $cb && &blessed($cb)
1003 0 0 0 $cb and ref $cb eq 'CODE' || $mod_callback && $cb->can($handler)
1004 0 0 0 $params and ref $params ne 'HASH'
1008 0 0 0 defined $self->{'domains'}{$domain} and not $self->{'domains'}{$domain}
1012 0 0 0 $self->{'challenges'}{$domain} and $self->{'challenges'}{$domain}{$type}
1129 0 0 0 $self->{'domains'} and $self->{'challenges'}
1131 0 0 0 $cb && &blessed($cb)
1135 0 0 0 $cb and ref $cb eq 'CODE' || $mod_callback && $cb->can($handler)
1136 0 0 0 $params and ref $params ne 'HASH'
1141 0 0 0 defined $self->{'domains'}{$domain} and not $self->{'domains'}{$domain}
1160 0 0 0 $status == $expected_status and $content
0 0 0 $status == $expected_status and $content and $content->{'status'}
0 0 0 $status == $expected_status and $content and $content->{'status'} and $content->{'status'} eq 'pending'
1163 0 0 0 $self->{'try'} and ++$try == $self->{'try'}
1165 0 0 0 $status == $expected_status and $content
0 0 0 $status == $expected_status and $content and $content->{'status'}
1231 0 0 0 ref $content eq 'HASH' and $content->{'identifiers'}
0 0 0 ref $content eq 'HASH' and $content->{'identifiers'} and $content->{'authorizations'}
1240 0 0 0 $status == 200 and $content
0 0 0 $status == 200 and $content and $content->{'status'}
0 0 0 $status == 200 and $content and $content->{'status'} and $content->{'status'} eq 'processing'
1243 0 0 0 $self->{'try'} and ++$try == $self->{'try'}
1245 0 0 0 $status == 200 and $content
0 0 0 $status == 200 and $content and $content->{'status'}
1279 0 0 0 $self->{'links'} && $self->{'links'}{'up'}
1374 0 0 0 $self->{'links'} && $self->{'links'}{'terms-of-service'}
1445 0 0 0 $self->{'alternative_certificates'} and defined $idx
0 0 0 $self->{'alternative_certificates'} and defined $idx and $idx < @{$self->{'alternative_certificates'};}
1516 0 0 2 $self->{'failed_domains'} and @{$self->{'failed_domains'};}
1536 0 0 1 $self->{'domains'} and %{$self->{'domains'};}
1556 2 0 0 $params and ref $params eq 'HASH'
1557 2 0 0 $timeout and !($timeout =~ /^\d+/) || $timeout < 1
1564 0 0 2 $bio and &Net::SSLeay::BIO_write($bio, $$res)
1617 0 0 3 $der && $type
1638 0 0 0 $@ and $@ =~ /Usage/
1676 0 0 10 $type =~ /^\d+$/ and $type <= 1
1681 1 0 1 $attr and $attr ne 'default'
1708 0 0 6 $domains and !$ref || $ref eq 'ARRAY'
1709 0 6 0 $attrib and ref $attrib ne 'HASH'
1714 0 6 0 $attrib and $attrib->{'CN'} || $attrib->{'commonName'}
1730 0 0 6 $md and &Net::SSLeay::X509_REQ_sign($req, $pk, $md)
1774 1 0 1 $resp->{'headers'}{'content-type'} && $resp->{'headers'}{'content-type'} =~ m[^application/(?:problem\+)?json]
1808 0 0 0 $url and $self->version > 1
1809 0 0 0 $self->{'directory'}{'reg'} and not $opts->{'jwk'}
1827 0 0 1 $link and $link =~ /^<([^>]+)>;rel="([^"]+)"$/i
1869 0 0 0 $data and $data->{'domain'}
1895 24 0 0 ref $data eq 'HASH' and $data->{'error'}
1908 0 0 0 $err and ref $err eq 'HASH'
1909 0 0 0 $err->{'error'} and $err->{'error'}{'detail'}
1944 0 1 0 defined $_[5] and $_[5]
1953 1 0 0 $$exp and $s > $$exp

or 2 conditions

line l !l condition
366 0 0 $err || 'Could not generate account key'
485 2 1 $code || 500
3 0 $err || 'Key problem while creating CSR'
893 0 0 $self->_pull_error($content) || 'No valid challenges'
1001 0 0 $type ||= 'http'
1132 0 0 $type ||= 'http'
1261 0 0 $self->{'links'}{'alternate'} || []
1583 0 0 $timeout || 10
1590 0 0 $response->{'reason'} || ''
1636 0 0 $tag || 'Crypt::LE exported'
1675 2 8 $type ||= 0
1766 1 1 $opts ||= {}
1767 1 1 $opts->{'method'} || 'get'
1807 0 0 $opts ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
313 0 2 0 $self->{'ua'} || 'Crypt::LE' . " v$VERSION"
662 4 3 42 m"[\s\[\{\(\<\@\>\)\}\]/\\:]" or /^[\d\.]+$/
688 1 0 0 not $self->{'directory'} or $reload
762 0 0 0 !$content->{'agreement'} || $self->{'links'}{'terms-of-service'} ne $content->{'agreement'}
872 0 0 0 $challenge->{'url'} || $challenge->{'uri'}
0 0 0 $challenge->{'status'} || $content->{'status'}
884 0 0 0 $challenge->{'uri'} ||= $challenge->{'url'}
885 0 0 0 $challenge->{'status'} ||= $content->{'status'}
1003 0 0 0 ref $cb eq 'CODE' || $mod_callback && $cb->can($handler)
1028 0 0 0 $@ or not $rv
1135 0 0 0 ref $cb eq 'CODE' || $mod_callback && $cb->can($handler)
1155 0 0 0 $content->{'uri'} ||= $content->{'url'}
1189 0 0 0 $@ or not $rv
1557 0 0 0 !($timeout =~ /^\d+/) || $timeout < 1
0 0 2 not $res or $timeout and !($timeout =~ /^\d+/) || $timeout < 1
2 0 0 ref $res or not $res =~ m[^\w+://]i
1678 3 5 0 $attr ||= $keysize
1679 1 1 6 $attr < 2048 or $attr % 1024
1708 0 6 0 !$ref || $ref eq 'ARRAY'
1714 0 0 6 $attrib->{'CN'} || $attrib->{'commonName'}
1768 0 0 2 defined $payload or $method eq 'post'
1855 2 0 0 not $req or $self->version == 1
2 0 0 not $req or $self->version == 1 or not $req->{'resource'}
1857 0 0 0 $res eq 'new-reg' or $res eq 'reg'
1898 24 0 0 $data || $code
1962 0 2 1 !$content || $content =~ /^\-+BEGIN/