OpenCoverage

d1_msg.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/d1_msg.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, size_t len,-
3 size_t *written)-
4{-
5 int i;-
6-
7 if (SSL_in_init(s)
SSL_in_init(s)Description
TRUEnever evaluated
FALSEevaluated 1077 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& !ossl_statem_get_in_handshake(s)
!ossl_statem_g...n_handshake(s)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-1077
8 i = s->handshake_func(s);-
9 if (i < 0
i < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
10 return
never executed: return i;
i;
never executed: return i;
0
11 if (i == 0
i == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
12 ERR_put_error(20,(268),(229),__FILE__,23)-
13 ;-
14 return
never executed: return -1;
-1;
never executed: return -1;
0
15 }-
16 }
never executed: end of block
0
17-
18 if (len > 16384
len > 16384Description
TRUEnever evaluated
FALSEevaluated 1077 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-1077
19 ERR_put_error(20,(268),(334),__FILE__,29);-
20 return
never executed: return -1;
-1;
never executed: return -1;
0
21 }-
22-
23 return
executed 1077 times by 1 test: return dtls1_write_bytes(s, type, buf_, len, written);
Executed by:
  • libssl.so.1.1
dtls1_write_bytes(s, type, buf_, len, written);
executed 1077 times by 1 test: return dtls1_write_bytes(s, type, buf_, len, written);
Executed by:
  • libssl.so.1.1
1077
24}-
25-
26int dtls1_dispatch_alert(SSL *s)-
27{-
28 int i, j;-
29 void (*cb) (const SSL *ssl, int type, int val) = -
30 ((void *)0)-
31 ;-
32 unsigned char buf[2];-
33 unsigned char *ptr = &buf[0];-
34 size_t written;-
35-
36 s->s3->alert_dispatch = 0;-
37-
38 memset(buf, 0, sizeof(buf));-
39 *ptr++ = s->s3->send_alert[0];-
40 *ptr++ = s->s3->send_alert[1];-
41-
42 i = do_dtls1_write(s, 21, &buf[0], sizeof(buf), 0, &written);-
43 if (i <= 0
i <= 0Description
TRUEnever evaluated
FALSEevaluated 239 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-239
44 s->s3->alert_dispatch = 1;-
45-
46 }
never executed: end of block
else {
0
47 if (s->s3->send_alert[0] == 2
s->s3->send_alert[0] == 2Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 226 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
13-226
48 (
executed 13 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) );
Executed by:
  • libssl.so.1.1
void)(int)BIO_ctrl(s->wbio,11,0,
executed 13 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) );
Executed by:
  • libssl.so.1.1
13
49 ((void *)0)
executed 13 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) );
Executed by:
  • libssl.so.1.1
13
50 );
executed 13 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) );
Executed by:
  • libssl.so.1.1
13
51-
52 if (s->msg_callback
s->msg_callbackDescription
TRUEnever evaluated
FALSEevaluated 239 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-239
53 s->msg_callback(1, s->version, 21, s->s3->send_alert,
never executed: s->msg_callback(1, s->version, 21, s->s3->send_alert, 2, s, s->msg_callback_arg);
0
54 2, s, s->msg_callback_arg);
never executed: s->msg_callback(1, s->version, 21, s->s3->send_alert, 2, s, s->msg_callback_arg);
0
55-
56 if (s->info_callback !=
s->info_callba...!= ((void *)0)Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libssl.so.1.1
14-225
57 ((void *)0)
s->info_callba...!= ((void *)0)Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libssl.so.1.1
14-225
58 )-
59 cb = s->info_callback;
executed 225 times by 1 test: cb = s->info_callback;
Executed by:
  • libssl.so.1.1
225
60 else if (s->ctx->info_callback !=
s->ctx->info_c...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-14
61 ((void *)0)
s->ctx->info_c...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-14
62 )-
63 cb = s->ctx->info_callback;
never executed: cb = s->ctx->info_callback;
0
64-
65 if (cb !=
cb != ((void *)0)Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libssl.so.1.1
14-225
66 ((void *)0)
cb != ((void *)0)Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libssl.so.1.1
14-225
67 ) {-
68 j = (s->s3->send_alert[0] << 8) | s->s3->send_alert[1];-
69 cb(s, (0x4000|0x08), j);-
70 }
executed 225 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
225
71 }
executed 239 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
239
72 return
executed 239 times by 1 test: return i;
Executed by:
  • libssl.so.1.1
i;
executed 239 times by 1 test: return i;
Executed by:
  • libssl.so.1.1
239
73}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2