OpenCoverage

rec_layer_d1.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/record/rec_layer_d1.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl)-
5{-
6 DTLS_RECORD_LAYER *d;-
7-
8 if ((
(d = CRYPTO_ma...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 373 times by 1 test
Evaluated by:
  • libssl.so.1.1
d = CRYPTO_malloc(sizeof(*d), __FILE__, 23)) ==
(d = CRYPTO_ma...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 373 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-373
9 ((void *)0)
(d = CRYPTO_ma...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 373 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-373
10 ) {-
11 ERR_put_error(20,(635),((1|64)),__FILE__,24);-
12 return
never executed: return 0;
0;
never executed: return 0;
0
13 }-
14-
15 rl->d = d;-
16-
17 d->unprocessed_rcds.q = pqueue_new();-
18 d->processed_rcds.q = pqueue_new();-
19 d->buffered_app_data.q = pqueue_new();-
20-
21 if (d->unprocessed_rcds.q ==
d->unprocessed...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 373 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-373
22 ((void *)0)
d->unprocessed...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 373 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-373
23 || d->processed_rcds.q ==
d->processed_r...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 373 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-373
24 ((void *)0)
d->processed_r...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 373 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-373
25 -
26 || d->buffered_app_data.q ==
d->buffered_ap...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 373 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-373
27 ((void *)0)
d->buffered_ap...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 373 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-373
28 ) {-
29 pqueue_free(d->unprocessed_rcds.q);-
30 pqueue_free(d->processed_rcds.q);-
31 pqueue_free(d->buffered_app_data.q);-
32 CRYPTO_free(d, __FILE__, 39);-
33 rl->d = -
34 ((void *)0)-
35 ;-
36 return
never executed: return 0;
0;
never executed: return 0;
0
37 }-
38-
39 return
executed 373 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 373 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
373
40}-
41-
42void DTLS_RECORD_LAYER_free(RECORD_LAYER *rl)-
43{-
44 DTLS_RECORD_LAYER_clear(rl);-
45 pqueue_free(rl->d->unprocessed_rcds.q);-
46 pqueue_free(rl->d->processed_rcds.q);-
47 pqueue_free(rl->d->buffered_app_data.q);-
48 CRYPTO_free(rl->d, __FILE__, 53);-
49 rl->d = -
50 ((void *)0)-
51 ;-
52}
executed 373 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
373
53-
54void DTLS_RECORD_LAYER_clear(RECORD_LAYER *rl)-
55{-
56 DTLS_RECORD_LAYER *d;-
57 pitem *item = -
58 ((void *)0)-
59 ;-
60 DTLS1_RECORD_DATA *rdata;-
61 pqueue *unprocessed_rcds;-
62 pqueue *processed_rcds;-
63 pqueue *buffered_app_data;-
64-
65 d = rl->d;-
66-
67 while ((
(item = pqueue...!= ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2608 times by 1 test
Evaluated by:
  • libssl.so.1.1
item = pqueue_pop(d->unprocessed_rcds.q)) !=
(item = pqueue...!= ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2608 times by 1 test
Evaluated by:
  • libssl.so.1.1
2-2608
68 ((void *)0)
(item = pqueue...!= ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2608 times by 1 test
Evaluated by:
  • libssl.so.1.1
2-2608
69 ) {-
70 rdata = (DTLS1_RECORD_DATA *)item->data;-
71 CRYPTO_free(rdata->rbuf.buf, __FILE__, 70);-
72 CRYPTO_free(item->data, __FILE__, 71);-
73 pitem_free(item);-
74 }
executed 2 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
2
75-
76 while ((
(item = pqueue...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2608 times by 1 test
Evaluated by:
  • libssl.so.1.1
item = pqueue_pop(d->processed_rcds.q)) !=
(item = pqueue...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2608 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2608
77 ((void *)0)
(item = pqueue...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2608 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2608
78 ) {-
79 rdata = (DTLS1_RECORD_DATA *)item->data;-
80 CRYPTO_free(rdata->rbuf.buf, __FILE__, 77);-
81 CRYPTO_free(item->data, __FILE__, 78);-
82 pitem_free(item);-
83 }
never executed: end of block
0
84-
85 while ((
(item = pqueue...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2608 times by 1 test
Evaluated by:
  • libssl.so.1.1
item = pqueue_pop(d->buffered_app_data.q)) !=
(item = pqueue...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2608 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2608
86 ((void *)0)
(item = pqueue...!= ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2608 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-2608
87 ) {-
88 rdata = (DTLS1_RECORD_DATA *)item->data;-
89 CRYPTO_free(rdata->rbuf.buf, __FILE__, 84);-
90 CRYPTO_free(item->data, __FILE__, 85);-
91 pitem_free(item);-
92 }
never executed: end of block
0
93-
94 unprocessed_rcds = d->unprocessed_rcds.q;-
95 processed_rcds = d->processed_rcds.q;-
96 buffered_app_data = d->buffered_app_data.q;-
97 memset(d, 0, sizeof(*d));-
98 d->unprocessed_rcds.q = unprocessed_rcds;-
99 d->processed_rcds.q = processed_rcds;-
100 d->buffered_app_data.q = buffered_app_data;-
101}
executed 2608 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
2608
102-
103void DTLS_RECORD_LAYER_set_saved_w_epoch(RECORD_LAYER *rl, unsigned short e)-
104{-
105 if (e == rl->d->w_epoch - 1
e == rl->d->w_epoch - 1Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 210 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
34-210
106 memcpy(rl->d->curr_write_sequence,-
107 rl->write_sequence, sizeof(rl->write_sequence));-
108 memcpy(rl->write_sequence,-
109 rl->d->last_write_sequence, sizeof(rl->write_sequence));-
110 }
executed 34 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else if (e == rl->d->w_epoch + 1
e == rl->d->w_epoch + 1Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 176 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
34-176
111 memcpy(rl->d->last_write_sequence,-
112 rl->write_sequence, sizeof(unsigned char[8]));-
113 memcpy(rl->write_sequence,-
114 rl->d->curr_write_sequence, sizeof(rl->write_sequence));-
115 }
executed 34 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
34
116 rl->d->w_epoch = e;-
117}
executed 244 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
244
118-
119void DTLS_RECORD_LAYER_set_write_sequence(RECORD_LAYER *rl, unsigned char *seq)-
120{-
121 memcpy(rl->write_sequence, seq, 8);-
122}
executed 2 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
2
123-
124-
125static int dtls1_copy_record(SSL *s, pitem *item)-
126{-
127 DTLS1_RECORD_DATA *rdata;-
128-
129 rdata = (DTLS1_RECORD_DATA *)item->data;-
130-
131 SSL3_BUFFER_release(&s->rlayer.rbuf);-
132-
133 s->rlayer.packet = rdata->packet;-
134 s->rlayer.packet_length = rdata->packet_length;-
135 memcpy(&s->rlayer.rbuf, &(rdata->rbuf), sizeof(SSL3_BUFFER));-
136 memcpy(&s->rlayer.rrec, &(rdata->rrec), sizeof(SSL3_RECORD));-
137-
138-
139 memcpy(&(s->rlayer.read_sequence[2]), &(rdata->packet[5]), 6);-
140-
141 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
142}-
143-
144int dtls1_buffer_record(SSL *s, record_pqueue *queue, unsigned char *priority)-
145{-
146 DTLS1_RECORD_DATA *rdata;-
147 pitem *item;-
148-
149-
150 if (pqueue_size(queue->q) >= 100
pqueue_size(queue->q) >= 100Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-16
151 return
never executed: return 0;
0;
never executed: return 0;
0
152-
153 rdata = CRYPTO_malloc(sizeof(*rdata), __FILE__, 148);-
154 item = pitem_new(priority, rdata);-
155 if (rdata ==
rdata == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-16
156 ((void *)0)
rdata == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-16
157 || item ==
item == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-16
158 ((void *)0)
item == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-16
159 ) {-
160 CRYPTO_free(rdata, __FILE__, 151);-
161 pitem_free(item);-
162 ossl_statem_fatal((s), (80), (247), ((4|64)),-
163 __FILE__-
164 ,-
165 154-
166 )-
167 ;-
168 return
never executed: return -1;
-1;
never executed: return -1;
0
169 }-
170-
171 rdata->packet = s->rlayer.packet;-
172 rdata->packet_length = s->rlayer.packet_length;-
173 memcpy(&(rdata->rbuf), &s->rlayer.rbuf, sizeof(SSL3_BUFFER));-
174 memcpy(&(rdata->rrec), &s->rlayer.rrec, sizeof(SSL3_RECORD));-
175-
176 item->data = rdata;-
177 s->rlayer.packet = -
178 ((void *)0)-
179 ;-
180 s->rlayer.packet_length = 0;-
181 memset(&s->rlayer.rbuf, 0, sizeof(s->rlayer.rbuf));-
182 memset(&s->rlayer.rrec, 0, sizeof(s->rlayer.rrec));-
183-
184 if (!ssl3_setup_buffers(s)
!ssl3_setup_buffers(s)Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-16
185-
186 CRYPTO_free(rdata->rbuf.buf, __FILE__, 182);-
187 CRYPTO_free(rdata, __FILE__, 183);-
188 pitem_free(item);-
189 return
never executed: return -1;
-1;
never executed: return -1;
0
190 }-
191-
192-
193 if (pqueue_insert(queue->q, item) ==
pqueue_insert(...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-16
194 ((void *)0)
pqueue_insert(...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-16
195 ) {-
196 ossl_statem_fatal((s), (80), (247), ((4|64)),-
197 __FILE__-
198 ,-
199 191-
200 )-
201 ;-
202 CRYPTO_free(rdata->rbuf.buf, __FILE__, 192);-
203 CRYPTO_free(rdata, __FILE__, 193);-
204 pitem_free(item);-
205 return
never executed: return -1;
-1;
never executed: return -1;
0
206 }-
207-
208 return
executed 16 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 16 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
16
209}-
210-
211int dtls1_retrieve_buffered_record(SSL *s, record_pqueue *queue)-
212{-
213 pitem *item;-
214-
215 item = pqueue_pop(queue->q);-
216 if (item
itemDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4698 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
14-4698
217 dtls1_copy_record(s, item);-
218-
219 CRYPTO_free(item->data, __FILE__, 209);-
220 pitem_free(item);-
221-
222 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
223 }-
224-
225 return
executed 4698 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 4698 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
4698
226}-
227int dtls1_process_buffered_records(SSL *s)-
228{-
229 pitem *item;-
230 SSL3_BUFFER *rb;-
231 SSL3_RECORD *rr;-
232 DTLS1_BITMAP *bitmap;-
233 unsigned int is_next_epoch;-
234 int replayok = 1;-
235-
236 item = pqueue_peek(s->rlayer.d->unprocessed_rcds.q);-
237 if (item
itemDescription
TRUEevaluated 93 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4612 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
93-4612
238-
239 if (s->rlayer.d->unprocessed_rcds.epoch != s->rlayer.d->r_epoch
s->rlayer.d->u...yer.d->r_epochDescription
TRUEevaluated 84 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 9 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
9-84
240 return
executed 84 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 84 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
84
241-
242 rr = ((&s->rlayer)->rrec);-
243-
244 rb = (&(&s->rlayer)->rbuf);-
245-
246 if (((
((rb)->left) > 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
rb)->left) > 0
((rb)->left) > 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2-7
247-
248-
249-
250-
251-
252-
253 return
executed 2 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 2 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
2
254 }-
255-
256-
257 while (pqueue_peek(s->rlayer.d->unprocessed_rcds.q)
pqueue_peek(s-...cessed_rcds.q)Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
7
258 dtls1_retrieve_buffered_record((s), &((s)->rlayer.d->unprocessed_rcds));-
259 bitmap = dtls1_get_bitmap(s, rr, &is_next_epoch);-
260 if (bitmap ==
bitmap == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-7
261 ((void *)0)
bitmap == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-7
262 ) {-
263-
264-
265-
266-
267-
268 ossl_statem_fatal((s), (80), (424), ((4|64)),-
269-
270 __FILE__-
271 ,-
272-
273 267-
274 )-
275-
276 ;-
277 return
never executed: return 0;
0;
never executed: return 0;
0
278 }-
279-
280-
281-
282-
283 {-
284-
285-
286-
287-
288-
289-
290 replayok = dtls1_record_replay_check(s, bitmap);-
291 }-
292-
293 if (!replayok
!replayokDescription
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| !dtls1_process_record(s, bitmap)
!dtls1_process...ord(s, bitmap)Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-7
294 if (ossl_statem_in_error(s)
ossl_statem_in_error(s)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
295-
296 return
never executed: return -1;
-1;
never executed: return -1;
0
297 }-
298-
299 rr->length = 0;-
300 ((&s->rlayer)->packet_length = 0);-
301 continue;
never executed: continue;
0
302 }-
303-
304 if (dtls1_buffer_record(s, &(s->rlayer.d->processed_rcds),
dtls1_buffer_r...>seq_num)) < 0Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-7
305 ((s->rlayer.rrec)->seq_num)) < 0
dtls1_buffer_r...>seq_num)) < 0Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-7
306-
307 return
never executed: return 0;
0;
never executed: return 0;
0
308 }-
309 }
executed 7 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
7
310 }
executed 7 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
7
311-
312-
313-
314-
315-
316 s->rlayer.d->processed_rcds.epoch = s->rlayer.d->r_epoch;-
317 s->rlayer.d->unprocessed_rcds.epoch = s->rlayer.d->r_epoch + 1;-
318-
319 return
executed 4619 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 4619 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
4619
320}-
321int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,-
322 size_t len, int peek, size_t *readbytes)-
323{-
324 int i, j, iret;-
325 size_t n;-
326 SSL3_RECORD *rr;-
327 void (*cb) (const SSL *ssl, int type2, int val) = -
328 ((void *)0)-
329 ;-
330-
331 if (!((&s->rlayer.rbuf)->buf !=
!((&s->rlayer.... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 6999 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-6999
332 ((void *)0)
!((&s->rlayer.... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 6999 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-6999
333 )
!((&s->rlayer.... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 6999 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-6999
334-
335 if (!ssl3_setup_buffers(s)
!ssl3_setup_buffers(s)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
336-
337 return
never executed: return -1;
-1;
never executed: return -1;
0
338 }-
339 }
never executed: end of block
0
340-
341 if ((type
typeDescription
TRUEevaluated 6787 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 212 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(type != 23)Description
TRUEevaluated 6274 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 513 times by 1 test
Evaluated by:
  • libssl.so.1.1
type != 23)
(type != 23)Description
TRUEevaluated 6274 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 513 times by 1 test
Evaluated by:
  • libssl.so.1.1
&&
212-6787
342 (
(type != 22)Description
TRUEnever evaluated
FALSEevaluated 6274 times by 1 test
Evaluated by:
  • libssl.so.1.1
type != 22)
(type != 22)Description
TRUEnever evaluated
FALSEevaluated 6274 times by 1 test
Evaluated by:
  • libssl.so.1.1
) ||
0-6274
343 (peek
peekDescription
TRUEnever evaluated
FALSEevaluated 6999 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(type != 23)Description
TRUEnever evaluated
FALSEnever evaluated
type != 23)
(type != 23)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0-6999
344 ossl_statem_fatal((s), (80), (258), ((4|64)),-
345 __FILE__-
346 ,-
347 362-
348 )-
349 ;-
350 return
never executed: return -1;
-1;
never executed: return -1;
0
351 }-
352-
353 if (!ossl_statem_get_in_handshake(s)
!ossl_statem_g...n_handshake(s)Description
TRUEevaluated 725 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6274 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& SSL_in_init(s)
SSL_in_init(s)Description
TRUEnever evaluated
FALSEevaluated 725 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-6274
354-
355 i = s->handshake_func(s);-
356-
357 if (i < 0
i < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
358 return
never executed: return i;
i;
never executed: return i;
0
359 if (i == 0
i == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
360 return
never executed: return -1;
-1;
never executed: return -1;
0
361 }
never executed: end of block
0
362-
363 start:
code before this statement executed 6999 times by 1 test: start:
Executed by:
  • libssl.so.1.1
6999
364 s->rwstate = 1;-
365-
366-
367-
368-
369-
370-
371-
372 rr = s->rlayer.rrec;-
373-
374-
375-
376-
377-
378 if (SSL_is_init_finished(s)
SSL_is_init_finished(s)Description
TRUEevaluated 731 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 6314 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& ((
((rr)->length) == 0Description
TRUEevaluated 731 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
rr)->length) == 0
((rr)->length) == 0Description
TRUEevaluated 731 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) {
0-6314
379 pitem *item;-
380 item = pqueue_pop(s->rlayer.d->buffered_app_data.q);-
381 if (item
itemDescription
TRUEnever evaluated
FALSEevaluated 731 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-731
382 dtls1_copy_record(s, item);-
383-
384 CRYPTO_free(item->data, __FILE__, 406);-
385 pitem_free(item);-
386 }
never executed: end of block
0
387 }
executed 731 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
731
388-
389-
390 if (dtls1_handle_timeout(s) > 0
dtls1_handle_timeout(s) > 0Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 7005 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
40-7005
391 goto
executed 40 times by 1 test: goto start;
Executed by:
  • libssl.so.1.1
start;
executed 40 times by 1 test: goto start;
Executed by:
  • libssl.so.1.1
40
392 } else if (ossl_statem_in_error(s)
ossl_statem_in_error(s)Description
TRUEnever evaluated
FALSEevaluated 7005 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-7005
393-
394 return
never executed: return -1;
-1;
never executed: return -1;
0
395 }-
396-
397-
398 if ((((
(((rr)->length) == 0)Description
TRUEevaluated 4613 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2392 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->length) == 0)
(((rr)->length) == 0)Description
TRUEevaluated 4613 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2392 times by 1 test
Evaluated by:
  • libssl.so.1.1
2392-4613
399 || (
(s->rlayer.rstate == 0xF1)Description
TRUEnever evaluated
FALSEevaluated 2392 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->rlayer.rstate == 0xF1)
(s->rlayer.rstate == 0xF1)Description
TRUEnever evaluated
FALSEevaluated 2392 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-2392
400 ((&s->rlayer)->numrpipes = (0));-
401 iret = dtls1_get_record(s);-
402 if (iret <= 0
iret <= 0Description
TRUEevaluated 1204 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3409 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1204-3409
403 iret = dtls1_read_failed(s, iret);-
404-
405-
406-
407-
408 if (iret <= 0
iret <= 0Description
TRUEevaluated 1204 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-1204
409 return
executed 1204 times by 1 test: return iret;
Executed by:
  • libssl.so.1.1
iret;
executed 1204 times by 1 test: return iret;
Executed by:
  • libssl.so.1.1
1204
410 else-
411 goto
never executed: goto start;
start;
never executed: goto start;
0
412 }-
413 ((&s->rlayer)->numrpipes = (1));-
414 }
executed 3409 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
3409
415-
416-
417-
418-
419-
420 if (((
((rr)->type) != 21Description
TRUEevaluated 5576 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->type) != 21
((rr)->type) != 21Description
TRUEevaluated 5576 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
225-5576
421 && ((
((rr)->length) != 0Description
TRUEevaluated 5576 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
rr)->length) != 0
((rr)->length) != 0Description
TRUEevaluated 5576 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-5576
422 s->rlayer.alert_count = 0;
executed 5576 times by 1 test: s->rlayer.alert_count = 0;
Executed by:
  • libssl.so.1.1
5576
423-
424 if (((
((rr)->type) != 22Description
TRUEevaluated 842 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4959 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->type) != 22
((rr)->type) != 22Description
TRUEevaluated 842 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4959 times by 1 test
Evaluated by:
  • libssl.so.1.1
842-4959
425 && ((
((rr)->type) != 20Description
TRUEevaluated 484 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 358 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->type) != 20
((rr)->type) != 20Description
TRUEevaluated 484 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 358 times by 1 test
Evaluated by:
  • libssl.so.1.1
358-484
426 && !SSL_in_init(s)
!SSL_in_init(s)Description
TRUEevaluated 471 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 13 times by 1 test
Evaluated by:
  • libssl.so.1.1
13-471
427 && (s->d1->next_timeout.tv_sec != 0
s->d1->next_ti...ut.tv_sec != 0Description
TRUEevaluated 116 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
116-355
428 || s->d1->next_timeout.tv_usec != 0
s->d1->next_ti...t.tv_usec != 0Description
TRUEnever evaluated
FALSEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
)) {
0-355
429-
430-
431-
432-
433-
434 dtls1_stop_timer(s);-
435 }
executed 116 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
116
436-
437-
438-
439 if (s->s3->change_cipher_spec
s->s3->change_cipher_specDescription
TRUEevaluated 728 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 5073 times by 1 test
Evaluated by:
  • libssl.so.1.1
728-5073
440-
441 && (((
(((rr)->type) != 22)Description
TRUEnever evaluated
FALSEevaluated 728 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->type) != 22)
(((rr)->type) != 22)Description
TRUEnever evaluated
FALSEevaluated 728 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-728
442-
443-
444-
445-
446-
447 if (dtls1_buffer_record(s, &(s->rlayer.d->buffered_app_data),
dtls1_buffer_r...>seq_num)) < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
448 ((rr)->seq_num)) < 0
dtls1_buffer_r...>seq_num)) < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
449-
450 return
never executed: return -1;
-1;
never executed: return -1;
0
451 }-
452 ((rr)->length = (0));-
453 ((rr)->read = 1);-
454 goto
never executed: goto start;
start;
never executed: goto start;
0
455 }-
456-
457-
458-
459-
460-
461 if (s->shutdown & 2
s->shutdown & 2Description
TRUEnever evaluated
FALSEevaluated 5801 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-5801
462 ((rr)->length = (0));-
463 ((rr)->read = 1);-
464 s->rwstate = 1;-
465 return
never executed: return 0;
0;
never executed: return 0;
0
466 }-
467-
468 if (type == ((rr)->type)
type == ((rr)->type)Description
TRUEevaluated 5200 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 601 times by 1 test
Evaluated by:
  • libssl.so.1.1
601-5200
469 || (((
((rr)->type) == 20Description
TRUEevaluated 358 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 243 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->type) == 20
((rr)->type) == 20Description
TRUEevaluated 358 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 243 times by 1 test
Evaluated by:
  • libssl.so.1.1
243-358
470 && type == 22
type == 22Description
TRUEevaluated 358 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&& recvd_type !=
recvd_type != ((void *)0)Description
TRUEevaluated 358 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-358
471 ((void *)0)
recvd_type != ((void *)0)Description
TRUEevaluated 358 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-358
472 )) {-
473 if (SSL_in_init(s)
SSL_in_init(s)Description
TRUEevaluated 5299 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 259 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& (
(type == 23)Description
TRUEnever evaluated
FALSEevaluated 5299 times by 1 test
Evaluated by:
  • libssl.so.1.1
type == 23)
(type == 23)Description
TRUEnever evaluated
FALSEevaluated 5299 times by 1 test
Evaluated by:
  • libssl.so.1.1
&&
0-5299
474 (
(s->enc_read_c... ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
s->enc_read_ctx ==
(s->enc_read_c... ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
0
475 ((void *)0)
(s->enc_read_c... ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
0
476 )
(s->enc_read_c... ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
477 ossl_statem_fatal((s), (10), (258), (100),-
478 __FILE__-
479 ,-
480 505-
481 )-
482 ;-
483 return
never executed: return -1;
-1;
never executed: return -1;
0
484 }-
485-
486 if (recvd_type !=
recvd_type != ((void *)0)Description
TRUEevaluated 2919 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2639 times by 1 test
Evaluated by:
  • libssl.so.1.1
2639-2919
487 ((void *)0)
recvd_type != ((void *)0)Description
TRUEevaluated 2919 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2639 times by 1 test
Evaluated by:
  • libssl.so.1.1
2639-2919
488 )-
489 *
executed 2919 times by 1 test: *recvd_type = ((rr)->type);
Executed by:
  • libssl.so.1.1
recvd_type = ((rr)->type);
executed 2919 times by 1 test: *recvd_type = ((rr)->type);
Executed by:
  • libssl.so.1.1
2919
490-
491 if (len == 0
len == 0Description
TRUEnever evaluated
FALSEevaluated 5558 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-5558
492-
493-
494-
495-
496-
497 if (((
((rr)->length) == 0Description
TRUEnever evaluated
FALSEnever evaluated
rr)->length) == 0
((rr)->length) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
498 ((
never executed: ((rr)->read = 1);
rr)->read = 1);
never executed: ((rr)->read = 1);
0
499 return
never executed: return 0;
0;
never executed: return 0;
0
500 }-
501-
502 if (len > ((rr)->length)
len > ((rr)->length)Description
TRUEevaluated 616 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4942 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
616-4942
503 n = ((rr)->length);
executed 616 times by 1 test: n = ((rr)->length);
Executed by:
  • libssl.so.1.1
616
504 else-
505 n = len;
executed 4942 times by 1 test: n = len;
Executed by:
  • libssl.so.1.1
4942
506-
507 memcpy(buf, &(((rr)->data)[((rr)->off)]), n);-
508 if (peek
peekDescription
TRUEnever evaluated
FALSEevaluated 5558 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-5558
509 if (((
((rr)->length) == 0Description
TRUEnever evaluated
FALSEnever evaluated
rr)->length) == 0
((rr)->length) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
510 ((
never executed: ((rr)->read = 1);
rr)->read = 1);
never executed: ((rr)->read = 1);
0
511 }
never executed: end of block
else {
0
512 ((rr)->length -= (n));-
513 ((rr)->off += (n));-
514 if (((
((rr)->length) == 0Description
TRUEevaluated 3177 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2381 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->length) == 0
((rr)->length) == 0Description
TRUEevaluated 3177 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2381 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2381-3177
515 s->rlayer.rstate = 0xF0;-
516 ((rr)->off = (0));-
517 ((rr)->read = 1);-
518 }
executed 3177 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
3177
519 }
executed 5558 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
5558
520 *readbytes = n;-
521 return
executed 5558 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
1;
executed 5558 times by 1 test: return 1;
Executed by:
  • libssl.so.1.1
5558
522 }-
523-
524-
525-
526-
527-
528-
529 if (((
((rr)->type) == 21Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->type) == 21
((rr)->type) == 21Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
18-225
530 unsigned int alert_level, alert_descr;-
531 unsigned char *alert_bytes = ((rr)->data)-
532 + ((rr)->off);-
533 PACKET alert;-
534-
535 if (!PACKET_buf_init(&alert, alert_bytes, ((rr)->length))
!PACKET_buf_in...(rr)->length))Description
TRUEnever evaluated
FALSEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-225
536 || !PACKET_get_1(&alert, &alert_level)
!PACKET_get_1(... &alert_level)Description
TRUEnever evaluated
FALSEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-225
537 || !PACKET_get_1(&alert, &alert_descr)
!PACKET_get_1(... &alert_descr)Description
TRUEnever evaluated
FALSEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-225
538 || PACKET_remaining(&alert) != 0
PACKET_remaining(&alert) != 0Description
TRUEnever evaluated
FALSEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-225
539 ossl_statem_fatal((s), (10), (258), (205),-
540 __FILE__-
541 ,-
542 574-
543 )-
544 ;-
545 return
never executed: return -1;
-1;
never executed: return -1;
0
546 }-
547-
548 if (s->msg_callback
s->msg_callbackDescription
TRUEnever evaluated
FALSEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-225
549 s->msg_callback(0, s->version, 21, alert_bytes, 2, s,
never executed: s->msg_callback(0, s->version, 21, alert_bytes, 2, s, s->msg_callback_arg);
0
550 s->msg_callback_arg);
never executed: s->msg_callback(0, s->version, 21, alert_bytes, 2, s, s->msg_callback_arg);
0
551-
552 if (s->info_callback !=
s->info_callba...!= ((void *)0)Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-225
553 ((void *)0)
s->info_callba...!= ((void *)0)Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-225
554 )-
555 cb = s->info_callback;
executed 225 times by 1 test: cb = s->info_callback;
Executed by:
  • libssl.so.1.1
225
556 else if (s->ctx->info_callback !=
s->ctx->info_c...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
557 ((void *)0)
s->ctx->info_c...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
558 )-
559 cb = s->ctx->info_callback;
never executed: cb = s->ctx->info_callback;
0
560-
561 if (cb !=
cb != ((void *)0)Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-225
562 ((void *)0)
cb != ((void *)0)Description
TRUEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
0-225
563 ) {-
564 j = (alert_level << 8) | alert_descr;-
565 cb(s, (0x4000|0x04), j);-
566 }
executed 225 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
225
567-
568 if (alert_level == 1
alert_level == 1Description
TRUEevaluated 212 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 13 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
13-212
569 s->s3->warn_alert = alert_descr;-
570 ((rr)->read = 1);-
571-
572 s->rlayer.alert_count++;-
573 if (s->rlayer.alert_count == 5
s->rlayer.alert_count == 5Description
TRUEnever evaluated
FALSEevaluated 212 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-212
574 ossl_statem_fatal((s), (10), (258), (409),-
575 __FILE__-
576 ,-
577 599-
578 )-
579 ;-
580 return
never executed: return -1;
-1;
never executed: return -1;
0
581 }-
582-
583 if (alert_descr == 0
alert_descr == 0Description
TRUEevaluated 212 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) {
0-212
584 s->shutdown |= 2;-
585 return
executed 212 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 212 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
212
586 }-
587 }
never executed: end of block
else if (alert_level == 2
alert_level == 2Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) {
0-13
588 char tmp[16];-
589-
590 s->rwstate = 1;-
591 s->s3->fatal_alert = alert_descr;-
592 ossl_statem_fatal((s), (-1), (258), (1000 + alert_descr),-
593 __FILE__-
594 ,-
595 628-
596 )-
597 ;-
598 BIO_snprintf(tmp, sizeof tmp, "%d", alert_descr);-
599 ERR_add_error_data(2, "SSL alert number ", tmp);-
600 s->shutdown |= 2;-
601 ((rr)->read = 1);-
602 SSL_CTX_remove_session(s->session_ctx, s->session);-
603 return
executed 13 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
0;
executed 13 times by 1 test: return 0;
Executed by:
  • libssl.so.1.1
13
604 } else {-
605 ossl_statem_fatal((s), (47), (258), (246),-
606 __FILE__-
607 ,-
608 637-
609 )-
610 ;-
611 return
never executed: return -1;
-1;
never executed: return -1;
0
612 }-
613-
614 goto
never executed: goto start;
start;
never executed: goto start;
0
615 }-
616-
617 if (s->shutdown & 1
s->shutdown & 1Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-18
618-
619 s->rwstate = 1;-
620 ((rr)->length = (0));-
621 ((rr)->read = 1);-
622 return
never executed: return 0;
0;
never executed: return 0;
0
623 }-
624-
625 if (((
((rr)->type) == 20Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->type) == 20
((rr)->type) == 20Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-18
626-
627-
628-
629-
630 ((rr)->length = (0));-
631 ((rr)->read = 1);-
632 goto
never executed: goto start;
start;
never executed: goto start;
0
633 }-
634-
635-
636-
637-
638 if ((((
(((rr)->type) == 22)Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
rr)->type) == 22)
(((rr)->type) == 22)Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&&
0-18
639 !ossl_statem_get_in_handshake(s)
!ossl_statem_g...n_handshake(s)Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) {
0-18
640 struct hm_header_st msg_hdr;-
641-
642-
643-
644-
645-
646 if (((
((rr)->epoch) ...yer.d->r_epochDescription
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->epoch) != s->rlayer.d->r_epoch
((rr)->epoch) ...yer.d->r_epochDescription
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-18
647 || ((
((rr)->length) < 12Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
rr)->length) < 12
((rr)->length) < 12Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-18
648 ((rr)->length = (0));-
649 ((rr)->read = 1);-
650 goto
never executed: goto start;
start;
never executed: goto start;
0
651 }-
652-
653 dtls1_get_message_header(rr->data, &msg_hdr);-
654-
655-
656-
657-
658-
659 if (msg_hdr.type == 20
msg_hdr.type == 20Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 12 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
6-12
660 if (dtls1_check_timeout_num(s) < 0
dtls1_check_timeout_num(s) < 0Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-6
661-
662 return
never executed: return -1;
-1;
never executed: return -1;
0
663 }-
664-
665 if (dtls1_retransmit_buffered_messages(s) <= 0
dtls1_retransm...ssages(s) <= 0Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-6
666-
667 if (ossl_statem_in_error(s)
ossl_statem_in_error(s)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
668 return
never executed: return -1;
-1;
never executed: return -1;
0
669 }
never executed: end of block
0
670 ((rr)->length = (0));-
671 ((rr)->read = 1);-
672 if (!(s->mode & 0x00000004U)
!(s->mode & 0x00000004U)Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-6
673 if (((
((&s->rlayer.rbuf)->left) == 0Description
TRUEnever evaluated
FALSEnever evaluated
&s->rlayer.rbuf)->left) == 0
((&s->rlayer.rbuf)->left) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
674-
675 BIO *bio;-
676-
677 s->rwstate = 3;-
678 bio = SSL_get_rbio(s);-
679 BIO_clear_flags(bio, ((0x01|0x02|0x04)|0x08));-
680 BIO_set_flags(bio, (0x01|0x08));-
681 return
never executed: return -1;
-1;
never executed: return -1;
0
682 }-
683 }
never executed: end of block
0
684 goto
executed 6 times by 1 test: goto start;
Executed by:
  • libssl.so.1.1
start;
executed 6 times by 1 test: goto start;
Executed by:
  • libssl.so.1.1
6
685 }-
686-
687-
688-
689-
690-
691-
692-
693 if (!((SSL_is_init_finished(s)) != 0)
!((SSL_is_init...shed(s)) != 0)Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-12
694 ossl_statem_fatal((s), (80), (258), ((4|64)),-
695 __FILE__-
696 ,-
697 722-
698 )-
699 ;-
700 return
never executed: return -1;
-1;
never executed: return -1;
0
701 }-
702-
703-
704 ossl_statem_set_in_init(s, 1);-
705-
706 i = s->handshake_func(s);-
707-
708 if (i < 0
i < 0Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
)
0-12
709 return
executed 12 times by 1 test: return i;
Executed by:
  • libssl.so.1.1
i;
executed 12 times by 1 test: return i;
Executed by:
  • libssl.so.1.1
12
710 if (i == 0
i == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
711 return
never executed: return -1;
-1;
never executed: return -1;
0
712-
713 if (!(s->mode & 0x00000004U)
!(s->mode & 0x00000004U)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
714 if (((
((&s->rlayer.rbuf)->left) == 0Description
TRUEnever evaluated
FALSEnever evaluated
&s->rlayer.rbuf)->left) == 0
((&s->rlayer.rbuf)->left) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
715-
716 BIO *bio;-
717-
718-
719-
720-
721-
722-
723 s->rwstate = 3;-
724 bio = SSL_get_rbio(s);-
725 BIO_clear_flags(bio, ((0x01|0x02|0x04)|0x08));-
726 BIO_set_flags(bio, (0x01|0x08));-
727 return
never executed: return -1;
-1;
never executed: return -1;
0
728 }-
729 }
never executed: end of block
0
730 goto
never executed: goto start;
start;
never executed: goto start;
0
731 }-
732-
733 switch (((rr)->type)) {-
734 default
never executed: default:
:
never executed: default:
0
735 ossl_statem_fatal((s), (10), (258), (245),-
736 __FILE__-
737 ,-
738 759-
739 )-
740 ;-
741 return
never executed: return -1;
-1;
never executed: return -1;
0
742 case
never executed: case 20:
20:
never executed: case 20:
0
743 case
never executed: case 21:
21:
never executed: case 21:
0
744 case
never executed: case 22:
22:
never executed: case 22:
0
745-
746-
747-
748-
749-
750 ossl_statem_fatal((s), (10), (258), ((4|64)),-
751 __FILE__-
752 ,-
753 770-
754 )-
755 ;-
756 return
never executed: return -1;
-1;
never executed: return -1;
0
757 case
never executed: case 23:
23:
never executed: case 23:
0
758-
759-
760-
761-
762-
763-
764-
765 if (s->s3->in_read_app_data
s->s3->in_read_app_dataDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
766 (
(s->s3->total_...tiations != 0)Description
TRUEnever evaluated
FALSEnever evaluated
s->s3->total_renegotiations != 0)
(s->s3->total_...tiations != 0)Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
767 ossl_statem_app_data_allowed(s)
ossl_statem_ap...ata_allowed(s)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
768 s->s3->in_read_app_data = 2;-
769 return
never executed: return -1;
-1;
never executed: return -1;
0
770 } else {-
771 ossl_statem_fatal((s), (10), (258), (245),-
772 __FILE__-
773 ,-
774 787-
775 )-
776 ;-
777 return
never executed: return -1;
-1;
never executed: return -1;
0
778 }-
779 }-
780-
781}-
782-
783-
784-
785-
786-
787int dtls1_write_bytes(SSL *s, int type, const void *buf, size_t len,-
788 size_t *written)-
789{-
790 int i;-
791-
792 if (!((len <= 16384) != 0)
!((len <= 16384) != 0)Description
TRUEnever evaluated
FALSEevaluated 4107 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-4107
793 ossl_statem_fatal((s), (80), (545), ((4|64)),-
794 __FILE__-
795 ,-
796 805-
797 )-
798 ;-
799 return
never executed: return -1;
-1;
never executed: return -1;
0
800 }-
801 s->rwstate = 1;-
802 i = do_dtls1_write(s, type, buf, len, 0, written);-
803 return
executed 4107 times by 1 test: return i;
Executed by:
  • libssl.so.1.1
i;
executed 4107 times by 1 test: return i;
Executed by:
  • libssl.so.1.1
4107
804}-
805-
806int do_dtls1_write(SSL *s, int type, const unsigned char *buf,-
807 size_t len, int create_empty_fragment, size_t *written)-
808{-
809 unsigned char *p, *pseq;-
810 int i, mac_size, clear = 0;-
811 size_t prefix_len = 0;-
812 int eivlen;-
813 SSL3_RECORD wr;-
814 SSL3_BUFFER *wb;-
815 SSL_SESSION *sess;-
816-
817 wb = &s->rlayer.wbuf[0];-
818-
819-
820-
821-
822-
823 if (!((((wb)->left) == 0) != 0)
!((((wb)->left) == 0) != 0)Description
TRUEnever evaluated
FALSEevaluated 4346 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-4346
824 ossl_statem_fatal((s), (80), (245), ((4|64)),-
825 __FILE__-
826 ,-
827 832-
828 )-
829 ;-
830 return
never executed: return 0;
0;
never executed: return 0;
0
831 }-
832-
833-
834 if (s->s3->alert_dispatch
s->s3->alert_dispatchDescription
TRUEnever evaluated
FALSEevaluated 4346 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-4346
835 i = s->method->ssl_dispatch_alert(s);-
836 if (i <= 0
i <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
837 return
never executed: return i;
i;
never executed: return i;
0
838-
839 }
never executed: end of block
0
840-
841 if (len == 0
len == 0Description
TRUEnever evaluated
FALSEevaluated 4346 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& !create_empty_fragment
!create_empty_fragmentDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-4346
842 return
never executed: return 0;
0;
never executed: return 0;
0
843-
844 if (len > ssl_get_max_send_fragment(s)
len > ssl_get_...nd_fragment(s)Description
TRUEnever evaluated
FALSEevaluated 4346 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-4346
845 ossl_statem_fatal((s), (80), (245), (194),-
846 __FILE__-
847 ,-
848 849-
849 )-
850 ;-
851 return
never executed: return 0;
0;
never executed: return 0;
0
852 }-
853-
854 sess = s->session;-
855-
856 if ((
(sess == ((void *)0) )Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4342 times by 1 test
Evaluated by:
  • libssl.so.1.1
sess ==
(sess == ((void *)0) )Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4342 times by 1 test
Evaluated by:
  • libssl.so.1.1
4-4342
857 ((void *)0)
(sess == ((void *)0) )Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4342 times by 1 test
Evaluated by:
  • libssl.so.1.1
4-4342
858 )
(sess == ((void *)0) )Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4342 times by 1 test
Evaluated by:
  • libssl.so.1.1
||
4-4342
859 (
(s->enc_write_... ((void *)0) )Description
TRUEevaluated 2521 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1821 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->enc_write_ctx ==
(s->enc_write_... ((void *)0) )Description
TRUEevaluated 2521 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1821 times by 1 test
Evaluated by:
  • libssl.so.1.1
1821-2521
860 ((void *)0)
(s->enc_write_... ((void *)0) )Description
TRUEevaluated 2521 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1821 times by 1 test
Evaluated by:
  • libssl.so.1.1
1821-2521
861 )
(s->enc_write_... ((void *)0) )Description
TRUEevaluated 2521 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1821 times by 1 test
Evaluated by:
  • libssl.so.1.1
|| (
(EVP_MD_CTX_md... ((void *)0) )Description
TRUEevaluated 916 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 905 times by 1 test
Evaluated by:
  • libssl.so.1.1
EVP_MD_CTX_md(s->write_hash) ==
(EVP_MD_CTX_md... ((void *)0) )Description
TRUEevaluated 916 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 905 times by 1 test
Evaluated by:
  • libssl.so.1.1
905-2521
862 ((void *)0)
(EVP_MD_CTX_md... ((void *)0) )Description
TRUEevaluated 916 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 905 times by 1 test
Evaluated by:
  • libssl.so.1.1
905-916
863 )
(EVP_MD_CTX_md... ((void *)0) )Description
TRUEevaluated 916 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 905 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
905-916
864 clear = 1;
executed 3441 times by 1 test: clear = 1;
Executed by:
  • libssl.so.1.1
3441
865-
866 if (clear
clearDescription
TRUEevaluated 3441 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 905 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
905-3441
867 mac_size = 0;
executed 3441 times by 1 test: mac_size = 0;
Executed by:
  • libssl.so.1.1
3441
868 else {-
869 mac_size = EVP_MD_size(EVP_MD_CTX_md(s->write_hash));-
870 if (mac_size < 0
mac_size < 0Description
TRUEnever evaluated
FALSEevaluated 905 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-905
871 ossl_statem_fatal((s), (80), (245), (194),-
872 __FILE__-
873 ,-
874 865-
875 )-
876 ;-
877 return
never executed: return -1;
-1;
never executed: return -1;
0
878 }-
879 }
executed 905 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
905
880-
881 p = ((wb)->buf) + prefix_len;-
882-
883-
884-
885 *(p++) = type & 0xff;-
886 ((&wr)->type = (type));-
887-
888-
889-
890-
891-
892 if (s->method->version == 0x1FFFF
s->method->version == 0x1FFFFDescription
TRUEevaluated 213 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 4133 times by 1 test
Evaluated by:
  • libssl.so.1.1
&&
213-4133
893 s->max_proto_version != 0x0100
s->max_proto_version != 0x0100Description
TRUEevaluated 211 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
2-211
894 *(p++) = 0xFEFF >> 8;-
895 *(p++) = 0xFEFF & 0xff;-
896 }
executed 211 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
211
897 *(p++) = s->version >> 8;-
898 *(p++) = s->version & 0xff;-
899 }
executed 4135 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
4135
900-
901-
902 pseq = p;-
903 p += 10;-
904-
905-
906 if (s->enc_write_ctx
s->enc_write_ctxDescription
TRUEevaluated 1821 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2525 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
1821-2525
907 int mode = (EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(s->enc_write_ctx)) & 0xF0007);-
908 if (mode == 0x2
mode == 0x2Description
TRUEevaluated 713 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 1108 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
713-1108
909 eivlen = EVP_CIPHER_CTX_iv_length(s->enc_write_ctx);-
910 if (eivlen <= 1
eivlen <= 1Description
TRUEnever evaluated
FALSEevaluated 713 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-713
911 eivlen = 0;
never executed: eivlen = 0;
0
912 }
executed 713 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
713
913-
914 else if (mode == 0x6
mode == 0x6Description
TRUEevaluated 751 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 357 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
357-751
915 eivlen = 8;
executed 751 times by 1 test: eivlen = 8;
Executed by:
  • libssl.so.1.1
751
916 else if (mode == 0x7
mode == 0x7Description
TRUEevaluated 132 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 225 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
132-225
917 eivlen = 8;
executed 132 times by 1 test: eivlen = 8;
Executed by:
  • libssl.so.1.1
132
918 else-
919 eivlen = 0;
executed 225 times by 1 test: eivlen = 0;
Executed by:
  • libssl.so.1.1
225
920 } else-
921 eivlen = 0;
executed 2525 times by 1 test: eivlen = 0;
Executed by:
  • libssl.so.1.1
2525
922-
923-
924 ((&wr)->data = (p + eivlen));-
925 ((&wr)->length = (len));-
926 ((&wr)->input = ((unsigned char *)buf));-
927-
928-
929-
930-
931-
932-
933 if (s->compress !=
s->compress != ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4346 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-4346
934 ((void *)0)
s->compress != ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4346 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-4346
935 ) {-
936 if (!ssl3_do_compress(s, &wr)
!ssl3_do_compress(s, &wr)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
937 ossl_statem_fatal((s), (80), (245), (141),-
938 __FILE__-
939 ,-
940 925-
941 )-
942 ;-
943 return
never executed: return -1;
-1;
never executed: return -1;
0
944 }-
945 }
never executed: end of block
else {
0
946 memcpy(((&wr)->data), ((&wr)->input),-
947 ((&wr)->length));-
948 ((&wr)->input = (&wr)->data);-
949 }
executed 4346 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
4346
950-
951-
952-
953-
954-
955-
956-
957 if (!(s->s3->flags & 0x0400)
!(s->s3->flags & 0x0400)Description
TRUEevaluated 3748 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 598 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& mac_size != 0
mac_size != 0Description
TRUEevaluated 307 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3441 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
307-3748
958 if (!s->method->ssl3_enc->mac(s, &wr,
!s->method->ss...+ eivlen]), 1)Description
TRUEnever evaluated
FALSEevaluated 307 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-307
959 &(p[((&wr)->length) + eivlen]),
!s->method->ss...+ eivlen]), 1)Description
TRUEnever evaluated
FALSEevaluated 307 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-307
960 1)
!s->method->ss...+ eivlen]), 1)Description
TRUEnever evaluated
FALSEevaluated 307 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-307
961 ossl_statem_fatal((s), (80), (245), ((4|64)),-
962 __FILE__-
963 ,-
964 945-
965 )-
966 ;-
967 return
never executed: return -1;
-1;
never executed: return -1;
0
968 }-
969 ((&wr)->length += (mac_size));-
970 }
executed 307 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
307
971-
972-
973 ((&wr)->data = (p));-
974 ((&wr)->input = (&wr)->data);-
975-
976 if (eivlen
eivlenDescription
TRUEevaluated 1596 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 2750 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
1596-2750
977 ((
executed 1596 times by 1 test: ((&wr)->length += (eivlen));
Executed by:
  • libssl.so.1.1
&wr)->length += (eivlen));
executed 1596 times by 1 test: ((&wr)->length += (eivlen));
Executed by:
  • libssl.so.1.1
1596
978-
979 if (s->method->ssl3_enc->enc(s, &wr, 1, 1) < 1
s->method->ssl...&wr, 1, 1) < 1Description
TRUEnever evaluated
FALSEevaluated 4346 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-4346
980 if (!ossl_statem_in_error(s)
!ossl_statem_in_error(s)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
981 ossl_statem_fatal((s), (80), (245), ((4|64)),-
982 __FILE__-
983 ,-
984 961-
985 )-
986 ;-
987 }
never executed: end of block
0
988 return
never executed: return -1;
-1;
never executed: return -1;
0
989 }-
990-
991 if ((
(s->s3->flags & 0x0400)Description
TRUEevaluated 598 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3748 times by 1 test
Evaluated by:
  • libssl.so.1.1
s->s3->flags & 0x0400)
(s->s3->flags & 0x0400)Description
TRUEevaluated 598 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 3748 times by 1 test
Evaluated by:
  • libssl.so.1.1
&& mac_size != 0
mac_size != 0Description
TRUEevaluated 598 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
) {
0-3748
992 if (!s->method->ssl3_enc->mac(s, &wr,
!s->method->ss...>length)]), 1)Description
TRUEnever evaluated
FALSEevaluated 598 times by 1 test
Evaluated by:
  • libssl.so.1.1
0-598
993 &(p[((&wr)->length)]), 1)
!s->method->ss...>length)]), 1)Description
TRUEnever evaluated
FALSEevaluated 598 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-598
994 ossl_statem_fatal((s), (80), (245), ((4|64)),-
995 __FILE__-
996 ,-
997 970-
998 )-
999 ;-
1000 return
never executed: return -1;
-1;
never executed: return -1;
0
1001 }-
1002 ((&wr)->length += (mac_size));-
1003 }
executed 598 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
598
1004-
1005-
1006-
1007-
1008-
1009 (((pseq)[0]=(unsigned char)(((s->rlayer.d->w_epoch)>> 8)&0xff), (pseq)[1]=(unsigned char)(((s->rlayer.d->w_epoch) )&0xff)),(pseq)+=2);-
1010-
1011 memcpy(pseq, &(s->rlayer.write_sequence[2]), 6);-
1012 pseq += 6;-
1013 (((pseq)[0]=(unsigned char)(((((&wr)->length))>> 8)&0xff), (pseq)[1]=(unsigned char)(((((&wr)->length)) )&0xff)),(pseq)+=2);-
1014-
1015 if (s->msg_callback
s->msg_callbackDescription
TRUEnever evaluated
FALSEevaluated 4346 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
0-4346
1016 s->msg_callback(1, 0, 0x100, pseq - 13,
never executed: s->msg_callback(1, 0, 0x100, pseq - 13, 13, s, s->msg_callback_arg);
0
1017 13, s, s->msg_callback_arg);
never executed: s->msg_callback(1, 0, 0x100, pseq - 13, 13, s, s->msg_callback_arg);
0
1018-
1019-
1020-
1021-
1022-
1023 ((&wr)->type = (type));-
1024 ((&wr)->length += (13));-
1025-
1026 ssl3_record_sequence_update(&(s->rlayer.write_sequence[0]));-
1027-
1028 if (create_empty_fragment
create_empty_fragmentDescription
TRUEnever evaluated
FALSEevaluated 4346 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
0-4346
1029-
1030-
1031-
1032-
1033 *written = wr.length;-
1034 return
never executed: return 1;
1;
never executed: return 1;
0
1035 }-
1036-
1037-
1038 ((wb)->left = (prefix_len + ((&wr)->length)));-
1039 ((wb)->offset = (0));-
1040-
1041-
1042-
1043-
1044-
1045 s->rlayer.wpend_tot = len;-
1046 s->rlayer.wpend_buf = buf;-
1047 s->rlayer.wpend_type = type;-
1048 s->rlayer.wpend_ret = len;-
1049-
1050-
1051 return
executed 4346 times by 1 test: return ssl3_write_pending(s, type, buf, len, written);
Executed by:
  • libssl.so.1.1
ssl3_write_pending(s, type, buf, len, written);
executed 4346 times by 1 test: return ssl3_write_pending(s, type, buf, len, written);
Executed by:
  • libssl.so.1.1
4346
1052}-
1053-
1054DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr,-
1055 unsigned int *is_next_epoch)-
1056{-
1057-
1058 *is_next_epoch = 0;-
1059-
1060-
1061 if (rr->epoch == s->rlayer.d->r_epoch
rr->epoch == s...yer.d->r_epochDescription
TRUEevaluated 3416 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libssl.so.1.1
)
20-3416
1062 return
executed 3416 times by 1 test: return &s->rlayer.d->bitmap;
Executed by:
  • libssl.so.1.1
&s->rlayer.d->bitmap;
executed 3416 times by 1 test: return &s->rlayer.d->bitmap;
Executed by:
  • libssl.so.1.1
3416
1063-
1064-
1065-
1066-
1067-
1068-
1069 else if (rr->epoch == (unsigned long)(s->rlayer.d->r_epoch + 1)
rr->epoch == (...->r_epoch + 1)Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 11 times by 1 test
Evaluated by:
  • libssl.so.1.1
&&
9-11
1070 s->rlayer.d->unprocessed_rcds.epoch != s->rlayer.d->r_epoch
s->rlayer.d->u...yer.d->r_epochDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
&&
0-9
1071 (rr->type == 22
rr->type == 22Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEnever evaluated
|| rr->type == 21
rr->type == 21Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0-9
1072 *is_next_epoch = 1;-
1073 return
executed 9 times by 1 test: return &s->rlayer.d->next_bitmap;
Executed by:
  • libssl.so.1.1
&s->rlayer.d->next_bitmap;
executed 9 times by 1 test: return &s->rlayer.d->next_bitmap;
Executed by:
  • libssl.so.1.1
9
1074 }-
1075-
1076 return
executed 11 times by 1 test: return ((void *)0) ;
Executed by:
  • libssl.so.1.1
executed 11 times by 1 test: return ((void *)0) ;
Executed by:
  • libssl.so.1.1
11
1077 ((void *)0)
executed 11 times by 1 test: return ((void *)0) ;
Executed by:
  • libssl.so.1.1
11
1078 ;
executed 11 times by 1 test: return ((void *)0) ;
Executed by:
  • libssl.so.1.1
11
1079}-
1080-
1081void dtls1_reset_seq_numbers(SSL *s, int rw)-
1082{-
1083 unsigned char *seq;-
1084 unsigned int seq_bytes = sizeof(s->rlayer.read_sequence);-
1085-
1086 if (rw & 0x001
rw & 0x001Description
TRUEevaluated 355 times by 1 test
Evaluated by:
  • libssl.so.1.1
FALSEevaluated 359 times by 1 test
Evaluated by:
  • libssl.so.1.1
) {
355-359
1087 seq = s->rlayer.read_sequence;-
1088 s->rlayer.d->r_epoch++;-
1089 memcpy(&s->rlayer.d->bitmap, &s->rlayer.d->next_bitmap,-
1090 sizeof(s->rlayer.d->bitmap));-
1091 memset(&s->rlayer.d->next_bitmap, 0, sizeof(s->rlayer.d->next_bitmap));-
1092-
1093-
1094-
1095-
1096-
1097 dtls1_clear_received_buffer(s);-
1098 }
executed 355 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
else {
355
1099 seq = s->rlayer.write_sequence;-
1100 memcpy(s->rlayer.d->last_write_sequence, seq,-
1101 sizeof(s->rlayer.write_sequence));-
1102 s->rlayer.d->w_epoch++;-
1103 }
executed 359 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
359
1104-
1105 memset(seq, 0, seq_bytes);-
1106}
executed 714 times by 1 test: end of block
Executed by:
  • libssl.so.1.1
714
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2