Branch Coverage

blib/lib/Protocol/TLS/Context.pm
Criterion Covered Total %
branch 81 130 62.3


line true false branch
78 0 4 unless exists $args{'type'} and $args{'type'} == 0 || $args{'type'} == 1
100 1 3 $args{'type'} == 1 ? :
113 0 0 if (@_ and not $self->{'shutdown'})
115 0 0 if exists $self->{'on_error'}
123 0 0 unless $self->shutdown
130 3 2 unless $self->shutdown
137 5 19 if @_
144 11 9 $_->[0] == 22 ? :
155 11 9 $_->[0] == 22 ? :
167 3 0 if (exists $ctx->{'on_data'} and $ctx->state == 7)
175 3 0 if ($ctx->state == 7)
184 3 34 if ($c_type == 21) { }
6 28 elsif ($c_type == 23) { }
4 24 elsif ($prev_state == 0) { }
4 20 elsif ($prev_state == 1) { }
2 18 elsif ($prev_state == 3) { }
2 16 elsif ($prev_state == 4) { }
6 10 elsif ($prev_state == 2) { }
6 4 elsif ($prev_state == 5) { }
4 0 elsif ($prev_state == 6) { }
0 0 elsif ($prev_state == 7) { }
188 0 6 if ($prev_state != 7)
196 0 4 if ($c_type != 22 and $hs_type != 1) { }
207 0 4 if ($c_type != 22 and $hs_type != 2) { }
1 3 elsif (defined $ctx->{'proposed'}{'session_id'} and $ctx->{'proposed'}{'session_id'} eq $ctx->{'pending'}{'session_id'}) { }
224 1 1 if ($c_type == 22) { }
1 0 elsif ($c_type == 20) { }
225 1 0 if ($hs_type == 20)
240 1 1 if ($c_type == 22 and $hs_type == 20) { }
1 0 elsif ($c_type == 20) { }
254 6 0 if ($c_type == 22) { }
255 3 3 if ($hs_type == 14)
267 4 2 if ($c_type == 22) { }
2 0 elsif ($c_type == 20) { }
268 2 2 if ($hs_type == 20)
283 2 2 if ($c_type == 22) { }
2 0 elsif ($c_type == 20) { }
284 2 0 if ($hs_type == 20)
316 0 0 $sp->{'MACAlgorithm'} eq 'MD5' ? :
0 0 $sp->{'MACAlgorithm'} eq 'SHA256' ? :
3 0 $sp->{'MACAlgorithm'} eq 'SHA' ? :
327 0 0 $sp->{'BulkCipherAlgorithm'} eq 'RC4_128' ? :
0 0 $sp->{'BulkCipherAlgorithm'} eq '3DES_EDE_CBC' ? :
0 0 $sp->{'BulkCipherAlgorithm'} eq 'AES_256_CBC' ? :
3 0 $sp->{'BulkCipherAlgorithm'} eq 'AES_128_CBC' ? :
362 3 3 unless defined $kb->{'client_write_MAC_key'}
364 3 3 $action eq 'recv' ? :
371 17 43 if (@_)
374 14 3 if exists $ctx->{'on_change_state'}
379 8 6 if (exists $ctx->{'cb'} and exists $ctx->{'cb'}{$state})
396 0 3 unless (defined $tls_v)
404 0 3 if ($tls_v < $pro->{'tls_version'})
410 0 3 unless (grep {$h{'compression'} == $_;} @{$$pro{'compression'};})
416 0 3 unless (grep {$h{'cipher'} == $_;} @{$$pro{'ciphers'};})
434 0 1 unless (defined $tls_v)
443 0 1 if ($tls_v < $pro->{'tls_version'})
450 0 1 unless grep {$c == $_;} @{$h{'compression'};}
455 0 1 unless (exists $p->{'securityParameters'}{'CompressionMethod'})
467 0 1 unless grep {$cipher == $_;} @{$h{'ciphers'};}
472 0 1 unless (exists $p->{'cipher'})
487 0 0 if ($da eq 'RSA') { }
505 3 0 $ctx->{'type'} == 0 ? :
510 3 0 $ctx->{'type'} == 0 ? :
518 3 3 $type == 0 ? :
534 0 3 if ($finished ne $message)