OpenCoverage

statem.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/statem/statem.c
Switch to Source codePreprocessed file
LineSourceCount
1typedef enum {-
2-
3 SUB_STATE_ERROR,-
4-
5 SUB_STATE_FINISHED,-
6-
7 SUB_STATE_END_HANDSHAKE-
8} SUB_STATE_RETURN;-
9-
10static int state_machine(SSL *s, int server);-
11static void init_read_state_machine(SSL *s);-
12static SUB_STATE_RETURN read_state_machine(SSL *s);-
13static void init_write_state_machine(SSL *s);-
14static SUB_STATE_RETURN write_state_machine(SSL *s);-
15-
16OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl)-
17{-
18 return
executed 41174 times by 1 test: return ssl->statem.hand_state;
Executed by:
  • libssl.so.1.1
ssl->statem.hand_state;
executed 41174 times by 1 test: return ssl->statem.hand_state;
Executed by:
  • libssl.so.1.1
41174
19}-
20-
21int SSL_in_init(const SSL *s)-
22{-
23 return
executed 180793 times by 1 test: return s->statem.in_init;
Executed by:
  • libssl.so.1.1
s->statem.in_init;
executed 180793 times by 1 test: return s->statem.in_init;
Executed by:
  • libssl.so.1.1
180793
24}-
25-
26int SSL_is_init_finished(const SSL *s)-
27{-
28 return
executed 7657 times by 1 test: return !(s->statem.in_init) && (s->statem.hand_state == TLS_ST_OK);
Executed by:
  • libssl.so.1.1
!(s->statem.in_init)
!(s->statem.in_init)Description
TRUEevaluated 1152 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6505 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(s->statem.han... == TLS_ST_OK)Description
TRUEevaluated 1152 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s->statem.hand_state == TLS_ST_OK)
(s->statem.han... == TLS_ST_OK)Description
TRUEevaluated 1152 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
;
executed 7657 times by 1 test: return !(s->statem.in_init) && (s->statem.hand_state == TLS_ST_OK);
Executed by:
  • libssl.so.1.1
0-7657
29}-
30-
31int SSL_in_before(const SSL *s)-
32{-
33-
34-
35-
36-
37-
38-
39-
40 return
executed 44252 times by 1 test: return (s->statem.hand_state == TLS_ST_BEFORE) && (s->statem.state == MSG_FLOW_UNINITED);
Executed by:
  • libssl.so.1.1
(
(s->statem.han...TLS_ST_BEFORE)Description
TRUEevaluated 17447 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 26805 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->statem.hand_state == TLS_ST_BEFORE)
(s->statem.han...TLS_ST_BEFORE)Description
TRUEevaluated 17447 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 26805 times by 1 test
Evaluated by:
  • libssl.so.1.1
executed 44252 times by 1 test: return (s->statem.hand_state == TLS_ST_BEFORE) && (s->statem.state == MSG_FLOW_UNINITED);
Executed by:
  • libssl.so.1.1
17447-44252
41 && (
(s->statem.sta...FLOW_UNINITED)Description
TRUEevaluated 16730 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 717 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->statem.state == MSG_FLOW_UNINITED)
(s->statem.sta...FLOW_UNINITED)Description
TRUEevaluated 16730 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 717 times by 1 test
Evaluated by:
  • libssl.so.1.1
;
executed 44252 times by 1 test: return (s->statem.hand_state == TLS_ST_BEFORE) && (s->statem.state == MSG_FLOW_UNINITED);
Executed by:
  • libssl.so.1.1
717-44252
42}-
43-
44-
45-
46-
47void ossl_statem_clear(SSL *s)-
48{-
49 s->statem.state = MSG_FLOW_UNINITED;-
50 s->statem.hand_state = TLS_ST_BEFORE;-
51 s->statem.in_init = 1;-
52 s->statem.no_cert_verify = 0;-
53}
executed 24376 times by 2 tests: end of block
Executed by:
  • libssl.so.1.1
  • tls13encryptiontest
24376
54-
55-
56-
57-
58void ossl_statem_set_renegotiate(SSL *s)-
59{-
60 s->statem.in_init = 1;-
61 s->statem.request_state = TLS_ST_SW_HELLO_REQ;-
62}
executed 32 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
32
63-
64-
65-
66-
67-
68void ossl_statem_fatal(SSL *s, int al, int func, int reason, const char *file,-
69 int line)-
70{-
71 ERR_put_error(20, func, reason, file, line);-
72-
73 if (s->statem.in_init
s->statem.in_initDescription
TRUEevaluated 4071 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 41 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& s->statem.state == MSG_FLOW_ERROR
s->statem.stat...MSG_FLOW_ERRORDescription
TRUEnever evaluated
FALSEevaluated 4071 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-4071
74 return;
never executed: return;
0
75 s->statem.in_init = 1;-
76 s->statem.state = MSG_FLOW_ERROR;-
77 if (al != -1
al != -1Description
TRUEevaluated 3787 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 325 times by 1 test
Evaluated by:
  • libssl.so.1.1
325-3787
78 && s->statem.enc_write_state != ENC_WRITE_STATE_INVALID
s->statem.enc_..._STATE_INVALIDDescription
TRUEevaluated 3787 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-3787
79 ssl3_send_alert(s, 2, al);
executed 3787 times by 1 test: ssl3_send_alert(s, 2, al);
Executed by:
  • libssl.so.1.1
3787
80}
executed 4112 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
4112
81int ossl_statem_in_error(const SSL *s)-
82{-
83 if (s->statem.state == MSG_FLOW_ERROR
s->statem.stat...MSG_FLOW_ERRORDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 18043 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
14-18043
84 return
executed 14 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 14 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
14
85-
86 return
executed 18043 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 18043 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
18043
87}-
88-
89void ossl_statem_set_in_init(SSL *s, int init)-
90{-
91 s->statem.in_init = init;-
92}
executed 11815 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
11815
93-
94int ossl_statem_get_in_handshake(SSL *s)-
95{-
96 return
executed 123956 times by 1 test: return s->statem.in_handshake;
Executed by:
  • libssl.so.1.1
s->statem.in_handshake;
executed 123956 times by 1 test: return s->statem.in_handshake;
Executed by:
  • libssl.so.1.1
123956
97}-
98-
99void ossl_statem_set_in_handshake(SSL *s, int inhand)-
100{-
101 if (inhand
inhandDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
102 s->statem.in_handshake++;
never executed: s->statem.in_handshake++;
0
103 else-
104 s->statem.in_handshake--;
never executed: s->statem.in_handshake--;
0
105}-
106-
107-
108int ossl_statem_skip_early_data(SSL *s)-
109{-
110 if (s->ext.early_data != 1
s->ext.early_data != 1Description
TRUEevaluated 336 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 10796 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
336-10796
111 return
executed 336 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 336 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
336
112-
113 if (!s->server
!s->serverDescription
TRUEnever evaluated
FALSEevaluated 10796 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-10796
114 || s->statem.hand_state != TLS_ST_EARLY_DATA
s->statem.hand..._ST_EARLY_DATADescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 10795 times by 1 test
Evaluated by:
  • libssl.so.1.1
1-10795
115 || s->hello_retry_request == SSL_HRR_COMPLETE
s->hello_retry...L_HRR_COMPLETEDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 10791 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
4-10791
116 return
executed 5 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 5 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
5
117-
118 return
executed 10791 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 10791 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
10791
119}-
120void ossl_statem_check_finish_init(SSL *s, int sending)-
121{-
122 if (sending == -1
sending == -1Description
TRUEevaluated 24091 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 27951 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
24091-27951
123 if (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END
s->statem.hand...EARLY_DATA_ENDDescription
TRUEnever evaluated
FALSEevaluated 24091 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-24091
124 || s->statem.hand_state == TLS_ST_EARLY_DATA
s->statem.hand..._ST_EARLY_DATADescription
TRUEevaluated 4530 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 19561 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
4530-19561
125 ossl_statem_set_in_init(s, 1);-
126 if (s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY
s->early_data_...TA_WRITE_RETRYDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4498 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
32-4498
127-
128-
129-
130-
131 s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;-
132 }
executed 32 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
32
133 }
executed 4530 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
4530
134 }
executed 24091 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else if (!s->server
!s->serverDescription
TRUEevaluated 17794 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 10157 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
10157-24091
135 if ((sending
sendingDescription
TRUEevaluated 3146 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 14648 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END
s->statem.hand...EARLY_DATA_ENDDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3140 times by 1 test
Evaluated by:
  • libssl.so.1.1
6-14648
136 || s->statem.hand_state == TLS_ST_EARLY_DATA
s->statem.hand..._ST_EARLY_DATADescription
TRUEevaluated 59 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3081 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
59-3081
137 && s->early_data_state != SSL_EARLY_DATA_WRITING
s->early_data_...Y_DATA_WRITINGDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 53 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
12-53
138 || (!sending
!sendingDescription
TRUEevaluated 14648 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3134 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& s->statem.hand_state == TLS_ST_EARLY_DATA
s->statem.hand..._ST_EARLY_DATADescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 14645 times by 1 test
Evaluated by:
  • libssl.so.1.1
)) {
3-14648
139 ossl_statem_set_in_init(s, 1);-
140-
141-
142-
143-
144 if (sending
sendingDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY
s->early_data_...TA_WRITE_RETRYDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-12
145 s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;
executed 12 times by 1 test: s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;
Executed by:
  • libssl.so.1.1
12
146 }
executed 15 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
15
147 }
executed 17794 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
17794
148 if (s->early_data_state == SSL_EARLY_DATA_FINISHED_READING
s->early_data_...NISHED_READINGDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 10121 times by 1 test
Evaluated by:
  • libssl.so.1.1
36-10121
149 && s->statem.hand_state == TLS_ST_EARLY_DATA
s->statem.hand..._ST_EARLY_DATADescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
18
150 ossl_statem_set_in_init(s, 1);
executed 18 times by 1 test: ossl_statem_set_in_init(s, 1);
Executed by:
  • libssl.so.1.1
18
151 }
executed 10157 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
10157
152}-
153-
154void ossl_statem_set_hello_verify_done(SSL *s)-
155{-
156 s->statem.state = MSG_FLOW_UNINITED;-
157 s->statem.in_init = 1;-
158-
159-
160-
161-
162-
163-
164-
165 s->statem.hand_state = TLS_ST_SR_CLNT_HELLO;-
166}
executed 2 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
2
167-
168int ossl_statem_connect(SSL *s)-
169{-
170 return
executed 15708 times by 1 test: return state_machine(s, 0);
Executed by:
  • libssl.so.1.1
state_machine(s, 0);
executed 15708 times by 1 test: return state_machine(s, 0);
Executed by:
  • libssl.so.1.1
15708
171}-
172-
173int ossl_statem_accept(SSL *s)-
174{-
175 return
executed 13982 times by 1 test: return state_machine(s, 1);
Executed by:
  • libssl.so.1.1
state_machine(s, 1);
executed 13982 times by 1 test: return state_machine(s, 1);
Executed by:
  • libssl.so.1.1
13982
176}-
177-
178typedef void (*info_cb) (const SSL *, int, int);-
179-
180static info_cb get_callback(SSL *s)-
181{-
182 if (s->info_callback !=
s->info_callba...!= ((void *)0)Description
TRUEevaluated 20410 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 60329 times by 1 test
Evaluated by:
  • libssl.so.1.1
20410-60329
183 ((void *)0)
s->info_callba...!= ((void *)0)Description
TRUEevaluated 20410 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 60329 times by 1 test
Evaluated by:
  • libssl.so.1.1
20410-60329
184 )-
185 return
executed 20410 times by 1 test: return s->info_callback;
Executed by:
  • libssl.so.1.1
s->info_callback;
executed 20410 times by 1 test: return s->info_callback;
Executed by:
  • libssl.so.1.1
20410
186 else if (s->ctx->info_callback !=
s->ctx->info_c...!= ((void *)0)Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 60257 times by 1 test
Evaluated by:
  • libssl.so.1.1
72-60257
187 ((void *)0)
s->ctx->info_c...!= ((void *)0)Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 60257 times by 1 test
Evaluated by:
  • libssl.so.1.1
72-60257
188 )-
189 return
executed 72 times by 1 test: return s->ctx->info_callback;
Executed by:
  • libssl.so.1.1
s->ctx->info_callback;
executed 72 times by 1 test: return s->ctx->info_callback;
Executed by:
  • libssl.so.1.1
72
190-
191 return
executed 60257 times by 1 test: return ((void *)0) ;
Executed by:
  • libssl.so.1.1
executed 60257 times by 1 test: return ((void *)0) ;
Executed by:
  • libssl.so.1.1
60257
192 ((void *)0)
executed 60257 times by 1 test: return ((void *)0) ;
Executed by:
  • libssl.so.1.1
60257
193 ;
executed 60257 times by 1 test: return ((void *)0) ;
Executed by:
  • libssl.so.1.1
60257
194}-
195static int state_machine(SSL *s, int server)-
196{-
197 BUF_MEM *buf = -
198 ((void *)0)-
199 ;-
200 void (*cb) (const SSL *ssl, int type, int val) = -
201 ((void *)0)-
202 ;-
203 OSSL_STATEM *st = &s->statem;-
204 int ret = -1;-
205 int ssret;-
206-
207 if (st->state == MSG_FLOW_ERROR
st->state == MSG_FLOW_ERRORDescription
TRUEevaluated 454 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 29236 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
454-29236
208-
209 return
executed 454 times by 1 test: return -1;
Executed by:
  • libssl.so.1.1
-1;
executed 454 times by 1 test: return -1;
Executed by:
  • libssl.so.1.1
454
210 }-
211-
212 ERR_clear_error();-
213 -
214 (*__errno_location ())-
215 =0;-
216-
217 cb = get_callback(s);-
218-
219 st->in_handshake++;-
220 if (!SSL_in_init(s)
!SSL_in_init(s)Description
TRUEnever evaluated
FALSEevaluated 29236 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| SSL_in_before(s)
SSL_in_before(s)Description
TRUEevaluated 8001 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 21235 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-29236
221-
222-
223-
224-
225 if ((
(s->s3->flags & 0x0800) == 0Description
TRUEevaluated 7997 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->s3->flags & 0x0800) == 0
(s->s3->flags & 0x0800) == 0Description
TRUEevaluated 7997 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& !SSL_clear(s)
!SSL_clear(s)Description
TRUEnever evaluated
FALSEevaluated 7997 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-7997
226 return
never executed: return -1;
-1;
never executed: return -1;
0
227 }
executed 8001 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
8001
228 if (st->state == MSG_FLOW_UNINITED
st->state == MSG_FLOW_UNINITEDDescription
TRUEevaluated 8001 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 21235 times by 1 test
Evaluated by:
  • libssl.so.1.1
8001-21235
229 || st->state == MSG_FLOW_FINISHED
st->state == MSG_FLOW_FINISHEDDescription
TRUEevaluated 1289 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 19946 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1289-19946
230 if (st->state == MSG_FLOW_UNINITED
st->state == MSG_FLOW_UNINITEDDescription
TRUEevaluated 8001 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1289 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1289-8001
231 st->hand_state = TLS_ST_BEFORE;-
232 st->request_state = TLS_ST_BEFORE;-
233 }
executed 8001 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
8001
234-
235 s->server = server;-
236 if (cb !=
cb != ((void *)0)Description
TRUEevaluated 3005 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6285 times by 1 test
Evaluated by:
  • libssl.so.1.1
3005-6285
237 ((void *)0)
cb != ((void *)0)Description
TRUEevaluated 3005 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6285 times by 1 test
Evaluated by:
  • libssl.so.1.1
3005-6285
238 )-
239 cb(s, 0x10, 1);
executed 3005 times by 1 test: cb(s, 0x10, 1);
Executed by:
  • libssl.so.1.1
3005
240-
241-
242-
243-
244-
245-
246-
247 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 384 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8906 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 384 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8906 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
384-8906
248 if ((
(s->version & ...FEFF & 0xff00)Description
TRUEnever evaluated
FALSEevaluated 384 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->version & 0xff00) != (0xFEFF & 0xff00)
(s->version & ...FEFF & 0xff00)Description
TRUEnever evaluated
FALSEevaluated 384 times by 1 test
Evaluated by:
  • libssl.so.1.1
&&
0-384
249 (server
serverDescription
TRUEnever evaluated
FALSEnever evaluated
|| (
(s->version & ...0100 & 0xff00)Description
TRUEnever evaluated
FALSEnever evaluated
s->version & 0xff00) != (0x0100 & 0xff00)
(s->version & ...0100 & 0xff00)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
250 ossl_statem_fatal((s), (-1), (353), ((4|64)),-
251 __FILE__-
252 ,-
253 358-
254 )-
255 ;-
256 goto
never executed: goto end;
end;
never executed: goto end;
0
257 }-
258 }
executed 384 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
384
259 if ((
(s->version >> 8) != 0x03Description
TRUEnever evaluated
FALSEevaluated 8906 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->version >> 8) != 0x03
(s->version >> 8) != 0x03Description
TRUEnever evaluated
FALSEevaluated 8906 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-8906
260 ossl_statem_fatal((s), (-1), (353), ((4|64)),-
261 __FILE__-
262 ,-
263 364-
264 )-
265 ;-
266 goto
never executed: goto end;
end;
never executed: goto end;
0
267 }-
268 }
executed 8906 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
8906
269-
270 if (!ssl_security(s, (9 | 0), 0, s->version,
!ssl_security(... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 9290 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-9290
271 ((void *)0)
!ssl_security(... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 9290 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-9290
272 )
!ssl_security(... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 9290 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-9290
273 ossl_statem_fatal((s), (-1), (353), ((4|64)),-
274 __FILE__-
275 ,-
276 371-
277 )-
278 ;-
279 goto
never executed: goto end;
end;
never executed: goto end;
0
280 }-
281-
282 if (s->init_buf ==
s->init_buf == ((void *)0)Description
TRUEevaluated 9222 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 68 times by 1 test
Evaluated by:
  • libssl.so.1.1
68-9222
283 ((void *)0)
s->init_buf == ((void *)0)Description
TRUEevaluated 9222 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 68 times by 1 test
Evaluated by:
  • libssl.so.1.1
68-9222
284 ) {-
285 if ((
(buf = BUF_MEM...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 9222 times by 1 test
Evaluated by:
  • libssl.so.1.1
buf = BUF_MEM_new()) ==
(buf = BUF_MEM...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 9222 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-9222
286 ((void *)0)
(buf = BUF_MEM...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 9222 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-9222
287 ) {-
288 ossl_statem_fatal((s), (-1), (353), ((4|64)),-
289 __FILE__-
290 ,-
291 378-
292 )-
293 ;-
294 goto
never executed: goto end;
end;
never executed: goto end;
0
295 }-
296 if (!BUF_MEM_grow(buf, 16384)
!BUF_MEM_grow(buf, 16384)Description
TRUEnever evaluated
FALSEevaluated 9222 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-9222
297 ossl_statem_fatal((s), (-1), (353), ((4|64)),-
298 __FILE__-
299 ,-
300 383-
301 )-
302 ;-
303 goto
never executed: goto end;
end;
never executed: goto end;
0
304 }-
305 s->init_buf = buf;-
306 buf = -
307 ((void *)0)-
308 ;-
309 }
executed 9222 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
9222
310-
311 if (!ssl3_setup_buffers(s)
!ssl3_setup_buffers(s)Description
TRUEnever evaluated
FALSEevaluated 9290 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-9290
312 ossl_statem_fatal((s), (-1), (353), ((4|64)),-
313 __FILE__-
314 ,-
315 392-
316 )-
317 ;-
318 goto
never executed: goto end;
end;
never executed: goto end;
0
319 }-
320 s->init_num = 0;-
321-
322-
323-
324-
325 s->s3->change_cipher_spec = 0;-
326 if (!ssl_init_wbio_buffer(s)
!ssl_init_wbio_buffer(s)Description
TRUEnever evaluated
FALSEevaluated 9290 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-9290
327 ossl_statem_fatal((s), (-1), (353), ((4|64)),-
328 __FILE__-
329 ,-
330 411-
331 )-
332 ;-
333 goto
never executed: goto end;
end;
never executed: goto end;
0
334 }-
335-
336 if ((
(SSL_in_before(s))Description
TRUEevaluated 8001 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1289 times by 1 test
Evaluated by:
  • libssl.so.1.1
SSL_in_before(s))
(SSL_in_before(s))Description
TRUEevaluated 8001 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1289 times by 1 test
Evaluated by:
  • libssl.so.1.1
1289-8001
337 || s->renegotiate
s->renegotiateDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1257 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
32-1257
338 if (!tls_setup_handshake(s)
!tls_setup_handshake(s)Description
TRUEevaluated 49 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7984 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
49-7984
339-
340 goto
executed 49 times by 1 test: goto end;
Executed by:
  • libssl.so.1.1
end;
executed 49 times by 1 test: goto end;
Executed by:
  • libssl.so.1.1
49
341 }-
342-
343 if (((
(s)->s3->tmp.f...sh_md_len == 0Description
TRUEevaluated 7952 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 32 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->s3->tmp.finish_md_len == 0
(s)->s3->tmp.f...sh_md_len == 0Description
TRUEevaluated 7952 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 32 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| (
(s)->s3->tmp.p...sh_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 32 times by 1 test
Evaluated by:
  • libssl.so.1.1
s)->s3->tmp.peer_finish_md_len == 0
(s)->s3->tmp.p...sh_md_len == 0Description
TRUEnever evaluated
FALSEevaluated 32 times by 1 test
Evaluated by:
  • libssl.so.1.1
))
0-7952
344 st->read_state_first_init = 1;
executed 7952 times by 1 test: st->read_state_first_init = 1;
Executed by:
  • libssl.so.1.1
7952
345 }
executed 7984 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
7984
346-
347 st->state = MSG_FLOW_WRITING;-
348 init_write_state_machine(s);-
349 }
executed 9241 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
9241
350-
351 while (st->state != MSG_FLOW_FINISHED
st->state != MSG_FLOW_FINISHEDDescription
TRUEevaluated 51503 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4486 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
4486-51503
352 if (st->state == MSG_FLOW_READING
st->state == MSG_FLOW_READINGDescription
TRUEevaluated 32819 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 18684 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
18684-32819
353 ssret = read_state_machine(s);-
354 if (ssret == SUB_STATE_FINISHED
ssret == SUB_STATE_FINISHEDDescription
TRUEevaluated 8827 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23992 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
8827-23992
355 st->state = MSG_FLOW_WRITING;-
356 init_write_state_machine(s);-
357 }
executed 8827 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
8827
358-
359 goto
executed 23992 times by 1 test: goto end;
Executed by:
  • libssl.so.1.1
end;
executed 23992 times by 1 test: goto end;
Executed by:
  • libssl.so.1.1
23992
360 }-
361 } else if (st->state == MSG_FLOW_WRITING
st->state == MSG_FLOW_WRITINGDescription
TRUEevaluated 18684 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) {
0-18684
362 ssret = write_state_machine(s);-
363 if (ssret == SUB_STATE_FINISHED
ssret == SUB_STATE_FINISHEDDescription
TRUEevaluated 13489 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 5195 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
5195-13489
364 st->state = MSG_FLOW_READING;-
365 init_read_state_machine(s);-
366 }
executed 13489 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else if (ssret == SUB_STATE_END_HANDSHAKE
ssret == SUB_S..._END_HANDSHAKEDescription
TRUEevaluated 4486 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 709 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
709-13489
367 st->state = MSG_FLOW_FINISHED;-
368 }
executed 4486 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
4486
369-
370 goto
executed 709 times by 1 test: goto end;
Executed by:
  • libssl.so.1.1
end;
executed 709 times by 1 test: goto end;
Executed by:
  • libssl.so.1.1
709
371 }-
372 } else {-
373-
374 do { if (!(((
(s)->statem.in_initDescription
TRUEnever evaluated
FALSEnever evaluated
s)->statem.in_init
(s)->statem.in_initDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEnever evaluated
FALSEnever evaluated
s)->statem.state == MSG_FLOW_ERROR
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEnever evaluated
FALSEnever evaluated
) != 0)
!(((s)->statem...W_ERROR) != 0)Description
TRUEnever evaluated
FALSEnever evaluated
) ossl_statem_fatal((s), (80), ((353)), (256), __FILE__, 453);
never executed: ossl_statem_fatal((s), (80), ((353)), (256), __FILE__, 453);
} while (0);
0
375 ERR_put_error(20,(353),((2|64)),__FILE__,454);-
376 goto
never executed: goto end;
end;
never executed: goto end;
0
377 }-
378 }-
379-
380 ret = 1;-
381-
382 end:
code before this statement executed 4486 times by 1 test: end:
Executed by:
  • libssl.so.1.1
4486
383 st->in_handshake--;-
384 BUF_MEM_free(buf);-
385 if (cb !=
cb != ((void *)0)Description
TRUEevaluated 5872 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23364 times by 1 test
Evaluated by:
  • libssl.so.1.1
5872-23364
386 ((void *)0)
cb != ((void *)0)Description
TRUEevaluated 5872 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23364 times by 1 test
Evaluated by:
  • libssl.so.1.1
5872-23364
387 ) {-
388 if (server
serverDescription
TRUEevaluated 2220 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3652 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
2220-3652
389 cb(s, (0x2000|0x02), ret);
executed 2220 times by 1 test: cb(s, (0x2000|0x02), ret);
Executed by:
  • libssl.so.1.1
2220
390 else-
391 cb(s, (0x1000|0x02), ret);
executed 3652 times by 1 test: cb(s, (0x1000|0x02), ret);
Executed by:
  • libssl.so.1.1
3652
392 }-
393 return
executed 29236 times by 1 test: return ret;
Executed by:
  • libssl.so.1.1
ret;
executed 29236 times by 1 test: return ret;
Executed by:
  • libssl.so.1.1
29236
394}-
395-
396-
397-
398-
399static void init_read_state_machine(SSL *s)-
400{-
401 OSSL_STATEM *st = &s->statem;-
402-
403 st->read_state = READ_STATE_HEADER;-
404}
executed 13489 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
13489
405-
406static int grow_init_buf(SSL *s, size_t size) {-
407-
408 size_t msg_offset = (char *)s->init_msg - s->init_buf->data;-
409-
410 if (!BUF_MEM_grow_clean(s->init_buf, (int)size)
!BUF_MEM_grow_...uf, (int)size)Description
TRUEnever evaluated
FALSEevaluated 21276 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-21276
411 return
never executed: return 0;
0;
never executed: return 0;
0
412-
413 if (size < msg_offset
size < msg_offsetDescription
TRUEnever evaluated
FALSEevaluated 21276 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-21276
414 return
never executed: return 0;
0;
never executed: return 0;
0
415-
416 s->init_msg = s->init_buf->data + msg_offset;-
417-
418 return
executed 21276 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 21276 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
21276
419}-
420static SUB_STATE_RETURN read_state_machine(SSL *s)-
421{-
422 OSSL_STATEM *st = &s->statem;-
423 int ret, mt;-
424 size_t len = 0;-
425 int (*transition) (SSL *s, int mt);-
426 PACKET pkt;-
427 MSG_PROCESS_RETURN(*process_message) (SSL *s, PACKET *pkt);-
428 WORK_STATE(*post_process_message) (SSL *s, WORK_STATE wst);-
429 size_t (*max_message_size) (SSL *s);-
430 void (*cb) (const SSL *ssl, int type, int val) = -
431 ((void *)0)-
432 ;-
433-
434 cb = get_callback(s);-
435-
436 if (s->server
s->serverDescription
TRUEevaluated 15292 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 17527 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
15292-17527
437 transition = ossl_statem_server_read_transition;-
438 process_message = ossl_statem_server_process_message;-
439 max_message_size = ossl_statem_server_max_message_size;-
440 post_process_message = ossl_statem_server_post_process_message;-
441 }
executed 15292 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
15292
442 transition = ossl_statem_client_read_transition;-
443 process_message = ossl_statem_client_process_message;-
444 max_message_size = ossl_statem_client_max_message_size;-
445 post_process_message = ossl_statem_client_post_process_message;-
446 }
executed 17527 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
17527
447-
448 if (st->read_state_first_init
st->read_state_first_initDescription
TRUEevaluated 7890 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24929 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
7890-24929
449 s->first_packet = 1;-
450 st->read_state_first_init = 0;-
451 }
executed 7890 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
7890
452-
453 while (1) {-
454 switch (st->read_state) {-
455 case
executed 42983 times by 1 test: case READ_STATE_HEADER:
Executed by:
  • libssl.so.1.1
READ_STATE_HEADER:
executed 42983 times by 1 test: case READ_STATE_HEADER:
Executed by:
  • libssl.so.1.1
42983
456-
457 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 2843 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 40140 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 2843 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 40140 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2843-40140
458-
459-
460-
461 ret = dtls_get_message(s, &mt, &len);-
462 }
executed 2843 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
2843
463 ret = tls_get_message_header(s, &mt);-
464 }
executed 40140 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
40140
465-
466 if (ret == 0
ret == 0Description
TRUEevaluated 18463 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24520 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
18463-24520
467-
468 return
executed 18463 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
SUB_STATE_ERROR;
executed 18463 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
18463
469 }-
470-
471 if (cb !=
cb != ((void *)0)Description
TRUEevaluated 10272 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 14248 times by 1 test
Evaluated by:
  • libssl.so.1.1
10272-14248
472 ((void *)0)
cb != ((void *)0)Description
TRUEevaluated 10272 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 14248 times by 1 test
Evaluated by:
  • libssl.so.1.1
10272-14248
473 ) {-
474-
475 if (s->server
s->serverDescription
TRUEevaluated 3573 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6699 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
3573-6699
476 cb(s, (0x2000|0x01), 1);
executed 3573 times by 1 test: cb(s, (0x2000|0x01), 1);
Executed by:
  • libssl.so.1.1
3573
477 else-
478 cb(s, (0x1000|0x01), 1);
executed 6699 times by 1 test: cb(s, (0x1000|0x01), 1);
Executed by:
  • libssl.so.1.1
6699
479 }-
480-
481-
482-
483-
484 if (!transition(s, mt)
!transition(s, mt)Description
TRUEevaluated 74 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24446 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
74-24446
485 return
executed 74 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
SUB_STATE_ERROR;
executed 74 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
74
486-
487 if (s->s3->tmp.message_size > max_message_size(s)
s->s3->tmp.mes...essage_size(s)Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24435 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
11-24435
488 ossl_statem_fatal((s), (47), (352), (152),-
489 __FILE__-
490 ,-
491 601-
492 )-
493 ;-
494 return
executed 11 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
SUB_STATE_ERROR;
executed 11 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
11
495 }-
496-
497-
498 if (!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 22570 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1865 times by 1 test
Evaluated by:
  • libssl.so.1.1
1865-22570
499 && s->s3->tmp.message_size > 0
s->s3->tmp.message_size > 0Description
TRUEevaluated 21276 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1294 times by 1 test
Evaluated by:
  • libssl.so.1.1
1294-21276
500 && !grow_init_buf(s, s->s3->tmp.message_size
!grow_init_buf...sage_size + 4)Description
TRUEnever evaluated
FALSEevaluated 21276 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-21276
501 + 4)
!grow_init_buf...sage_size + 4)Description
TRUEnever evaluated
FALSEevaluated 21276 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-21276
502 ossl_statem_fatal((s), (80), (352), (7),-
503 __FILE__-
504 ,-
505 611-
506 )-
507 ;-
508 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
509 }-
510-
511 st->read_state = READ_STATE_BODY;-
512-
513-
514 case
executed 2419 times by 1 test: case READ_STATE_BODY:
Executed by:
  • libssl.so.1.1
READ_STATE_BODY:
executed 2419 times by 1 test: case READ_STATE_BODY:
Executed by:
  • libssl.so.1.1
code before this statement executed 24435 times by 1 test: case READ_STATE_BODY:
Executed by:
  • libssl.so.1.1
2419-24435
515 if (!(s->method->ssl3_enc->enc_flags & 0x8)
!(s->method->s...c_flags & 0x8)Description
TRUEevaluated 24989 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1865 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1865-24989
516-
517 ret = tls_get_message_body(s, &len);-
518 if (ret == 0
ret == 0Description
TRUEevaluated 2478 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 22511 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2478-22511
519-
520 return
executed 2478 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
SUB_STATE_ERROR;
executed 2478 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
2478
521 }-
522 }
executed 22511 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
22511
523-
524 s->first_packet = 0;-
525 if (!PACKET_buf_init(&pkt, s->init_msg, len)
!PACKET_buf_in...init_msg, len)Description
TRUEnever evaluated
FALSEevaluated 24376 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-24376
526 ossl_statem_fatal((s), (80), (352), ((4|64)),-
527 __FILE__-
528 ,-
529 631-
530 )-
531 ;-
532 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
533 }-
534 ret = process_message(s, &pkt);-
535-
536-
537 s->init_num = 0;-
538-
539 switch (ret) {-
540 case
executed 1787 times by 1 test: case MSG_PROCESS_ERROR:
Executed by:
  • libssl.so.1.1
MSG_PROCESS_ERROR:
executed 1787 times by 1 test: case MSG_PROCESS_ERROR:
Executed by:
  • libssl.so.1.1
1787
541 do { if (!(((
(s)->statem.in_initDescription
TRUEevaluated 1787 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->statem.in_init
(s)->statem.in_initDescription
TRUEevaluated 1787 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&& (
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEevaluated 1787 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->statem.state == MSG_FLOW_ERROR
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEevaluated 1787 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) != 0)
!(((s)->statem...W_ERROR) != 0)Description
TRUEnever evaluated
FALSEevaluated 1787 times by 1 test
Evaluated by:
  • libssl.so.1.1
) ossl_statem_fatal((s), (80), ((352)), (256), __FILE__, 641);
never executed: ossl_statem_fatal((s), (80), ((352)), (256), __FILE__, 641);
} while (0);
0-1787
542 return
executed 1787 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
SUB_STATE_ERROR;
executed 1787 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
1787
543-
544 case
executed 6322 times by 1 test: case MSG_PROCESS_FINISHED_READING:
Executed by:
  • libssl.so.1.1
MSG_PROCESS_FINISHED_READING:
executed 6322 times by 1 test: case MSG_PROCESS_FINISHED_READING:
Executed by:
  • libssl.so.1.1
6322
545 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 524 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 5798 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 524 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 5798 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
524-5798
546 dtls1_stop_timer(s);-
547 }
executed 524 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
524
548 return
executed 6322 times by 1 test: return SUB_STATE_FINISHED;
Executed by:
  • libssl.so.1.1
SUB_STATE_FINISHED;
executed 6322 times by 1 test: return SUB_STATE_FINISHED;
Executed by:
  • libssl.so.1.1
6322
549-
550 case
executed 4929 times by 1 test: case MSG_PROCESS_CONTINUE_PROCESSING:
Executed by:
  • libssl.so.1.1
MSG_PROCESS_CONTINUE_PROCESSING:
executed 4929 times by 1 test: case MSG_PROCESS_CONTINUE_PROCESSING:
Executed by:
  • libssl.so.1.1
4929
551 st->read_state = READ_STATE_POST_PROCESS;-
552 st->read_state_work = WORK_MORE_A;-
553 break;
executed 4929 times by 1 test: break;
Executed by:
  • libssl.so.1.1
4929
554-
555 default
executed 11338 times by 1 test: default:
Executed by:
  • libssl.so.1.1
:
executed 11338 times by 1 test: default:
Executed by:
  • libssl.so.1.1
11338
556 st->read_state = READ_STATE_HEADER;-
557 break;
executed 11338 times by 1 test: break;
Executed by:
  • libssl.so.1.1
11338
558 }-
559 break;
executed 16267 times by 1 test: break;
Executed by:
  • libssl.so.1.1
16267
560-
561 case
executed 4932 times by 1 test: case READ_STATE_POST_PROCESS:
Executed by:
  • libssl.so.1.1
READ_STATE_POST_PROCESS:
executed 4932 times by 1 test: case READ_STATE_POST_PROCESS:
Executed by:
  • libssl.so.1.1
4932
562 st->read_state_work = post_process_message(s, st->read_state_work);-
563 switch (st->read_state_work) {-
564 case
executed 1176 times by 1 test: case WORK_ERROR:
Executed by:
  • libssl.so.1.1
WORK_ERROR:
executed 1176 times by 1 test: case WORK_ERROR:
Executed by:
  • libssl.so.1.1
1176
565 do { if (!(((
(s)->statem.in_initDescription
TRUEevaluated 1176 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->statem.in_init
(s)->statem.in_initDescription
TRUEevaluated 1176 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&& (
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEevaluated 1176 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->statem.state == MSG_FLOW_ERROR
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEevaluated 1176 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) != 0)
!(((s)->statem...W_ERROR) != 0)Description
TRUEnever evaluated
FALSEevaluated 1176 times by 1 test
Evaluated by:
  • libssl.so.1.1
) ossl_statem_fatal((s), (80), ((352)), (256), __FILE__, 665);
never executed: ossl_statem_fatal((s), (80), ((352)), (256), __FILE__, 665);
} while (0);
0-1176
566-
567 case
executed 1 time by 1 test: case WORK_MORE_A:
Executed by:
  • libssl.so.1.1
WORK_MORE_A:
executed 1 time by 1 test: case WORK_MORE_A:
Executed by:
  • libssl.so.1.1
code before this statement executed 1176 times by 1 test: case WORK_MORE_A:
Executed by:
  • libssl.so.1.1
1-1176
568 case
executed 2 times by 1 test: case WORK_MORE_B:
Executed by:
  • libssl.so.1.1
WORK_MORE_B:
executed 2 times by 1 test: case WORK_MORE_B:
Executed by:
  • libssl.so.1.1
2
569 case
never executed: case WORK_MORE_C:
WORK_MORE_C:
never executed: case WORK_MORE_C:
0
570 return
executed 1179 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
SUB_STATE_ERROR;
executed 1179 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
1179
571-
572 case
executed 1248 times by 1 test: case WORK_FINISHED_CONTINUE:
Executed by:
  • libssl.so.1.1
WORK_FINISHED_CONTINUE:
executed 1248 times by 1 test: case WORK_FINISHED_CONTINUE:
Executed by:
  • libssl.so.1.1
1248
573 st->read_state = READ_STATE_HEADER;-
574 break;
executed 1248 times by 1 test: break;
Executed by:
  • libssl.so.1.1
1248
575-
576 case
executed 2505 times by 1 test: case WORK_FINISHED_STOP:
Executed by:
  • libssl.so.1.1
WORK_FINISHED_STOP:
executed 2505 times by 1 test: case WORK_FINISHED_STOP:
Executed by:
  • libssl.so.1.1
2505
577 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 186 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2319 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 186 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2319 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
186-2319
578 dtls1_stop_timer(s);-
579 }
executed 186 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
186
580 return
executed 2505 times by 1 test: return SUB_STATE_FINISHED;
Executed by:
  • libssl.so.1.1
SUB_STATE_FINISHED;
executed 2505 times by 1 test: return SUB_STATE_FINISHED;
Executed by:
  • libssl.so.1.1
2505
581 }-
582 break;
executed 1248 times by 1 test: break;
Executed by:
  • libssl.so.1.1
1248
583-
584 default
never executed: default:
:
never executed: default:
0
585-
586 ossl_statem_fatal((s), (80), (352), ((4|64)),-
587 __FILE__-
588 ,-
589 687-
590 )-
591 ;-
592 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
593 }-
594 }-
595}
never executed: end of block
0
596-
597-
598-
599-
600static int statem_do_write(SSL *s)-
601{-
602 OSSL_STATEM *st = &s->statem;-
603-
604 if (st->hand_state == TLS_ST_CW_CHANGE
st->hand_state...S_ST_CW_CHANGEDescription
TRUEevaluated 2682 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 23243 times by 1 test
Evaluated by:
  • libssl.so.1.1
2682-23243
605 || st->hand_state == TLS_ST_SW_CHANGE
st->hand_state...S_ST_SW_CHANGEDescription
TRUEevaluated 1993 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 21250 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1993-21250
606 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 359 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4316 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 359 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4316 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
359-4316
607 return
executed 359 times by 1 test: return dtls1_do_write(s, 20);
Executed by:
  • libssl.so.1.1
dtls1_do_write(s, 20);
executed 359 times by 1 test: return dtls1_do_write(s, 20);
Executed by:
  • libssl.so.1.1
359
608 else-
609 return
executed 4316 times by 1 test: return ssl3_do_write(s, 20);
Executed by:
  • libssl.so.1.1
ssl3_do_write(s, 20);
executed 4316 times by 1 test: return ssl3_do_write(s, 20);
Executed by:
  • libssl.so.1.1
4316
610 } else {-
611 return
executed 21250 times by 1 test: return s->method->ssl3_enc->do_write(s);
Executed by:
  • libssl.so.1.1
s->method->ssl3_enc->do_write(s);
executed 21250 times by 1 test: return s->method->ssl3_enc->do_write(s);
Executed by:
  • libssl.so.1.1
21250
612 }-
613}-
614-
615-
616-
617-
618static void init_write_state_machine(SSL *s)-
619{-
620 OSSL_STATEM *st = &s->statem;-
621-
622 st->write_state = WRITE_STATE_TRANSITION;-
623}
executed 18068 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
18068
624static SUB_STATE_RETURN write_state_machine(SSL *s)-
625{-
626 OSSL_STATEM *st = &s->statem;-
627 int ret;-
628 WRITE_TRAN(*transition) (SSL *s);-
629 WORK_STATE(*pre_work) (SSL *s, WORK_STATE wst);-
630 WORK_STATE(*post_work) (SSL *s, WORK_STATE wst);-
631 int (*get_construct_message_f) (SSL *s, WPACKET *pkt,-
632 int (**confunc) (SSL *s, WPACKET *pkt),-
633 int *mt);-
634 void (*cb) (const SSL *ssl, int type, int val) = -
635 ((void *)0)-
636 ;-
637 int (*confunc) (SSL *s, WPACKET *pkt);-
638 int mt;-
639 WPACKET pkt;-
640-
641 cb = get_callback(s);-
642-
643 if (s->server
s->serverDescription
TRUEevaluated 8486 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 10198 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
8486-10198
644 transition = ossl_statem_server_write_transition;-
645 pre_work = ossl_statem_server_pre_work;-
646 post_work = ossl_statem_server_post_work;-
647 get_construct_message_f = ossl_statem_server_construct_message;-
648 }
executed 8486 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
8486
649 transition = ossl_statem_client_write_transition;-
650 pre_work = ossl_statem_client_pre_work;-
651 post_work = ossl_statem_client_post_work;-
652 get_construct_message_f = ossl_statem_client_construct_message;-
653 }
executed 10198 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
10198
654-
655 while (1) {-
656 switch (st->write_state) {-
657 case
executed 44838 times by 1 test: case WRITE_STATE_TRANSITION:
Executed by:
  • libssl.so.1.1
WRITE_STATE_TRANSITION:
executed 44838 times by 1 test: case WRITE_STATE_TRANSITION:
Executed by:
  • libssl.so.1.1
44838
658 if (cb !=
cb != ((void *)0)Description
TRUEevaluated 18455 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 26383 times by 1 test
Evaluated by:
  • libssl.so.1.1
18455-26383
659 ((void *)0)
cb != ((void *)0)Description
TRUEevaluated 18455 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 26383 times by 1 test
Evaluated by:
  • libssl.so.1.1
18455-26383
660 ) {-
661-
662 if (s->server
s->serverDescription
TRUEevaluated 10491 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7964 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
7964-10491
663 cb(s, (0x2000|0x01), 1);
executed 10491 times by 1 test: cb(s, (0x2000|0x01), 1);
Executed by:
  • libssl.so.1.1
10491
664 else-
665 cb(s, (0x1000|0x01), 1);
executed 7964 times by 1 test: cb(s, (0x1000|0x01), 1);
Executed by:
  • libssl.so.1.1
7964
666 }-
667 switch (transition(s)) {-
668 case
executed 31349 times by 1 test: case WRITE_TRAN_CONTINUE:
Executed by:
  • libssl.so.1.1
WRITE_TRAN_CONTINUE:
executed 31349 times by 1 test: case WRITE_TRAN_CONTINUE:
Executed by:
  • libssl.so.1.1
31349
669 st->write_state = WRITE_STATE_PRE_WORK;-
670 st->write_state_work = WORK_MORE_A;-
671 break;
executed 31349 times by 1 test: break;
Executed by:
  • libssl.so.1.1
31349
672-
673 case
executed 13489 times by 1 test: case WRITE_TRAN_FINISHED:
Executed by:
  • libssl.so.1.1
WRITE_TRAN_FINISHED:
executed 13489 times by 1 test: case WRITE_TRAN_FINISHED:
Executed by:
  • libssl.so.1.1
13489
674 return
executed 13489 times by 1 test: return SUB_STATE_FINISHED;
Executed by:
  • libssl.so.1.1
SUB_STATE_FINISHED;
executed 13489 times by 1 test: return SUB_STATE_FINISHED;
Executed by:
  • libssl.so.1.1
13489
675 break;
dead code: break;
-
676-
677 case
never executed: case WRITE_TRAN_ERROR:
WRITE_TRAN_ERROR:
never executed: case WRITE_TRAN_ERROR:
0
678 do { if (!(((
(s)->statem.in_initDescription
TRUEnever evaluated
FALSEnever evaluated
s)->statem.in_init
(s)->statem.in_initDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEnever evaluated
FALSEnever evaluated
s)->statem.state == MSG_FLOW_ERROR
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEnever evaluated
FALSEnever evaluated
) != 0)
!(((s)->statem...W_ERROR) != 0)Description
TRUEnever evaluated
FALSEnever evaluated
) ossl_statem_fatal((s), (80), ((586)), (256), __FILE__, 802);
never executed: ossl_statem_fatal((s), (80), ((586)), (256), __FILE__, 802);
} while (0);
0
679 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
680 }-
681 break;
executed 31349 times by 1 test: break;
Executed by:
  • libssl.so.1.1
31349
682-
683 case
executed 31349 times by 1 test: case WRITE_STATE_PRE_WORK:
Executed by:
  • libssl.so.1.1
WRITE_STATE_PRE_WORK:
executed 31349 times by 1 test: case WRITE_STATE_PRE_WORK:
Executed by:
  • libssl.so.1.1
31349
684 switch (st->write_state_work = pre_work(s, st->write_state_work)) {-
685 case
never executed: case WORK_ERROR:
WORK_ERROR:
never executed: case WORK_ERROR:
0
686 do { if (!(((
(s)->statem.in_initDescription
TRUEnever evaluated
FALSEnever evaluated
s)->statem.in_init
(s)->statem.in_initDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEnever evaluated
FALSEnever evaluated
s)->statem.state == MSG_FLOW_ERROR
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEnever evaluated
FALSEnever evaluated
) != 0)
!(((s)->statem...W_ERROR) != 0)Description
TRUEnever evaluated
FALSEnever evaluated
) ossl_statem_fatal((s), (80), ((586)), (256), __FILE__, 810);
never executed: ossl_statem_fatal((s), (80), ((586)), (256), __FILE__, 810);
} while (0);
0
687-
688 case
never executed: case WORK_MORE_A:
WORK_MORE_A:
never executed: case WORK_MORE_A:
code before this statement never executed: case WORK_MORE_A:
0
689 case
never executed: case WORK_MORE_B:
WORK_MORE_B:
never executed: case WORK_MORE_B:
0
690 case
never executed: case WORK_MORE_C:
WORK_MORE_C:
never executed: case WORK_MORE_C:
0
691 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
692-
693 case
executed 26863 times by 1 test: case WORK_FINISHED_CONTINUE:
Executed by:
  • libssl.so.1.1
WORK_FINISHED_CONTINUE:
executed 26863 times by 1 test: case WORK_FINISHED_CONTINUE:
Executed by:
  • libssl.so.1.1
26863
694 st->write_state = WRITE_STATE_SEND;-
695 break;
executed 26863 times by 1 test: break;
Executed by:
  • libssl.so.1.1
26863
696-
697 case
executed 4486 times by 1 test: case WORK_FINISHED_STOP:
Executed by:
  • libssl.so.1.1
WORK_FINISHED_STOP:
executed 4486 times by 1 test: case WORK_FINISHED_STOP:
Executed by:
  • libssl.so.1.1
4486
698 return
executed 4486 times by 1 test: return SUB_STATE_END_HANDSHAKE;
Executed by:
  • libssl.so.1.1
SUB_STATE_END_HANDSHAKE;
executed 4486 times by 1 test: return SUB_STATE_END_HANDSHAKE;
Executed by:
  • libssl.so.1.1
4486
699 }-
700 if (!get_construct_message_f(s, &pkt, &confunc, &mt)
!get_construct...&confunc, &mt)Description
TRUEnever evaluated
FALSEevaluated 26863 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-26863
701-
702 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
703 }-
704 if (mt == -1
mt == -1Description
TRUEevaluated 845 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 26018 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
845-26018
705-
706 st->write_state = WRITE_STATE_POST_WORK;-
707 st->write_state_work = WORK_MORE_A;-
708 break;
executed 845 times by 1 test: break;
Executed by:
  • libssl.so.1.1
845
709 }-
710 if (!WPACKET_init(&pkt, s->init_buf)
!WPACKET_init(..., s->init_buf)Description
TRUEnever evaluated
FALSEevaluated 26018 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-26018
711 || !s->method->ssl3_enc->set_handshake_header((s), (&pkt), (mt))
!s->method->ss... (&pkt), (mt))Description
TRUEnever evaluated
FALSEevaluated 26018 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-26018
712 WPACKET_cleanup(&pkt);-
713 ossl_statem_fatal((s), (80), (586), ((4|64)),-
714 __FILE__-
715 ,-
716 838-
717 )-
718 ;-
719 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
720 }-
721 if (confunc !=
confunc != ((void *)0)Description
TRUEevaluated 26010 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libssl.so.1.1
8-26010
722 ((void *)0)
confunc != ((void *)0)Description
TRUEevaluated 26010 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libssl.so.1.1
8-26010
723 && !confunc(s, &pkt)
!confunc(s, &pkt)Description
TRUEevaluated 93 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 25917 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
93-25917
724 WPACKET_cleanup(&pkt);-
725 do { if (!(((
(s)->statem.in_initDescription
TRUEevaluated 93 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->statem.in_init
(s)->statem.in_initDescription
TRUEevaluated 93 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&& (
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEevaluated 93 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s)->statem.state == MSG_FLOW_ERROR
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEevaluated 93 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) != 0)
!(((s)->statem...W_ERROR) != 0)Description
TRUEnever evaluated
FALSEevaluated 93 times by 1 test
Evaluated by:
  • libssl.so.1.1
) ossl_statem_fatal((s), (80), ((586)), (256), __FILE__, 843);
never executed: ossl_statem_fatal((s), (80), ((586)), (256), __FILE__, 843);
} while (0);
0-93
726 return
executed 93 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
SUB_STATE_ERROR;
executed 93 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
93
727 }-
728 if (!s->method->ssl3_enc->close_construct_packet((s), (&pkt), (mt))
!s->method->ss... (&pkt), (mt))Description
TRUEnever evaluated
FALSEevaluated 25925 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-25925
729 || !WPACKET_finish(&pkt)
!WPACKET_finish(&pkt)Description
TRUEnever evaluated
FALSEevaluated 25925 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-25925
730 WPACKET_cleanup(&pkt);-
731 ossl_statem_fatal((s), (80), (586), ((4|64)),-
732 __FILE__-
733 ,-
734 850-
735 )-
736 ;-
737 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
738 }-
739-
740-
741-
742 case
never executed: case WRITE_STATE_SEND:
code before this statement executed 25925 times by 1 test: case WRITE_STATE_SEND:
Executed by:
  • libssl.so.1.1
never executed: case WRITE_STATE_SEND:
WRITE_STATE_SEND:
code before this statement executed 25925 times by 1 test: case WRITE_STATE_SEND:
Executed by:
  • libssl.so.1.1
never executed: case WRITE_STATE_SEND:
0-25925
743 if ((
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 1891 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24034 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->method->ssl3_enc->enc_flags & 0x8)
(s->method->ss...c_flags & 0x8)Description
TRUEevaluated 1891 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 24034 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& st->use_timer
st->use_timerDescription
TRUEevaluated 1356 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 535 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
535-24034
744 dtls1_start_timer(s);-
745 }
executed 1356 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
1356
746 ret = statem_do_write(s);-
747 if (ret <= 0
ret <= 0Description
TRUEnever evaluated
FALSEevaluated 25925 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-25925
748 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
749 }-
750 st->write_state = WRITE_STATE_POST_WORK;-
751 st->write_state_work = WORK_MORE_A;-
752-
753-
754 case
executed 1461 times by 1 test: case WRITE_STATE_POST_WORK:
Executed by:
  • libssl.so.1.1
WRITE_STATE_POST_WORK:
executed 1461 times by 1 test: case WRITE_STATE_POST_WORK:
Executed by:
  • libssl.so.1.1
code before this statement executed 25925 times by 1 test: case WRITE_STATE_POST_WORK:
Executed by:
  • libssl.so.1.1
1461-25925
755 switch (st->write_state_work = post_work(s, st->write_state_work)) {-
756 case
never executed: case WORK_ERROR:
WORK_ERROR:
never executed: case WORK_ERROR:
0
757 do { if (!(((
(s)->statem.in_initDescription
TRUEnever evaluated
FALSEnever evaluated
s)->statem.in_init
(s)->statem.in_initDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEnever evaluated
FALSEnever evaluated
s)->statem.state == MSG_FLOW_ERROR
(s)->statem.st...MSG_FLOW_ERRORDescription
TRUEnever evaluated
FALSEnever evaluated
) != 0)
!(((s)->statem...W_ERROR) != 0)Description
TRUEnever evaluated
FALSEnever evaluated
) ossl_statem_fatal((s), (80), ((586)), (256), __FILE__, 871);
never executed: ossl_statem_fatal((s), (80), ((586)), (256), __FILE__, 871);
} while (0);
0
758-
759 case
executed 512 times by 1 test: case WORK_MORE_A:
Executed by:
  • libssl.so.1.1
code before this statement never executed: case WORK_MORE_A:
executed 512 times by 1 test: case WORK_MORE_A:
Executed by:
  • libssl.so.1.1
WORK_MORE_A:
code before this statement never executed: case WORK_MORE_A:
executed 512 times by 1 test: case WORK_MORE_A:
Executed by:
  • libssl.so.1.1
0-512
760 case
executed 104 times by 1 test: case WORK_MORE_B:
Executed by:
  • libssl.so.1.1
WORK_MORE_B:
executed 104 times by 1 test: case WORK_MORE_B:
Executed by:
  • libssl.so.1.1
104
761 case
never executed: case WORK_MORE_C:
WORK_MORE_C:
never executed: case WORK_MORE_C:
0
762 return
executed 616 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
SUB_STATE_ERROR;
executed 616 times by 1 test: return SUB_STATE_ERROR;
Executed by:
  • libssl.so.1.1
616
763-
764 case
executed 26770 times by 1 test: case WORK_FINISHED_CONTINUE:
Executed by:
  • libssl.so.1.1
WORK_FINISHED_CONTINUE:
executed 26770 times by 1 test: case WORK_FINISHED_CONTINUE:
Executed by:
  • libssl.so.1.1
26770
765 st->write_state = WRITE_STATE_TRANSITION;-
766 break;
executed 26770 times by 1 test: break;
Executed by:
  • libssl.so.1.1
26770
767-
768 case
never executed: case WORK_FINISHED_STOP:
WORK_FINISHED_STOP:
never executed: case WORK_FINISHED_STOP:
0
769 return
never executed: return SUB_STATE_END_HANDSHAKE;
SUB_STATE_END_HANDSHAKE;
never executed: return SUB_STATE_END_HANDSHAKE;
0
770 }-
771 break;
executed 26770 times by 1 test: break;
Executed by:
  • libssl.so.1.1
26770
772-
773 default
never executed: default:
:
never executed: default:
0
774 ossl_statem_fatal((s), (80), (586), ((4|64)),-
775 __FILE__-
776 ,-
777 889-
778 )-
779 ;-
780 return
never executed: return SUB_STATE_ERROR;
SUB_STATE_ERROR;
never executed: return SUB_STATE_ERROR;
0
781 }-
782 }-
783}
never executed: end of block
0
784-
785-
786-
787-
788int statem_flush(SSL *s)-
789{-
790 s->rwstate = 2;-
791 if ((
(int)BIO_ctrl(...id *)0) ) <= 0Description
TRUEevaluated 616 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 11529 times by 1 test
Evaluated by:
  • libssl.so.1.1
int)BIO_ctrl(s->wbio,11,0,
(int)BIO_ctrl(...id *)0) ) <= 0Description
TRUEevaluated 616 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 11529 times by 1 test
Evaluated by:
  • libssl.so.1.1
616-11529
792 ((void *)0)
(int)BIO_ctrl(...id *)0) ) <= 0Description
TRUEevaluated 616 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 11529 times by 1 test
Evaluated by:
  • libssl.so.1.1
616-11529
793 ) <= 0
(int)BIO_ctrl(...id *)0) ) <= 0Description
TRUEevaluated 616 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 11529 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
616-11529
794 return
executed 616 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 616 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
616
795 }-
796 s->rwstate = 1;-
797-
798 return
executed 11529 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 11529 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
11529
799}-
800int ossl_statem_app_data_allowed(SSL *s)-
801{-
802 OSSL_STATEM *st = &s->statem;-
803-
804 if (st->state == MSG_FLOW_UNINITED
st->state == MSG_FLOW_UNINITEDDescription
TRUEnever evaluated
FALSEevaluated 219 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-219
805 return
never executed: return 0;
0;
never executed: return 0;
0
806-
807 if (!s->s3->in_read_app_data
!s->s3->in_read_app_dataDescription
TRUEevaluated 213 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| (
(s->s3->total_...tiations == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
s->s3->total_renegotiations == 0)
(s->s3->total_...tiations == 0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-213
808 return
executed 219 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 219 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
219
809-
810 if (s->server
s->serverDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
811-
812-
813-
814-
815 if (st->hand_state == TLS_ST_BEFORE
st->hand_state... TLS_ST_BEFOREDescription
TRUEnever evaluated
FALSEnever evaluated
0
816 || st->hand_state == TLS_ST_SR_CLNT_HELLO
st->hand_state..._SR_CLNT_HELLODescription
TRUEnever evaluated
FALSEnever evaluated
)
0
817 return
never executed: return 1;
1;
never executed: return 1;
0
818 }
never executed: end of block
else {
0
819-
820-
821-
822-
823 if (st->hand_state == TLS_ST_CW_CLNT_HELLO
st->hand_state..._CW_CLNT_HELLODescription
TRUEnever evaluated
FALSEnever evaluated
)
0
824 return
never executed: return 1;
1;
never executed: return 1;
0
825 }
never executed: end of block
0
826-
827 return
never executed: return 0;
0;
never executed: return 0;
0
828}-
829-
830-
831-
832-
833-
834int ossl_statem_export_allowed(SSL *s)-
835{-
836 return
executed 6 times by 1 test: return s->s3->previous_server_finished_len != 0 && s->statem.hand_state != TLS_ST_SW_FINISHED;
Executed by:
  • libssl.so.1.1
s->s3->previous_server_finished_len != 0
s->s3->previou...ished_len != 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
executed 6 times by 1 test: return s->s3->previous_server_finished_len != 0 && s->statem.hand_state != TLS_ST_SW_FINISHED;
Executed by:
  • libssl.so.1.1
0-6
837 && s->statem.hand_state != TLS_ST_SW_FINISHED
s->statem.hand...ST_SW_FINISHEDDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
;
executed 6 times by 1 test: return s->s3->previous_server_finished_len != 0 && s->statem.hand_state != TLS_ST_SW_FINISHED;
Executed by:
  • libssl.so.1.1
0-6
838}-
839-
840-
841-
842-
843-
844int ossl_statem_export_early_allowed(SSL *s)-
845{-
846-
847-
848-
849-
850-
851 return
executed 12 times by 1 test: return s->ext.early_data == 2 || (!s->server && s->ext.early_data != 0);
Executed by:
  • libssl.so.1.1
s->ext.early_data == 2
s->ext.early_data == 2Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
executed 12 times by 1 test: return s->ext.early_data == 2 || (!s->server && s->ext.early_data != 0);
Executed by:
  • libssl.so.1.1
6-12
852 || (!s->server
!s->serverDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&& s->ext.early_data != 0
s->ext.early_data != 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
);
executed 12 times by 1 test: return s->ext.early_data == 2 || (!s->server && s->ext.early_data != 0);
Executed by:
  • libssl.so.1.1
0-12
853}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2