Branch Coverage

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


line true false branch
75 0 4 unless exists $args{'type'} and $args{'type'} == 0 || $args{'type'} == 1
98 1 3 $args{'type'} == 1 ? :
112 0 0 if (@_ and not $$self{'shutdown'})
114 0 0 if exists $$self{'on_error'}
122 0 0 unless $self->shutdown
129 3 2 unless $self->shutdown
136 5 19 if @_
143 11 9 $$_[0] == 22 ? :
154 11 9 $$_[0] == 22 ? :
166 3 0 if (exists $$ctx{'on_data'} and $ctx->state == 7)
174 3 0 if ($ctx->state == 7)
183 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) { }
187 0 6 if ($prev_state != 7)
195 0 4 if ($c_type != 22 and $hs_type != 1) { }
206 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'}) { }
223 1 1 if ($c_type == 22) { }
1 0 elsif ($c_type == 20) { }
224 1 0 if ($hs_type == 20)
239 1 1 if ($c_type == 22 and $hs_type == 20) { }
1 0 elsif ($c_type == 20) { }
253 6 0 if ($c_type == 22) { }
254 3 3 if ($hs_type == 14)
266 4 2 if ($c_type == 22) { }
2 0 elsif ($c_type == 20) { }
267 2 2 if ($hs_type == 20)
282 2 2 if ($c_type == 22) { }
2 0 elsif ($c_type == 20) { }
283 2 0 if ($hs_type == 20)
312 0 0 $$sp{'MACAlgorithm'} eq 'MD5' ? :
0 0 $$sp{'MACAlgorithm'} eq 'SHA256' ? :
3 0 $$sp{'MACAlgorithm'} eq 'SHA' ? :
319 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' ? :
361 3 3 unless defined $$kb{'client_write_MAC_key'}
362 3 3 $action eq 'recv' ? :
370 17 43 if (@_)
372 14 3 if exists $$ctx{'on_change_state'}
378 8 9 if (exists $$ctx{'cb'} and exists $$ctx{'cb'}{$state})
395 0 3 unless (defined $tls_v)
403 0 3 if ($tls_v < $$pro{'tls_version'})
409 0 3 unless (grep {$h{'compression'} == $_;} @{$$pro{'compression'};})
415 0 3 unless (grep {$h{'cipher'} == $_;} @{$$pro{'ciphers'};})
433 0 1 unless (defined $tls_v)
442 0 1 if ($tls_v < $$pro{'tls_version'})
449 0 1 unless grep {$c == $_;} @{$h{'compression'};}
454 0 1 unless (exists $$p{'securityParameters'}{'CompressionMethod'})
466 0 1 unless grep {$cipher == $_;} @{$h{'ciphers'};}
471 0 1 unless (exists $$p{'cipher'})
486 0 0 if ($da eq 'RSA') { }
504 3 0 $$ctx{'type'} == 0 ? :
509 3 0 $$ctx{'type'} == 0 ? :
517 3 3 $type == 0 ? :
533 0 3 if ($finished ne $message)