Condition Coverage

blib/lib/Crypt/LE.pm
Criterion Covered Total %
condition 56 349 16.0


and 3 conditions

line !l l&&!r l&&r condition
310 16 0 2 exists $params{$key} and not ref $params{$key}
331 2 0 0 $params{'logger'} and &blessed($params{'logger'})
404 0 1 9 &Net::SSLeay::BIO_write($bio, $csr) and $in = &Net::SSLeay::PEM_read_bio_X509_REQ($bio)
411 0 0 9 $cn and $cn =~ /^.*?\bCN=([^\s,]+).*$/
422 0 0 9 $ext->{'extnID'} and $ext->{'extnID'} eq '2.5.29.17'
588 0 0 1 defined $version and $version =~ /^\d+$/
0 0 1 defined $version and $version =~ /^\d+$/ and $version <= 2
694 0 0 1 $status == 200 and $content
0 0 1 $status == 200 and $content and ref $content eq 'HASH'
696 0 0 0 do {
703 0 0 0 do {
711 1 0 0 $self->{'directory'} and $self->{'directory'}{'reg'}
766 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'}
788 0 0 0 $self->{'registration_info'} and ref $self->{'registration_info'} eq 'HASH'
790 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'};}
794 0 0 0 not $self->{'registration_id'} and $self->{'directory'}{'reg'} =~ m[/([^/]+)$]
827 0 0 0 $contacts and ref $contacts eq 'ARRAY'
853 0 0 0 $status == 201 and $content->{'identifiers'}
0 0 0 $status == 201 and $content->{'identifiers'} and $content->{'authorizations'}
872 0 0 0 $content->{'identifier'} and $content->{'identifier'}{'value'}
876 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'}
883 0 0 0 $challenge->{'token'} and $challenge->{'token'} =~ /$url_safe/
892 0 0 0 $self->{'challenges'} and exists $self->{'challenges'}{$domain}
1003 0 0 0 $self->{'domains'} and $self->{'challenges'}
1004 0 0 0 $cb && &blessed($cb)
1007 0 0 0 $cb and ref $cb eq 'CODE' || $mod_callback && $cb->can($handler)
1008 0 0 0 $params and ref $params ne 'HASH'
1012 0 0 0 defined $self->{'domains'}{$domain} and not $self->{'domains'}{$domain}
1016 0 0 0 $self->{'challenges'}{$domain} and $self->{'challenges'}{$domain}{$type}
1133 0 0 0 $self->{'domains'} and $self->{'challenges'}
1135 0 0 0 $cb && &blessed($cb)
1139 0 0 0 $cb and ref $cb eq 'CODE' || $mod_callback && $cb->can($handler)
1140 0 0 0 $params and ref $params ne 'HASH'
1145 0 0 0 defined $self->{'domains'}{$domain} and not $self->{'domains'}{$domain}
1164 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'
1167 0 0 0 $self->{'try'} and ++$try == $self->{'try'}
1169 0 0 0 $status == $expected_status and $content
0 0 0 $status == $expected_status and $content and $content->{'status'}
1235 0 0 0 ref $content eq 'HASH' and $content->{'identifiers'}
0 0 0 ref $content eq 'HASH' and $content->{'identifiers'} and $content->{'authorizations'}
1244 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'
1247 0 0 0 $self->{'try'} and ++$try == $self->{'try'}
1249 0 0 0 $status == 200 and $content
0 0 0 $status == 200 and $content and $content->{'status'}
1283 0 0 0 $self->{'links'} && $self->{'links'}{'up'}
1378 0 0 0 $self->{'links'} && $self->{'links'}{'terms-of-service'}
1449 0 0 0 $self->{'alternative_certificates'} and defined $idx
0 0 0 $self->{'alternative_certificates'} and defined $idx and $idx < @{$self->{'alternative_certificates'};}
1520 0 0 2 $self->{'failed_domains'} and @{$self->{'failed_domains'};}
1540 0 0 1 $self->{'domains'} and %{$self->{'domains'};}
1560 2 0 0 $params and ref $params eq 'HASH'
1561 2 0 0 $timeout and !($timeout =~ /^\d+/) || $timeout < 1
1568 0 0 2 $bio and &Net::SSLeay::BIO_write($bio, $$res)
1621 0 0 3 $der && $type
1642 0 0 0 $@ and $@ =~ /Usage/
1680 0 0 10 $type =~ /^\d+$/ and $type <= 1
1685 1 0 1 $attr and $attr ne 'default'
1712 0 0 6 $domains and !$ref || $ref eq 'ARRAY'
1713 0 6 0 $attrib and ref $attrib ne 'HASH'
1718 0 6 0 $attrib and $attrib->{'CN'} || $attrib->{'commonName'}
1734 0 0 6 $md and &Net::SSLeay::X509_REQ_sign($req, $pk, $md)
1778 0 0 1 $resp->{'headers'}{'content-type'} && $resp->{'headers'}{'content-type'} =~ m[^application/(?:problem\+)?json]
1812 0 0 0 $url and $self->version > 1
1813 0 0 0 $self->{'directory'}{'reg'} and not $opts->{'jwk'}
1831 0 0 0 $link and $link =~ /^<([^>]+)>;rel="([^"]+)"$/i
1873 0 0 0 $data and $data->{'domain'}
1899 24 0 0 ref $data eq 'HASH' and $data->{'error'}
1912 0 0 0 $err and ref $err eq 'HASH'
1913 0 0 0 $err->{'error'} and $err->{'error'}{'detail'}
1948 0 1 0 defined $_[5] and $_[5]
1957 1 0 0 $$exp and $s > $$exp

or 2 conditions

line l !l condition
370 0 0 $err || 'Could not generate account key'
489 2 1 $code || 500
3 0 $err || 'Key problem while creating CSR'
897 0 0 $self->_pull_error($content) || 'No valid challenges'
1005 0 0 $type ||= 'http'
1136 0 0 $type ||= 'http'
1265 0 0 $self->{'links'}{'alternate'} || []
1587 0 0 $timeout || 10
1594 0 0 $response->{'reason'} || ''
1640 0 0 $tag || 'Crypt::LE exported'
1679 2 8 $type ||= 0
1770 0 1 $opts ||= {}
1771 0 1 $opts->{'method'} || 'get'
1811 0 0 $opts ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
313 0 2 0 $self->{'ua'} || 'Crypt::LE' . " v$VERSION"
666 4 3 42 m"[\s\[\{\(\<\@\>\)\}\]/\\:]" or /^[\d\.]+$/
692 1 0 0 not $self->{'directory'} or $reload
766 0 0 0 !$content->{'agreement'} || $self->{'links'}{'terms-of-service'} ne $content->{'agreement'}
876 0 0 0 $challenge->{'url'} || $challenge->{'uri'}
0 0 0 $challenge->{'status'} || $content->{'status'}
888 0 0 0 $challenge->{'uri'} ||= $challenge->{'url'}
889 0 0 0 $challenge->{'status'} ||= $content->{'status'}
1007 0 0 0 ref $cb eq 'CODE' || $mod_callback && $cb->can($handler)
1032 0 0 0 $@ or not $rv
1139 0 0 0 ref $cb eq 'CODE' || $mod_callback && $cb->can($handler)
1159 0 0 0 $content->{'uri'} ||= $content->{'url'}
1193 0 0 0 $@ or not $rv
1561 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
1682 3 5 0 $attr ||= $keysize
1683 1 1 6 $attr < 2048 or $attr % 1024
1712 0 6 0 !$ref || $ref eq 'ARRAY'
1718 0 0 6 $attrib->{'CN'} || $attrib->{'commonName'}
1772 0 0 1 defined $payload or $method eq 'post'
1859 1 0 0 not $req or $self->version == 1
1 0 0 not $req or $self->version == 1 or not $req->{'resource'}
1861 0 0 0 $res eq 'new-reg' or $res eq 'reg'
1902 24 0 0 $data || $code
1966 0 2 1 !$content || $content =~ /^\-+BEGIN/