Condition Coverage

blib/lib/Crypt/JWT.pm
Criterion Covered Total %
condition 83 175 47.4


and 3 conditions

line !l l&&!r l&&r condition
53 0 0 0 defined $str and not ref $str
103 247 0 7 ref $key eq "HASH" and $key->{'k'}
0 0 7 ref $key eq "HASH" and $key->{'k'} and $key->{'kty'}
0 0 7 ref $key eq "HASH" and $key->{'k'} and $key->{'kty'} and $key->{'kty'} eq "oct"
114 0 0 4 defined $kid and defined $alg
115 0 2 2 $kid_keys and not ref $kid_keys
118 0 0 4 exists $kid_keys->{'keys'} and ref $kid_keys->{'keys'} eq "ARRAY"
121 0 0 8 $_->{'kid'} and $_->{'kty'}
0 4 4 $_->{'kid'} and $_->{'kty'} and $_->{'kid'} eq $kid
130 0 0 0 $kid_keys->{$kid} and not ref $kid_keys->{$kid}
133 0 0 4 $found->{'kty'} eq "oct" and $alg =~ /^(HS|dir|PBES2-HS|A)/
134 0 0 0 $found->{'kty'} eq "OKP" and $alg =~ /^(EdDSA|ECDH-ES)/
135 0 0 0 $found->{'kty'} eq "EC" and $alg =~ /^(ES|EC)/
136 0 0 0 $found->{'kty'} eq "RSA" and $alg =~ /^(RS|PS)/
175 1425 3 2 defined $args{"verify_$claim"} and $args{"verify_$claim"} != 0
186 15 0 0 $args{'verify_exp'} and $args{'verify_exp'} == 1
196 23 0 0 $args{'verify_nbf'} and $args{'verify_nbf'} == 1
207 0 0 0 $args{'verify_iat'} and $args{'verify_iat'} == 1
233 0 4 10 defined $value and $value eq $check
293 191 14 62 defined $decode_payload and $decode_payload == 0
335 24 0 0 &looks_like_number($hdr->{'p2s'}) && $hdr->{'p2s'} >= 8 && $hdr->{'p2s'} <= 9999
498 0 174 0 $b64u_header and not $header
499 28 146 0 $b64u_ecek and not $ecek
500 0 174 0 $b64u_ct and not $ct
501 0 174 0 $b64u_iv and not $iv
502 0 174 0 $b64u_tag and not $tag
518 168 5 0 $aa and ref $aa eq 'ARRAY' || !ref($aa)
527 165 5 0 $ae and ref $ae eq 'ARRAY' || !ref($ae)
579 0 98 0 $b64u_sig and not $sig
618 32 1 1 $alg eq "none" and not $args{'allow_none'}
633 32 1 0 not $args{'key'} and $alg ne "none"
643 0 105 0 $b64u_header and not $header
649 101 2 1 $alg eq "none" and not $args{'allow_none'}
650 101 0 2 $alg eq "none" and defined $b64u_sig
101 2 0 $alg eq "none" and defined $b64u_sig and length $b64u_sig > 0
683 0 0 1 $alg =~ /^(RS|PS|ES)/ and $k->{'kty'} =~ /^(RSA|EC)$/
694 1 98 0 $b64u_payload and not $payload
775 1 0 2 defined $hash->{'payload'} and $hash->{'protected'}
0 1 0 $hash->{'ciphertext'} and $hash->{'protected'}

or 2 conditions

line l !l condition
182 5 55 $args{'leeway'} || 0
706 0 149 $args{'serialization'} || 'compact'

or 3 conditions

line l !l&&r !l&&!r condition
40 1 37 0 ref $key eq "HASH" or ref $key eq "SCALAR"
63 4 0 0 ref $key eq "HASH" or ref $key eq "SCALAR"
74 0 2 0 ref $key eq "HASH" or ref $key eq "SCALAR"
87 9 0 0 ref $key eq "HASH" or ref $key eq "SCALAR"
89 7 2 0 eval { do { 'Crypt::PK::ECC'->new($key) } } || eval { do { 'Crypt::PK::X25519'->new($key) } }
94 0 0 0 eval { do { 'Crypt::PK::ECC'->new(@$key) } } || eval { do { 'Crypt::PK::X25519'->new(@$key) } }
187 36 5 4 not defined $args{'verify_exp'} or $args{'verify_exp'} == 1
197 28 1 1 not defined $args{'verify_nbf'} or $args{'verify_nbf'} == 1
208 1 2 1 not defined $args{'verify_iat'} or $args{'verify_iat'} == 1
518 2 3 0 ref $aa eq 'ARRAY' || !ref($aa)
527 2 3 0 ref $ae eq 'ARRAY' || !ref($ae)
682 0 0 1 not defined $k or ref $k ne "HASH"
0 0 1 not defined $k or ref $k ne "HASH" or not defined $k->{'kty'}
684 0 0 1 $k->{'d'} or $k->{'p'}
0 0 1 $k->{'d'} or $k->{'p'} or $k->{'q'}
0 0 1 $k->{'d'} or $k->{'p'} or $k->{'q'} or $k->{'dp'}
0 0 1 $k->{'d'} or $k->{'p'} or $k->{'q'} or $k->{'dp'} or $k->{'dq'}
0 0 1 $k->{'d'} or $k->{'p'} or $k->{'q'} or $k->{'dp'} or $k->{'dq'} or $k->{'qi'}