Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/statem/extensions_clnt.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2 | EXT_RETURN tls_construct_ctos_renegotiate(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
3 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
4 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
5 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
7 | if (!s->renegotiate
| 24-4915 | ||||||||||||||||||||||||||||||||||||||||||||||||
8 | return executed 4915 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 4915 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 4915 | ||||||||||||||||||||||||||||||||||||||||||||||||
9 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
10 | if (!WPACKET_put_bytes__((pkt), (0xff01), 2)
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||
11 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||
12 | || !WPACKET_sub_memcpy__((pkt), (s->s3->previous_client_finished), (s->s3->previous_client_finished_len), 1)
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||
13 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
14 | || !WPACKET_close(pkt)
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||
15 | ossl_statem_fatal((s), (80), (473), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
16 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
17 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
18 | 29 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
19 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
20 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
21 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
22 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
23 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
24 | return executed 24 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 24 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||
25 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
26 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
27 | EXT_RETURN tls_construct_ctos_server_name(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
28 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
29 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
30 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
31 | if (s->ext.hostname ==
| 1723-3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
32 | ((void *)0)
| 1723-3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
33 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
34 | return executed 1723 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 1723 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 1723 | ||||||||||||||||||||||||||||||||||||||||||||||||
35 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
36 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
37 | if (!WPACKET_put_bytes__((pkt), (0), 2)
| 0-3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
38 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
39 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
40 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
41 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
42 | || !WPACKET_put_bytes__((pkt), (0), 1)
| 0-3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
43 | || !WPACKET_sub_memcpy__((pkt), (s->ext.hostname), (strlen(s->ext.hostname)), 2)
| 0-3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
44 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
45 | || !WPACKET_close(pkt)
| 0-3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
46 | || !WPACKET_close(pkt)
| 0-3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
47 | ossl_statem_fatal((s), (80), (475), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
48 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
49 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
50 | 55 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
51 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
52 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
53 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
54 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
55 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
56 | return executed 3216 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 3216 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 3216 | ||||||||||||||||||||||||||||||||||||||||||||||||
57 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
58 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
59 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
60 | EXT_RETURN tls_construct_ctos_maxfragmentlen(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
61 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
62 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
63 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
64 | if (s->ext.max_fragment_len_mode == 0
| 10-4929 | ||||||||||||||||||||||||||||||||||||||||||||||||
65 | return executed 4929 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 4929 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 4929 | ||||||||||||||||||||||||||||||||||||||||||||||||
66 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
67 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
68 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
69 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
70 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
71 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
72 | if (!WPACKET_put_bytes__((pkt), (1), 2)
| 0-10 | ||||||||||||||||||||||||||||||||||||||||||||||||
73 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
74 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-10 | ||||||||||||||||||||||||||||||||||||||||||||||||
75 | || !WPACKET_put_bytes__((pkt), (s->ext.max_fragment_len_mode), 1)
| 0-10 | ||||||||||||||||||||||||||||||||||||||||||||||||
76 | || !WPACKET_close(pkt)
| 0-10 | ||||||||||||||||||||||||||||||||||||||||||||||||
77 | ossl_statem_fatal((s), (80), (549), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
78 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
79 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
80 | 81 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
81 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
82 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
83 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
84 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
85 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
86 | return executed 10 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 10 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||
87 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
88 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
89 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
90 | EXT_RETURN tls_construct_ctos_srp(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
91 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
92 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
93 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
94 | if (s->srp_ctx.login ==
| 11-4928 | ||||||||||||||||||||||||||||||||||||||||||||||||
95 | ((void *)0)
| 11-4928 | ||||||||||||||||||||||||||||||||||||||||||||||||
96 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
97 | return executed 4928 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 4928 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 4928 | ||||||||||||||||||||||||||||||||||||||||||||||||
98 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
99 | if (!WPACKET_put_bytes__((pkt), (12), 2)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
100 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
101 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
102 | || !WPACKET_start_sub_packet_len__((pkt), 1)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
103 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
104 | || !WPACKET_set_flags(pkt, 1)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
105 | || !WPACKET_memcpy(pkt, s->srp_ctx.login,
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
106 | strlen(s->srp_ctx.login))
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
107 | || !WPACKET_close(pkt)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
108 | || !WPACKET_close(pkt)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
109 | ossl_statem_fatal((s), (80), (478), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
110 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
111 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
112 | 107 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
113 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
114 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
115 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
116 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
117 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
118 | return executed 11 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 11 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||||||||||||||
119 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
120 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
121 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
122 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
123 | static int use_ecc(SSL *s) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
124 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
125 | int i, end; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
126 | unsigned long alg_k, alg_a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
127 | struct stack_st_SSL_CIPHER *cipher_stack = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
128 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
129 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
130 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
131 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
132 | if (s->version == 0x0300
| 0-9878 | ||||||||||||||||||||||||||||||||||||||||||||||||
133 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
134 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
135 | cipher_stack = SSL_get_ciphers(s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
136 | end = sk_SSL_CIPHER_num(cipher_stack); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
137 | for (i = 0; i < end
| 154-9878 | ||||||||||||||||||||||||||||||||||||||||||||||||
138 | const SSL_CIPHER *c = sk_SSL_CIPHER_value(cipher_stack, i); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
139 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
140 | alg_k = c->algorithm_mkey; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
141 | alg_a = c->algorithm_auth; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
142 | if ((
| 74-9804 | ||||||||||||||||||||||||||||||||||||||||||||||||
143 | || (
| 0-9804 | ||||||||||||||||||||||||||||||||||||||||||||||||
144 | || c->min_tls >= 0x0304
| 154-9650 | ||||||||||||||||||||||||||||||||||||||||||||||||
145 | return executed 9724 times by 1 test: 1;return 1; Executed by:
executed 9724 times by 1 test: return 1; Executed by:
| 9724 | ||||||||||||||||||||||||||||||||||||||||||||||||
146 | } executed 154 times by 1 test: end of block Executed by:
| 154 | ||||||||||||||||||||||||||||||||||||||||||||||||
147 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
148 | return executed 154 times by 1 test: 0;return 0; Executed by:
executed 154 times by 1 test: return 0; Executed by:
| 154 | ||||||||||||||||||||||||||||||||||||||||||||||||
149 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
150 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
151 | EXT_RETURN tls_construct_ctos_ec_pt_formats(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
152 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
153 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
154 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
155 | const unsigned char *pformats; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
156 | size_t num_formats; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
157 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
158 | if (!use_ecc(s)
| 77-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
159 | return executed 77 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 77 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 77 | ||||||||||||||||||||||||||||||||||||||||||||||||
160 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
161 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
162 | tls1_get_formatlist(s, &pformats, &num_formats); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
163 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
164 | if (!WPACKET_put_bytes__((pkt), (11), 2)
| 0-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
165 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
166 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
167 | || !WPACKET_sub_memcpy__((pkt), (pformats), (num_formats), 1)
| 0-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
168 | || !WPACKET_close(pkt)
| 0-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
169 | ossl_statem_fatal((s), (80), (467), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
170 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
171 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
172 | 161 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
173 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
174 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
175 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
176 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
178 | return executed 4862 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 4862 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
179 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
180 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
181 | EXT_RETURN tls_construct_ctos_supported_groups(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
182 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
183 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
184 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
185 | const uint16_t *pgroups = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
186 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
187 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
188 | size_t num_groups = 0, i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
189 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
190 | if (!use_ecc(s)
| 77-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
191 | return executed 77 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 77 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 77 | ||||||||||||||||||||||||||||||||||||||||||||||||
192 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
193 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
194 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
195 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
196 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
197 | tls1_get_supported_groups(s, &pgroups, &num_groups); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
198 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
199 | if (!WPACKET_put_bytes__((pkt), (10), 2)
| 0-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
200 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
201 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
202 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
203 | ossl_statem_fatal((s), (80), (480), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
204 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
205 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
206 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
207 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
208 | 190 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
209 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
210 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
211 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
212 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
213 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
214 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
215 | for (i = 0; i < num_groups
| 4862-24131 | ||||||||||||||||||||||||||||||||||||||||||||||||
216 | uint16_t ctmp = pgroups[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
217 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
218 | if (tls_curve_allowed(s, ctmp, (4 | (2 << 16)))
| 0-24131 | ||||||||||||||||||||||||||||||||||||||||||||||||
219 | if (!WPACKET_put_bytes__((pkt), (ctmp), 2)
| 0-24131 | ||||||||||||||||||||||||||||||||||||||||||||||||
220 | ossl_statem_fatal((s), (80), (480), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
222 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
223 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
224 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
225 | 201 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
226 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
227 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
228 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
229 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
230 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
231 | } executed 24131 times by 1 test: end of block Executed by:
| 24131 | ||||||||||||||||||||||||||||||||||||||||||||||||
232 | } executed 24131 times by 1 test: end of block Executed by:
| 24131 | ||||||||||||||||||||||||||||||||||||||||||||||||
233 | if (!WPACKET_close(pkt)
| 0-4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
234 | ossl_statem_fatal((s), (80), (480), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
235 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
236 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
237 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
238 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
239 | 209 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
240 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
242 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
243 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
244 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
245 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
246 | return executed 4862 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 4862 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 4862 | ||||||||||||||||||||||||||||||||||||||||||||||||
247 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
248 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
249 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
250 | EXT_RETURN tls_construct_ctos_session_ticket(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
251 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
252 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
253 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
254 | size_t ticklen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
255 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
256 | if (!tls_use_ticket(s)
| 12-4927 | ||||||||||||||||||||||||||||||||||||||||||||||||
257 | return executed 12 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 12 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||
258 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
259 | if (!s->new_session
| 0-4912 | ||||||||||||||||||||||||||||||||||||||||||||||||
260 | ((void *)0)
| 0-4912 | ||||||||||||||||||||||||||||||||||||||||||||||||
261 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
262 | && s->session->ext.tick !=
| 224-4688 | ||||||||||||||||||||||||||||||||||||||||||||||||
263 | ((void *)0)
| 224-4688 | ||||||||||||||||||||||||||||||||||||||||||||||||
264 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
265 | && s->session->ssl_version != 0x0304
| 81-143 | ||||||||||||||||||||||||||||||||||||||||||||||||
266 | ticklen = s->session->ext.ticklen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
267 | } executed 81 times by 1 test: else if (s->sessionend of block Executed by:
| 0-4846 | ||||||||||||||||||||||||||||||||||||||||||||||||
268 | ((void *)0)
| 1-4845 | ||||||||||||||||||||||||||||||||||||||||||||||||
269 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
270 | && s->ext.session_ticket->data !=
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
271 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
272 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
273 | ticklen = s->ext.session_ticket->length; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
274 | s->session->ext.tick = CRYPTO_malloc(ticklen, __FILE__, 233); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
275 | if (s->session->ext.tick ==
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
276 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
277 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
278 | ossl_statem_fatal((s), (80), (476), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
279 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
280 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
281 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
282 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
283 | 237 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
284 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
285 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
286 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
287 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
288 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
289 | memcpy(s->session->ext.tick, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
290 | s->ext.session_ticket->data, ticklen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
291 | s->session->ext.ticklen = ticklen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
292 | } executed 1 time by 1 test: else {end of block Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
293 | ticklen = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
294 | } executed 4845 times by 1 test: end of block Executed by:
| 4845 | ||||||||||||||||||||||||||||||||||||||||||||||||
295 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
296 | if (ticklen == 0
| 0-4845 | ||||||||||||||||||||||||||||||||||||||||||||||||
297 | ((void *)0)
| 0-4845 | ||||||||||||||||||||||||||||||||||||||||||||||||
298 | && | - | ||||||||||||||||||||||||||||||||||||||||||||||||
299 | s->ext.session_ticket->data ==
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
300 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
301 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
302 | return never executed: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; never executed: return EXT_RETURN_NOT_SENT; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
303 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
304 | if (!WPACKET_put_bytes__((pkt), (35), 2)
| 0-4927 | ||||||||||||||||||||||||||||||||||||||||||||||||
305 | || !WPACKET_sub_memcpy__((pkt), (s->session->ext.tick), (ticklen), 2)
| 0-4927 | ||||||||||||||||||||||||||||||||||||||||||||||||
306 | ossl_statem_fatal((s), (80), (476), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
307 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
308 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
309 | 254 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
310 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
311 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
312 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
313 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
314 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
315 | return executed 4927 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 4927 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 4927 | ||||||||||||||||||||||||||||||||||||||||||||||||
316 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
317 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
318 | EXT_RETURN tls_construct_ctos_sig_algs(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
319 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
320 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
321 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
322 | size_t salglen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
323 | const uint16_t *salg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
324 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
325 | if (!((!(s->method->ssl3_enc->enc_flags & 0x8)
| 0-4793 | ||||||||||||||||||||||||||||||||||||||||||||||||
326 | return executed 322 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 322 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 322 | ||||||||||||||||||||||||||||||||||||||||||||||||
327 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
328 | salglen = tls12_get_psigalgs(s, 1, &salg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
329 | if (!WPACKET_put_bytes__((pkt), (13), 2)
| 0-4663 | ||||||||||||||||||||||||||||||||||||||||||||||||
330 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
331 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-4663 | ||||||||||||||||||||||||||||||||||||||||||||||||
332 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
333 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-4663 | ||||||||||||||||||||||||||||||||||||||||||||||||
334 | || !tls12_copy_sigalgs(s, pkt, salg, salglen)
| 1-4662 | ||||||||||||||||||||||||||||||||||||||||||||||||
335 | || !WPACKET_close(pkt)
| 0-4662 | ||||||||||||||||||||||||||||||||||||||||||||||||
336 | || !WPACKET_close(pkt)
| 0-4662 | ||||||||||||||||||||||||||||||||||||||||||||||||
337 | ossl_statem_fatal((s), (80), (477), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
338 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
339 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
340 | 281 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
341 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
342 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
343 | return executed 1 time by 1 test: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; Executed by:
executed 1 time by 1 test: return EXT_RETURN_FAIL; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
344 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
345 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
346 | return executed 4662 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 4662 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 4662 | ||||||||||||||||||||||||||||||||||||||||||||||||
347 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
349 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
350 | EXT_RETURN tls_construct_ctos_status_request(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
351 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
352 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
353 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
354 | int i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
355 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
356 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
357 | if (x !=
| 34-4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
358 | ((void *)0)
| 34-4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
359 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
360 | return executed 34 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 34 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 34 | ||||||||||||||||||||||||||||||||||||||||||||||||
361 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
362 | if (s->ext.status_type != 1
| 23-4916 | ||||||||||||||||||||||||||||||||||||||||||||||||
363 | return executed 4916 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 4916 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 4916 | ||||||||||||||||||||||||||||||||||||||||||||||||
364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
365 | if (!WPACKET_put_bytes__((pkt), (5), 2)
| 0-23 | ||||||||||||||||||||||||||||||||||||||||||||||||
366 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
367 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-23 | ||||||||||||||||||||||||||||||||||||||||||||||||
368 | || !WPACKET_put_bytes__((pkt), (1), 1)
| 0-23 | ||||||||||||||||||||||||||||||||||||||||||||||||
369 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
370 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-23 | ||||||||||||||||||||||||||||||||||||||||||||||||
371 | ossl_statem_fatal((s), (80), (479), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
372 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
373 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
374 | 309 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
375 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
376 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
377 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
378 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
379 | for (i = 0; i < sk_OCSP_RESPID_num(s->ext.ocsp.ids)
| 1-23 | ||||||||||||||||||||||||||||||||||||||||||||||||
380 | unsigned char *idbytes; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
381 | OCSP_RESPID *id = sk_OCSP_RESPID_value(s->ext.ocsp.ids, i); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
382 | int idlen = i2d_OCSP_RESPID(id, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
383 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
384 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
385 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
386 | if (idlen <= 0
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
387 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
388 | || !WPACKET_sub_allocate_bytes__((pkt), (idlen), (&idbytes), 2)
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
389 | || i2d_OCSP_RESPID(id, &idbytes) != idlen
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
390 | ossl_statem_fatal((s), (80), (479), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
391 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
392 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
393 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
394 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
395 | 323 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
396 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
397 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
398 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
399 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
400 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
401 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
402 | if (!WPACKET_close(pkt)
| 0-23 | ||||||||||||||||||||||||||||||||||||||||||||||||
403 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-23 | ||||||||||||||||||||||||||||||||||||||||||||||||
404 | ossl_statem_fatal((s), (80), (479), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
405 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
406 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
407 | 330 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
408 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
409 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
410 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
411 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
412 | if (s->ext.ocsp.exts
| 0-23 | ||||||||||||||||||||||||||||||||||||||||||||||||
413 | unsigned char *extbytes; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
414 | int extlen = i2d_X509_EXTENSIONS(s->ext.ocsp.exts, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
415 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
416 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
417 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
418 | if (extlen < 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
419 | ossl_statem_fatal((s), (80), (479), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
420 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
421 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
422 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
423 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
424 | 340 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
425 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
426 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
427 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
428 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
429 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
430 | if (!WPACKET_allocate_bytes(pkt, extlen, &extbytes)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
431 | || i2d_X509_EXTENSIONS(s->ext.ocsp.exts, &extbytes)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
432 | != extlen
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
433 | ossl_statem_fatal((s), (80), (479), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
434 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
435 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
436 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
437 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
438 | 348 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
439 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
440 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
441 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
442 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
443 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
444 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
445 | if (!WPACKET_close(pkt)
| 0-23 | ||||||||||||||||||||||||||||||||||||||||||||||||
446 | ossl_statem_fatal((s), (80), (479), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
447 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
448 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
449 | 354 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
450 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
451 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
452 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
453 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
454 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
455 | return executed 23 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 23 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 23 | ||||||||||||||||||||||||||||||||||||||||||||||||
456 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
457 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
458 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
459 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
460 | EXT_RETURN tls_construct_ctos_npn(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
461 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
462 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
463 | if (s->ctx->ext.npn_select_cb ==
| 28-4911 | ||||||||||||||||||||||||||||||||||||||||||||||||
464 | ((void *)0)
| 28-4911 | ||||||||||||||||||||||||||||||||||||||||||||||||
465 | || !((
| 0-28 | ||||||||||||||||||||||||||||||||||||||||||||||||
466 | return executed 4911 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 4911 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 4911 | ||||||||||||||||||||||||||||||||||||||||||||||||
467 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
468 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
469 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
470 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
471 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
472 | if (!WPACKET_put_bytes__((pkt), (13172), 2)
| 0-28 | ||||||||||||||||||||||||||||||||||||||||||||||||
473 | || !WPACKET_put_bytes__((pkt), (0), 2)
| 0-28 | ||||||||||||||||||||||||||||||||||||||||||||||||
474 | ossl_statem_fatal((s), (80), (471), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
475 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
476 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
477 | 376 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
478 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
479 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
480 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
481 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
482 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
483 | return executed 28 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 28 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 28 | ||||||||||||||||||||||||||||||||||||||||||||||||
484 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
485 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
486 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
487 | EXT_RETURN tls_construct_ctos_alpn(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
488 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
489 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
490 | s->s3->alpn_sent = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
491 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
492 | if (s->ext.alpn ==
| 35-4904 | ||||||||||||||||||||||||||||||||||||||||||||||||
493 | ((void *)0)
| 35-4904 | ||||||||||||||||||||||||||||||||||||||||||||||||
494 | || !((
| 0-35 | ||||||||||||||||||||||||||||||||||||||||||||||||
495 | return executed 4904 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 4904 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 4904 | ||||||||||||||||||||||||||||||||||||||||||||||||
496 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
497 | if (!WPACKET_put_bytes__((pkt), (16), 2)
| 0-35 | ||||||||||||||||||||||||||||||||||||||||||||||||
498 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
499 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
500 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-35 | ||||||||||||||||||||||||||||||||||||||||||||||||
501 | || !WPACKET_sub_memcpy__((pkt), (s->ext.alpn), (s->ext.alpn_len), 2)
| 0-35 | ||||||||||||||||||||||||||||||||||||||||||||||||
502 | || !WPACKET_close(pkt)
| 0-35 | ||||||||||||||||||||||||||||||||||||||||||||||||
503 | ossl_statem_fatal((s), (80), (466), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
504 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
505 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
506 | 399 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
507 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
508 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
509 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
510 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
511 | s->s3->alpn_sent = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
512 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
513 | return executed 35 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 35 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 35 | ||||||||||||||||||||||||||||||||||||||||||||||||
514 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
515 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
516 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
517 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
518 | EXT_RETURN tls_construct_ctos_use_srtp(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
519 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
520 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
521 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
522 | struct stack_st_SRTP_PROTECTION_PROFILE *clnt = SSL_get_srtp_profiles(s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
523 | int i, end; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
524 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
525 | if (clnt ==
| 0-4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
526 | ((void *)0)
| 0-4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
527 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
528 | return executed 4939 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 4939 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
529 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
530 | if (!WPACKET_put_bytes__((pkt), (14), 2)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
531 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
532 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
533 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
534 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
535 | ossl_statem_fatal((s), (80), (482), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
536 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
537 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
538 | 425 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
539 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
540 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
541 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
542 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
543 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
544 | end = sk_SRTP_PROTECTION_PROFILE_num(clnt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
545 | for (i = 0; i < end
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
546 | const SRTP_PROTECTION_PROFILE *prof = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
547 | sk_SRTP_PROTECTION_PROFILE_value(clnt, i); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
548 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
549 | if (prof ==
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
550 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
551 | || !WPACKET_put_bytes__((pkt), (prof->id), 2)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
552 | ossl_statem_fatal((s), (80), (482), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
553 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
554 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
555 | 436 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
556 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
557 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
558 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
559 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
560 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
561 | if (!WPACKET_close(pkt)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
562 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
563 | || !WPACKET_put_bytes__((pkt), (0), 1)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
564 | || !WPACKET_close(pkt)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
565 | ossl_statem_fatal((s), (80), (482), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
566 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
567 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
568 | 445 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
569 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
570 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
571 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
572 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
573 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
574 | return never executed: EXT_RETURN_SENT;return EXT_RETURN_SENT; never executed: return EXT_RETURN_SENT; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
575 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
576 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
577 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
578 | EXT_RETURN tls_construct_ctos_etm(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
579 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
580 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
581 | if (s->options & 0x00080000U
| 13-4926 | ||||||||||||||||||||||||||||||||||||||||||||||||
582 | return executed 13 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 13 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 13 | ||||||||||||||||||||||||||||||||||||||||||||||||
583 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
584 | if (!WPACKET_put_bytes__((pkt), (22), 2)
| 0-4926 | ||||||||||||||||||||||||||||||||||||||||||||||||
585 | || !WPACKET_put_bytes__((pkt), (0), 2)
| 0-4926 | ||||||||||||||||||||||||||||||||||||||||||||||||
586 | ossl_statem_fatal((s), (80), (469), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
587 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
588 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
589 | 462 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
590 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
591 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
592 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
593 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
594 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
595 | return executed 4926 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 4926 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 4926 | ||||||||||||||||||||||||||||||||||||||||||||||||
596 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
597 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
598 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
599 | EXT_RETURN tls_construct_ctos_sct(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
600 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
601 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
602 | if (s->ct_validation_callback ==
| 11-4962 | ||||||||||||||||||||||||||||||||||||||||||||||||
603 | ((void *)0)
| 11-4962 | ||||||||||||||||||||||||||||||||||||||||||||||||
604 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
605 | return executed 4962 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 4962 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 4962 | ||||||||||||||||||||||||||||||||||||||||||||||||
606 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
607 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
608 | if (x !=
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
609 | ((void *)0)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
610 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
611 | return never executed: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; never executed: return EXT_RETURN_NOT_SENT; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
612 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
613 | if (!WPACKET_put_bytes__((pkt), (18), 2)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
614 | || !WPACKET_put_bytes__((pkt), (0), 2)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
615 | ossl_statem_fatal((s), (80), (474), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
616 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
617 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
618 | 483 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
619 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
620 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
621 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
622 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
623 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
624 | return executed 11 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 11 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||||||||||||||
625 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
626 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
627 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
628 | EXT_RETURN tls_construct_ctos_ems(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
629 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
630 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
631 | if (!WPACKET_put_bytes__((pkt), (23), 2)
| 0-4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
632 | || !WPACKET_put_bytes__((pkt), (0), 2)
| 0-4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
633 | ossl_statem_fatal((s), (80), (468), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
634 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
635 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
636 | 497 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
637 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
638 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
639 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
640 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
641 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
642 | return executed 4939 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 4939 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
643 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
644 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
645 | EXT_RETURN tls_construct_ctos_supported_versions(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
646 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
647 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
648 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
649 | int currv, min_version, max_version, reason; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
651 | reason = ssl_get_min_max_version(s, &min_version, &max_version, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
652 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
653 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
654 | if (reason != 0
| 0-4747 | ||||||||||||||||||||||||||||||||||||||||||||||||
655 | ossl_statem_fatal((s), (80), (481), (reason), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
656 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
657 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
658 | 513 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
659 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
660 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
661 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
662 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
664 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
665 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
666 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
667 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
668 | if (max_version < 0x0304
| 829-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
669 | return executed 829 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 829 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 829 | ||||||||||||||||||||||||||||||||||||||||||||||||
670 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
671 | if (!WPACKET_put_bytes__((pkt), (43), 2)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
672 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
673 | || !WPACKET_start_sub_packet_len__((pkt), 1)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
674 | ossl_statem_fatal((s), (80), (481), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
675 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
676 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
677 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
678 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
679 | 529 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
680 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
681 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
682 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
683 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
684 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
685 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
686 | for (currv = max_version; currv >= min_version
| 3918-15201 | ||||||||||||||||||||||||||||||||||||||||||||||||
687 | if (!WPACKET_put_bytes__((pkt), (currv), 2)
| 0-15201 | ||||||||||||||||||||||||||||||||||||||||||||||||
688 | ossl_statem_fatal((s), (80), (481), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
689 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
690 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
691 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
692 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
693 | 537 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
694 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
695 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
696 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
697 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
698 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
699 | } executed 15201 times by 1 test: end of block Executed by:
| 15201 | ||||||||||||||||||||||||||||||||||||||||||||||||
700 | if (!WPACKET_close(pkt)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
701 | ossl_statem_fatal((s), (80), (481), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
702 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
703 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
704 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
705 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
706 | 544 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
707 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
708 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
709 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
710 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
711 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
712 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
713 | return executed 3918 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 3918 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
714 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
715 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
716 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
717 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
718 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
719 | EXT_RETURN tls_construct_ctos_psk_kex_modes(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
720 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
721 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
722 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
723 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
724 | int nodhe = s->options & 0x00000400U; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
725 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
726 | if (!WPACKET_put_bytes__((pkt), (45), 2)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
727 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
728 | || !WPACKET_start_sub_packet_len__((pkt), 1)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
729 | || !WPACKET_put_bytes__((pkt), (0x01), 1)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
730 | || (nodhe
| 0-3916 | ||||||||||||||||||||||||||||||||||||||||||||||||
731 | || !WPACKET_close(pkt)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
732 | || !WPACKET_close(pkt)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
733 | ossl_statem_fatal((s), (80), (509), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
734 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
735 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
736 | 569 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
737 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
738 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
739 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
740 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
741 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
742 | s->ext.psk_kex_mode = 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
743 | if (nodhe
| 2-3916 | ||||||||||||||||||||||||||||||||||||||||||||||||
744 | s->ext.psk_kex_mode |= 1; executed 2 times by 1 test: s->ext.psk_kex_mode |= 1; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
745 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
746 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
747 | return executed 3918 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 3918 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
748 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
749 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
751 | static int add_key_share(SSL *s, WPACKET *pkt, unsigned int curve_id) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
752 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
753 | unsigned char *encoded_point = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
754 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
755 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
756 | EVP_PKEY *key_share_key = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
757 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
758 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
759 | size_t encodedlen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
760 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
761 | if (s->s3->tmp.pkey !=
| 139-3779 | ||||||||||||||||||||||||||||||||||||||||||||||||
762 | ((void *)0)
| 139-3779 | ||||||||||||||||||||||||||||||||||||||||||||||||
763 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
764 | if (!((s->hello_retry_request == SSL_HRR_PENDING) != 0)
| 0-139 | ||||||||||||||||||||||||||||||||||||||||||||||||
765 | ossl_statem_fatal((s), (80), (512), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
766 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
767 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
768 | 591 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
769 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
770 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
771 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
772 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
773 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
774 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
775 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
776 | key_share_key = s->s3->tmp.pkey; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
777 | } executed 139 times by 1 test: else {end of block Executed by:
| 139 | ||||||||||||||||||||||||||||||||||||||||||||||||
778 | key_share_key = ssl_generate_pkey_group(s, curve_id); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
779 | if (key_share_key ==
| 0-3779 | ||||||||||||||||||||||||||||||||||||||||||||||||
780 | ((void *)0)
| 0-3779 | ||||||||||||||||||||||||||||||||||||||||||||||||
781 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
782 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
783 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
784 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
785 | } executed 3779 times by 1 test: end of block Executed by:
| 3779 | ||||||||||||||||||||||||||||||||||||||||||||||||
786 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
787 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
788 | encodedlen = EVP_PKEY_get1_tls_encodedpoint(key_share_key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
789 | &encoded_point); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
790 | if (encodedlen == 0
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
791 | ossl_statem_fatal((s), (80), (512), (16), __FILE__, 610); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
792 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
793 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
794 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
795 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
796 | if (!WPACKET_put_bytes__((pkt), (curve_id), 2)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
797 | || !WPACKET_sub_memcpy__((pkt), (encoded_point), (encodedlen), 2)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
798 | ossl_statem_fatal((s), (80), (512), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
799 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
800 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
801 | 618 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
802 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
803 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
804 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
805 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
806 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
807 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
808 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
809 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
810 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
811 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
812 | s->s3->tmp.pkey = key_share_key; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
813 | s->s3->group_id = curve_id; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
814 | CRYPTO_free(encoded_point, __FILE__, 629); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
815 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
816 | return executed 3918 times by 1 test: 1;return 1; Executed by:
executed 3918 times by 1 test: return 1; Executed by:
| 3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
817 | err: | - | ||||||||||||||||||||||||||||||||||||||||||||||||
818 | if (s->s3->tmp.pkey ==
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
819 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
820 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
821 | EVP_PKEY_free(key_share_key); never executed: EVP_PKEY_free(key_share_key); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
822 | CRYPTO_free(encoded_point, __FILE__, 635); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
823 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
824 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
825 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
826 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
827 | EXT_RETURN tls_construct_ctos_key_share(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
828 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
829 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
830 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
831 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
832 | size_t i, num_groups = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
833 | const uint16_t *pgroups = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
834 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
835 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
836 | uint16_t curve_id = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
837 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
838 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
839 | if (!WPACKET_put_bytes__((pkt), (51), 2)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
840 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
841 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
842 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
843 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
844 | ossl_statem_fatal((s), (80), (470), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
845 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
846 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
847 | 656 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
848 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
849 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
850 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
851 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
852 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
853 | tls1_get_supported_groups(s, &pgroups, &num_groups); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
854 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
855 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
856 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
857 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
858 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
859 | if (s->s3->group_id != 0
| 678-3240 | ||||||||||||||||||||||||||||||||||||||||||||||||
860 | curve_id = s->s3->group_id; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
861 | } executed 678 times by 1 test: else {end of block Executed by:
| 678 | ||||||||||||||||||||||||||||||||||||||||||||||||
862 | for (i = 0; i < num_groups
| 0-3240 | ||||||||||||||||||||||||||||||||||||||||||||||||
863 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
864 | if (!tls_curve_allowed(s, pgroups[i], (4 | (2 << 16)))
| 0-3240 | ||||||||||||||||||||||||||||||||||||||||||||||||
865 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
866 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
867 | curve_id = pgroups[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
868 | break; executed 3240 times by 1 test: break; Executed by:
| 3240 | ||||||||||||||||||||||||||||||||||||||||||||||||
869 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
870 | } executed 3240 times by 1 test: end of block Executed by:
| 3240 | ||||||||||||||||||||||||||||||||||||||||||||||||
871 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
872 | if (curve_id == 0
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
873 | ossl_statem_fatal((s), (80), (470), (101), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
874 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
875 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
876 | 681 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
877 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
878 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
879 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
880 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
881 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
882 | if (!add_key_share(s, pkt, curve_id)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
883 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
884 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
885 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
886 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
887 | if (!WPACKET_close(pkt)
| 0-3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
888 | ossl_statem_fatal((s), (80), (470), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
889 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
890 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
891 | 692 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
892 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
893 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
894 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
895 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
896 | return executed 3918 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 3918 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 3918 | ||||||||||||||||||||||||||||||||||||||||||||||||
897 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
898 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
899 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
900 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
901 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
902 | EXT_RETURN tls_construct_ctos_cookie(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
903 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
904 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
905 | EXT_RETURN ret = EXT_RETURN_FAIL; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
906 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
907 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
908 | if (s->ext.tls13_cookie_len == 0
| 140-3778 | ||||||||||||||||||||||||||||||||||||||||||||||||
909 | return executed 3778 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 3778 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 3778 | ||||||||||||||||||||||||||||||||||||||||||||||||
910 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
911 | if (!WPACKET_put_bytes__((pkt), (44), 2)
| 0-140 | ||||||||||||||||||||||||||||||||||||||||||||||||
912 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
913 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-140 | ||||||||||||||||||||||||||||||||||||||||||||||||
914 | || !WPACKET_sub_memcpy__((pkt), (s->ext.tls13_cookie), (s->ext.tls13_cookie_len), 2)
| 0-140 | ||||||||||||||||||||||||||||||||||||||||||||||||
915 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
916 | || !WPACKET_close(pkt)
| 0-140 | ||||||||||||||||||||||||||||||||||||||||||||||||
917 | ossl_statem_fatal((s), (80), (535), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
918 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
919 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
920 | 717 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
921 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
922 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
923 | goto never executed: end;goto end; never executed: goto end; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
924 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
925 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
926 | ret = EXT_RETURN_SENT; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
927 | end: code before this statement executed 140 times by 1 test: end: Executed by:
| 140 | ||||||||||||||||||||||||||||||||||||||||||||||||
928 | CRYPTO_free(s->ext.tls13_cookie, __FILE__, 723); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
929 | s->ext.tls13_cookie = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
930 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
931 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
932 | s->ext.tls13_cookie_len = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
933 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
934 | return executed 140 times by 1 test: ret;return ret; Executed by:
executed 140 times by 1 test: return ret; Executed by:
| 140 | ||||||||||||||||||||||||||||||||||||||||||||||||
935 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
936 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
937 | EXT_RETURN tls_construct_ctos_early_data(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
938 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
939 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
940 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
941 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
942 | char identity[128 + 1]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
943 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
944 | const unsigned char *id = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
945 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
946 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
947 | size_t idlen = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
948 | SSL_SESSION *psksess = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
949 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
950 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
951 | SSL_SESSION *edsess = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
952 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
953 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
954 | const EVP_MD *handmd = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
955 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
956 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
957 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
958 | if (s->hello_retry_request == SSL_HRR_PENDING
| 678-3240 | ||||||||||||||||||||||||||||||||||||||||||||||||
959 | handmd = ssl_handshake_md(s); executed 678 times by 1 test: handmd = ssl_handshake_md(s); Executed by:
| 678 | ||||||||||||||||||||||||||||||||||||||||||||||||
960 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
961 | if (s->psk_use_session_cb !=
| 30-3888 | ||||||||||||||||||||||||||||||||||||||||||||||||
962 | ((void *)0)
| 30-3888 | ||||||||||||||||||||||||||||||||||||||||||||||||
963 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
964 | && (!s->psk_use_session_cb(s, handmd, &id, &idlen, &psksess)
| 0-30 | ||||||||||||||||||||||||||||||||||||||||||||||||
965 | || (psksess !=
| 2-28 | ||||||||||||||||||||||||||||||||||||||||||||||||
966 | ((void *)0)
| 2-28 | ||||||||||||||||||||||||||||||||||||||||||||||||
967 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
968 | && psksess->ssl_version != 0x0304
| 1-27 | ||||||||||||||||||||||||||||||||||||||||||||||||
969 | SSL_SESSION_free(psksess); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
970 | ossl_statem_fatal((s), (80), (530), (219), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
971 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
972 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
973 | 752 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
974 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
975 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
976 | return executed 1 time by 1 test: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; Executed by:
executed 1 time by 1 test: return EXT_RETURN_FAIL; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
977 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
978 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
979 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
980 | if (psksess ==
| 27-3890 | ||||||||||||||||||||||||||||||||||||||||||||||||
981 | ((void *)0)
| 27-3890 | ||||||||||||||||||||||||||||||||||||||||||||||||
982 | && s->psk_client_callback !=
| 9-3881 | ||||||||||||||||||||||||||||||||||||||||||||||||
983 | ((void *)0)
| 9-3881 | ||||||||||||||||||||||||||||||||||||||||||||||||
984 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
985 | unsigned char psk[256]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
986 | size_t psklen = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
987 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
988 | memset(identity, 0, sizeof(identity)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
989 | psklen = s->psk_client_callback(s, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
990 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
991 | , identity, sizeof(identity) - 1, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
992 | psk, sizeof(psk)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
993 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
994 | if (psklen > 256
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||
995 | ossl_statem_fatal((s), (40), (530), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
996 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
997 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
998 | 767 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
999 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1000 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1001 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1002 | } else if (psklen > 0
| 2-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1003 | const unsigned char tls13_aes128gcmsha256_id[] = { 0x13, 0x01 }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1004 | const SSL_CIPHER *cipher; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1005 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1006 | idlen = strlen(identity); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1007 | if (idlen > 128
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1008 | ossl_statem_fatal((s), (80), (530), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1009 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1010 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1011 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1012 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1013 | 777 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1014 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1015 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1016 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1017 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1018 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1019 | id = (unsigned char *)identity; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1020 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1021 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1022 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1023 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1024 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1025 | cipher = SSL_CIPHER_find(s, tls13_aes128gcmsha256_id); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1026 | if (cipher ==
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1027 | ((void *)0)
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1028 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1029 | ossl_statem_fatal((s), (80), (530), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1030 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1031 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1032 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1033 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1034 | 790 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1035 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1036 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1037 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1038 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1039 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1040 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1041 | psksess = SSL_SESSION_new(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1042 | if (psksess ==
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1043 | ((void *)0)
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1044 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1045 | || !SSL_SESSION_set1_master_key(psksess, psk, psklen)
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1046 | || !SSL_SESSION_set_cipher(psksess, cipher)
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1047 | || !SSL_SESSION_set_protocol_version(psksess, 0x0304)
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1048 | ossl_statem_fatal((s), (80), (530), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1049 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1050 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1051 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1052 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1053 | 801 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1054 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1055 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1056 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1057 | OPENSSL_cleanse(psk, psklen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1058 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1059 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1060 | OPENSSL_cleanse(psk, psklen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1061 | } executed 7 times by 1 test: end of block Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1062 | } executed 9 times by 1 test: end of block Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||
1063 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1064 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1065 | SSL_SESSION_free(s->psksession); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1066 | s->psksession = psksess; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1067 | if (psksess !=
| 34-3883 | ||||||||||||||||||||||||||||||||||||||||||||||||
1068 | ((void *)0)
| 34-3883 | ||||||||||||||||||||||||||||||||||||||||||||||||
1069 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1070 | CRYPTO_free(s->psksession_id, __FILE__, 813); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1071 | s->psksession_id = CRYPTO_memdup((id), idlen, __FILE__, 814); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1072 | if (s->psksession_id ==
| 0-34 | ||||||||||||||||||||||||||||||||||||||||||||||||
1073 | ((void *)0)
| 0-34 | ||||||||||||||||||||||||||||||||||||||||||||||||
1074 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1075 | ossl_statem_fatal((s), (80), (530), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1076 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1077 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1078 | 817 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1079 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1080 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1081 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1082 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1083 | s->psksession_id_len = idlen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1084 | } executed 34 times by 1 test: end of block Executed by:
| 34 | ||||||||||||||||||||||||||||||||||||||||||||||||
1085 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1086 | if (s->early_data_state != SSL_EARLY_DATA_CONNECTING
| 52-3865 | ||||||||||||||||||||||||||||||||||||||||||||||||
1087 | || (s->session->ext.max_early_data == 0
| 14-38 | ||||||||||||||||||||||||||||||||||||||||||||||||
1088 | && (psksess ==
| 0-14 | ||||||||||||||||||||||||||||||||||||||||||||||||
1089 | ((void *)0)
| 0-14 | ||||||||||||||||||||||||||||||||||||||||||||||||
1090 | || psksess->ext.max_early_data == 0
| 0-14 | ||||||||||||||||||||||||||||||||||||||||||||||||
1091 | s->max_early_data = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1092 | return executed 3865 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 3865 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 3865 | ||||||||||||||||||||||||||||||||||||||||||||||||
1093 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1094 | edsess = s->session->ext.max_early_data != 0
| 14-38 | ||||||||||||||||||||||||||||||||||||||||||||||||
1095 | s->max_early_data = edsess->ext.max_early_data; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1096 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1097 | if (edsess->ext.hostname !=
| 3-49 | ||||||||||||||||||||||||||||||||||||||||||||||||
1098 | ((void *)0)
| 3-49 | ||||||||||||||||||||||||||||||||||||||||||||||||
1099 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1100 | if (s->ext.hostname ==
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1101 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1102 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1103 | || (s->ext.hostname !=
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1104 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1105 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1106 | && | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1107 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1108 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1109 | ) && __builtin_constant_p (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1110 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1111 | ) && (__s1_len = __builtin_strlen (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1112 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1113 | ), __s2_len = __builtin_strlen (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1114 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1115 | ), (!((size_t)(const void *)((
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1116 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1117 | ) + 1) - (size_t)(const void *)(
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1118 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1119 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1120 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1121 | ) + 1) - (size_t)(const void *)(
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1122 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1123 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1124 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1125 | ,
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1126 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1127 | ) : (__builtin_constant_p (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1128 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1129 | ) && ((size_t)(const void *)((
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1130 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1131 | ) + 1) - (size_t)(const void *)(
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1132 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1133 | ) == 1) && (__s1_len = __builtin_strlen (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1134 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1135 | ), __s1_len < 4) ? (__builtin_constant_p (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1136 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1137 | ) && ((size_t)(const void *)((
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1138 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1139 | ) + 1) - (size_t)(const void *)(
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1140 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1141 | ) == 1) ? __builtin_strcmp (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1142 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1143 | ,
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1144 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1145 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1146 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1147 | ); int __result = (((const unsigned char *) (const char *) (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1148 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1149 | ))[0] - __s2[0]); if (__s1_len > 0
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1150 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1151 | ))[1] - __s2[1]); if (__s1_len > 1
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1152 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1153 | ))[2] - __s2[2]); if (__s1_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( s->ext.hostname ))[3] - __s2[3]);
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1154 | s->ext.hostname
never executed: __result = (((const unsigned char *) (const char *) ( s->ext.hostname ))[3] - __s2[3]); | 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1155 | ))[3] - __s2[3]);
never executed: }__result = (((const unsigned char *) (const char *) ( s->ext.hostname ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : (__builtin_constant_p (end of block
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1156 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1157 | ) && ((size_t)(const void *)((
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1158 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1159 | ) + 1) - (size_t)(const void *)(
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1160 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1161 | ) == 1) && (__s2_len = __builtin_strlen (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1162 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1163 | ), __s2_len < 4) ? (__builtin_constant_p (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1164 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1165 | ) && ((size_t)(const void *)((
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1166 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1167 | ) + 1) - (size_t)(const void *)(
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1168 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1169 | ) == 1) ? __builtin_strcmp (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1170 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1171 | ,
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1172 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1173 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1174 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1175 | ); int __result = (((const unsigned char *) (const char *) (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1176 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1177 | ))[0] - __s2[0]); if (__s2_len > 0
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1178 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1179 | ))[1] - __s2[1]); if (__s2_len > 1
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1180 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1181 | ))[2] - __s2[2]); if (__s2_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( edsess->ext.hostname ))[3] - __s2[3]);
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1182 | edsess->ext.hostname
never executed: __result = (((const unsigned char *) (const char *) ( edsess->ext.hostname ))[3] - __s2[3]); | 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1183 | ))[3] - __s2[3]);
never executed: }__result = (((const unsigned char *) (const char *) ( edsess->ext.hostname ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : __builtin_strcmp (end of block
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1184 | s->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1185 | ,
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1186 | edsess->ext.hostname
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1187 | )))); })
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1188 | != 0
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1189 | ossl_statem_fatal((s), (80), (530), (231), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1190 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1191 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1192 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1193 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1194 | 838 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1195 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1196 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1197 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1198 | return executed 1 time by 1 test: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; Executed by:
executed 1 time by 1 test: return EXT_RETURN_FAIL; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1199 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1200 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1201 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1202 | if ((s->ext.alpn ==
| 4-47 | ||||||||||||||||||||||||||||||||||||||||||||||||
1203 | ((void *)0)
| 4-47 | ||||||||||||||||||||||||||||||||||||||||||||||||
1204 | && edsess->ext.alpn_selected !=
| 0-47 | ||||||||||||||||||||||||||||||||||||||||||||||||
1205 | ((void *)0)
| 0-47 | ||||||||||||||||||||||||||||||||||||||||||||||||
1206 | )) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1207 | ossl_statem_fatal((s), (80), (530), (222), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1208 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1209 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1210 | 845 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1211 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1212 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1213 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1214 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1215 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1216 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1217 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1218 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1219 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1220 | if (edsess->ext.alpn_selected !=
| 4-47 | ||||||||||||||||||||||||||||||||||||||||||||||||
1221 | ((void *)0)
| 4-47 | ||||||||||||||||||||||||||||||||||||||||||||||||
1222 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1223 | PACKET prots, alpnpkt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1224 | int found = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1225 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1226 | if (!PACKET_buf_init(&prots, s->ext.alpn, s->ext.alpn_len)
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||
1227 | ossl_statem_fatal((s), (80), (530), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1228 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1229 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1230 | 859 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1231 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1232 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1233 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1234 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1235 | while (PACKET_get_length_prefixed_1(&prots, &alpnpkt)
| 1-5 | ||||||||||||||||||||||||||||||||||||||||||||||||
1236 | if (PACKET_equal(&alpnpkt, edsess->ext.alpn_selected,
| 2-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1237 | edsess->ext.alpn_selected_len)
| 2-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1238 | found = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1239 | break; executed 3 times by 1 test: break; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1240 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1241 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1242 | if (!found
| 1-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1243 | ossl_statem_fatal((s), (80), (530), (222), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1244 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1245 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1246 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1247 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1248 | 872 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1249 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1250 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1251 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1252 | return executed 1 time by 1 test: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; Executed by:
executed 1 time by 1 test: return EXT_RETURN_FAIL; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1253 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1254 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1255 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1256 | if (!WPACKET_put_bytes__((pkt), (42), 2)
| 0-50 | ||||||||||||||||||||||||||||||||||||||||||||||||
1257 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-50 | ||||||||||||||||||||||||||||||||||||||||||||||||
1258 | || !WPACKET_close(pkt)
| 0-50 | ||||||||||||||||||||||||||||||||||||||||||||||||
1259 | ossl_statem_fatal((s), (80), (530), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1260 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1261 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1262 | 881 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1263 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1264 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1265 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1266 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1267 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1268 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1269 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1270 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1272 | s->ext.early_data = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1273 | s->ext.early_data_ok = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1274 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1275 | return executed 50 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 50 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 50 | ||||||||||||||||||||||||||||||||||||||||||||||||
1276 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1277 | EXT_RETURN tls_construct_ctos_padding(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1278 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1279 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1280 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1281 | unsigned char *padbytes; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1282 | size_t hlen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1283 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1284 | if ((
| 3-4933 | ||||||||||||||||||||||||||||||||||||||||||||||||
1285 | return executed 4933 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 4933 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 4933 | ||||||||||||||||||||||||||||||||||||||||||||||||
1286 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1287 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1288 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1289 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1290 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1291 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1292 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1293 | if (!WPACKET_get_total_written(pkt, &hlen)
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1294 | ossl_statem_fatal((s), (80), (472), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1295 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1296 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1297 | 930 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1298 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1299 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1300 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1301 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1302 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1303 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1304 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1305 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1306 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1307 | if (s->session->ssl_version == 0x0304
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1308 | && s->session->ext.ticklen != 0
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1309 | && s->session->cipher !=
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1310 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1311 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1312 | const EVP_MD *md = ssl_md(s->session->cipher->algorithm2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1313 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1314 | if (md !=
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1315 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1316 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1317 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1318 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1319 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1320 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1321 | hlen += (2 + 2 + 2 + 2 + 4 + 2 + 1) + s->session->ext.ticklen | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1322 | + EVP_MD_size(md); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1323 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1324 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1326 | if (hlen > 0xff
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1327 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1328 | hlen = 0x200 - hlen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1329 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1330 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1331 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1332 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1333 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1334 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1335 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1336 | if (hlen > 4
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1337 | hlen -= 4; executed 2 times by 1 test: hlen -= 4; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1338 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1339 | hlen = 1; never executed: hlen = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1340 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1341 | if (!WPACKET_put_bytes__((pkt), (21), 2)
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1342 | || !WPACKET_sub_allocate_bytes__((pkt), (hlen), (&padbytes), 2)
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1343 | ossl_statem_fatal((s), (80), (472), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1344 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1345 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1346 | 971 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1347 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1348 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1349 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1350 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1351 | memset(padbytes, 0, hlen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1352 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1353 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1354 | return executed 3 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 3 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1355 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1356 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1357 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1358 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1359 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1360 | EXT_RETURN tls_construct_ctos_psk(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1361 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1362 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1363 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1364 | uint32_t now, agesec, agems = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1365 | size_t reshashsize = 0, pskhashsize = 0, binderoffset, msglen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1366 | unsigned char *resbinder = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1367 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1368 | , *pskbinder = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1369 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1370 | , *msgstart = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1371 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1372 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1373 | const EVP_MD *handmd = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1374 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1375 | , *mdres = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1376 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1377 | , *mdpsk = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1378 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1379 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1380 | int dores = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1381 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1382 | s->session->ext.tick_identity = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1383 | if (s->session->ssl_version != 0x0304
| 30-3885 | ||||||||||||||||||||||||||||||||||||||||||||||||
1384 | || (s->session->ext.ticklen == 0
| 31-3742 | ||||||||||||||||||||||||||||||||||||||||||||||||
1385 | ((void *)0)
| 31-3711 | ||||||||||||||||||||||||||||||||||||||||||||||||
1386 | )) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1387 | return executed 3741 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 3741 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 3741 | ||||||||||||||||||||||||||||||||||||||||||||||||
1388 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1389 | if (s->hello_retry_request == SSL_HRR_PENDING
| 19-155 | ||||||||||||||||||||||||||||||||||||||||||||||||
1390 | handmd = ssl_handshake_md(s); executed 19 times by 1 test: handmd = ssl_handshake_md(s); Executed by:
| 19 | ||||||||||||||||||||||||||||||||||||||||||||||||
1391 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1392 | if (s->session->ext.ticklen != 0
| 31-143 | ||||||||||||||||||||||||||||||||||||||||||||||||
1393 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1394 | if (s->session->cipher ==
| 0-143 | ||||||||||||||||||||||||||||||||||||||||||||||||
1395 | ((void *)0)
| 0-143 | ||||||||||||||||||||||||||||||||||||||||||||||||
1396 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1397 | ossl_statem_fatal((s), (80), (501), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1398 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1399 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1400 | 1016 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1401 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1402 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1403 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1404 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1405 | mdres = ssl_md(s->session->cipher->algorithm2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1406 | if (mdres ==
| 0-143 | ||||||||||||||||||||||||||||||||||||||||||||||||
1407 | ((void *)0)
| 0-143 | ||||||||||||||||||||||||||||||||||||||||||||||||
1408 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1409 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1410 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1411 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1412 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1413 | goto never executed: dopsksess;goto dopsksess; never executed: goto dopsksess; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1414 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1415 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1416 | if (s->hello_retry_request == SSL_HRR_PENDING
| 1-130 | ||||||||||||||||||||||||||||||||||||||||||||||||
1417 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1418 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1419 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1420 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1421 | goto executed 1 time by 1 test: dopsksess;goto dopsksess; Executed by:
executed 1 time by 1 test: goto dopsksess; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1422 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1423 | now = (uint32_t)time( | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1424 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1425 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1426 | agesec = now - (uint32_t)s->session->time; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1427 | if (agesec > 0
| 10-132 | ||||||||||||||||||||||||||||||||||||||||||||||||
1428 | agesec--; executed 10 times by 1 test: agesec--; Executed by:
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||
1429 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1430 | if (s->session->ext.tick_lifetime_hint < agesec
| 0-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1431 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1432 | goto never executed: dopsksess;goto dopsksess; never executed: goto dopsksess; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1433 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1434 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1435 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1436 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1437 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1438 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1439 | agems = agesec * (uint32_t)1000; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1440 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1441 | if (agesec != 0
| 0-138 | ||||||||||||||||||||||||||||||||||||||||||||||||
1442 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1443 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1444 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1445 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1446 | goto never executed: dopsksess;goto dopsksess; never executed: goto dopsksess; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1447 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1449 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1450 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1451 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1452 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1453 | agems += s->session->ext.tick_age_add; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1454 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1455 | reshashsize = EVP_MD_size(mdres); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1456 | dores = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1457 | } executed 142 times by 1 test: end of block Executed by:
| 142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1458 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1459 | dopsksess: code before this statement executed 173 times by 1 test: dopsksess: Executed by:
| 173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1460 | if (!dores
| 1-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1461 | ((void *)0)
| 1-31 | ||||||||||||||||||||||||||||||||||||||||||||||||
1462 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1463 | return executed 1 time by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 1 time by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1464 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1465 | if (s->psksession !=
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1466 | ((void *)0)
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1467 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1468 | mdpsk = ssl_md(s->psksession->cipher->algorithm2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1469 | if (mdpsk ==
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1470 | ((void *)0)
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1471 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1472 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1473 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1474 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1475 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1476 | ossl_statem_fatal((s), (80), (501), (219), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1477 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1478 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1479 | 1098 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1480 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1481 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1482 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1483 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1484 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1485 | if (s->hello_retry_request == SSL_HRR_PENDING
| 0-26 | ||||||||||||||||||||||||||||||||||||||||||||||||
1486 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1487 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1488 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1489 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1490 | ossl_statem_fatal((s), (80), (501), (219), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1491 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1492 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1493 | 1108 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1494 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1495 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1496 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1497 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1498 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1499 | pskhashsize = EVP_MD_size(mdpsk); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1500 | } executed 32 times by 1 test: end of block Executed by:
| 32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1501 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1502 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1503 | if (!WPACKET_put_bytes__((pkt), (41), 2)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1504 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1505 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1506 | ossl_statem_fatal((s), (80), (501), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1507 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1508 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1509 | 1120 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1510 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1511 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1512 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1513 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1514 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1515 | if (dores
| 31-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1516 | if (!WPACKET_sub_memcpy__((pkt), (s->session->ext.tick), (s->session->ext.ticklen), 2)
| 0-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1517 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1518 | || !WPACKET_put_bytes__((pkt), (agems), 4)
| 0-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1519 | ossl_statem_fatal((s), (80), (501), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1520 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1521 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1522 | 1129 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1523 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1524 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1525 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1526 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1527 | } executed 142 times by 1 test: end of block Executed by:
| 142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1528 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1529 | if (s->psksession !=
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1530 | ((void *)0)
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1531 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1532 | if (!WPACKET_sub_memcpy__((pkt), (s->psksession_id), (s->psksession_id_len), 2)
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1533 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1534 | || !WPACKET_put_bytes__((pkt), (0), 4)
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1535 | ossl_statem_fatal((s), (80), (501), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1536 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1537 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1538 | 1139 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1539 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1540 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1541 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1542 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1543 | } executed 32 times by 1 test: end of block Executed by:
| 32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1544 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1545 | if (!WPACKET_close(pkt)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1546 | || !WPACKET_get_total_written(pkt, &binderoffset)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1547 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1548 | || (dores
| 31-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1549 | && !WPACKET_sub_allocate_bytes__((pkt), (reshashsize), (&resbinder), 1)
| 0-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1550 | || (s->psksession !=
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1551 | ((void *)0)
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1553 | && !WPACKET_sub_allocate_bytes__((pkt), (pskhashsize), (&pskbinder), 1)
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1554 | || !WPACKET_close(pkt)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1555 | || !WPACKET_close(pkt)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1556 | || !WPACKET_get_total_written(pkt, &msglen)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1557 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1558 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1559 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1560 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1561 | || !WPACKET_fill_lengths(pkt)
| 0-173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1562 | ossl_statem_fatal((s), (80), (501), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1563 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1564 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1565 | 1160 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1566 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1567 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1568 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1569 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1570 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1571 | msgstart = WPACKET_get_curr(pkt) - msglen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1572 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1573 | if (dores
| 31-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1574 | && tls_psk_do_binder(s, mdres, msgstart, binderoffset,
| 0-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1575 | ((void *)0)
| 0-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1576 | ,
| 0-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1577 | resbinder, s->session, 1, 0) != 1
| 0-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1578 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1579 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1580 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1581 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1582 | if (s->psksession !=
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1583 | ((void *)0)
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1584 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1585 | && tls_psk_do_binder(s, mdpsk, msgstart, binderoffset,
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1586 | ((void *)0)
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1587 | ,
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1588 | pskbinder, s->psksession, 1, 1) != 1
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1589 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1590 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1591 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1592 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1593 | if (dores
| 31-142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1594 | s->session->ext.tick_identity = 0; executed 142 times by 1 test: s->session->ext.tick_identity = 0; Executed by:
| 142 | ||||||||||||||||||||||||||||||||||||||||||||||||
1595 | if (s->psksession !=
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1596 | ((void *)0)
| 32-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
1597 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1598 | s->psksession->ext.tick_identity = (dores
executed 32 times by 1 test: s->psksession->ext.tick_identity = (dores ? 1 : 0); Executed by:
| 1-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
1599 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1600 | return executed 173 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 173 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 173 | ||||||||||||||||||||||||||||||||||||||||||||||||
1601 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1602 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1603 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1604 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1605 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1606 | EXT_RETURN tls_construct_ctos_post_handshake_auth(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1607 | unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1608 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1609 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1610 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1611 | if (!s->pha_enabled
| 38-3880 | ||||||||||||||||||||||||||||||||||||||||||||||||
1612 | return executed 3880 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT; Executed by:
executed 3880 times by 1 test: return EXT_RETURN_NOT_SENT; Executed by:
| 3880 | ||||||||||||||||||||||||||||||||||||||||||||||||
1613 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1614 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1615 | if (!WPACKET_put_bytes__((pkt), (49), 2)
| 0-38 | ||||||||||||||||||||||||||||||||||||||||||||||||
1616 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-38 | ||||||||||||||||||||||||||||||||||||||||||||||||
1617 | || !WPACKET_close(pkt)
| 0-38 | ||||||||||||||||||||||||||||||||||||||||||||||||
1618 | ossl_statem_fatal((s), (80), (619), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1619 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1620 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1621 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1622 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1623 | 1205 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1624 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1625 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1626 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1627 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL; never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1628 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1629 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1630 | s->post_handshake_auth = SSL_PHA_EXT_SENT; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1631 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1632 | return executed 38 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT; Executed by:
executed 38 times by 1 test: return EXT_RETURN_SENT; Executed by:
| 38 | ||||||||||||||||||||||||||||||||||||||||||||||||
1633 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1634 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1635 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1636 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1637 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1638 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1639 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1640 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1641 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1642 | int tls_parse_stoc_renegotiate(SSL *s, PACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1643 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1644 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1645 | size_t expected_len = s->s3->previous_client_finished_len | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1646 | + s->s3->previous_server_finished_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1647 | size_t ilen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1648 | const unsigned char *data; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1649 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1651 | if (!((expected_len == 0
| 0-2484 | ||||||||||||||||||||||||||||||||||||||||||||||||
1652 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1653 | || !((expected_len == 0
| 0-2484 | ||||||||||||||||||||||||||||||||||||||||||||||||
1654 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1655 | ossl_statem_fatal((s), (80), (448), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1656 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1657 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1658 | 1235 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1659 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1660 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1661 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1662 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1664 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1665 | if (!PACKET_get_1_len(pkt, &ilen)
| 0-2484 | ||||||||||||||||||||||||||||||||||||||||||||||||
1666 | ossl_statem_fatal((s), (50), (448), (336), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1667 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1668 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1669 | 1242 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1670 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1671 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1672 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1673 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1674 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1675 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1676 | if (PACKET_remaining(pkt) != ilen
| 1-2483 | ||||||||||||||||||||||||||||||||||||||||||||||||
1677 | ossl_statem_fatal((s), (50), (448), (336), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1678 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1679 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1680 | 1249 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1681 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1682 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1683 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1684 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1685 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1686 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1687 | if (ilen != expected_len
| 1-2482 | ||||||||||||||||||||||||||||||||||||||||||||||||
1688 | ossl_statem_fatal((s), (47), (448), (337), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1689 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1690 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1691 | 1256 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1692 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1693 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1694 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1695 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1696 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1697 | if (!PACKET_get_bytes(pkt, &data, s->s3->previous_client_finished_len)
| 0-2482 | ||||||||||||||||||||||||||||||||||||||||||||||||
1698 | || memcmp(data, s->s3->previous_client_finished,
| 0-2482 | ||||||||||||||||||||||||||||||||||||||||||||||||
1699 | s->s3->previous_client_finished_len) != 0
| 0-2482 | ||||||||||||||||||||||||||||||||||||||||||||||||
1700 | ossl_statem_fatal((s), (47), (448), (337), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1701 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1702 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1703 | 1264 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1704 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1705 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1706 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1707 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1708 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1709 | if (!PACKET_get_bytes(pkt, &data, s->s3->previous_server_finished_len)
| 0-2482 | ||||||||||||||||||||||||||||||||||||||||||||||||
1710 | || memcmp(data, s->s3->previous_server_finished,
| 0-2482 | ||||||||||||||||||||||||||||||||||||||||||||||||
1711 | s->s3->previous_server_finished_len) != 0
| 0-2482 | ||||||||||||||||||||||||||||||||||||||||||||||||
1712 | ossl_statem_fatal((s), (47), (448), (337), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1713 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1714 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1715 | 1272 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1716 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1717 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1718 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1719 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1720 | s->s3->send_connection_binding = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1721 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1722 | return executed 2482 times by 1 test: 1;return 1; Executed by:
executed 2482 times by 1 test: return 1; Executed by:
| 2482 | ||||||||||||||||||||||||||||||||||||||||||||||||
1723 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1724 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1725 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1726 | int tls_parse_stoc_maxfragmentlen(SSL *s, PACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1727 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1728 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1729 | unsigned int value; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1730 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1731 | if (PACKET_remaining(pkt) != 1
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||
1732 | ossl_statem_fatal((s), (50), (581), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1733 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1734 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1735 | 1288 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1736 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1737 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1738 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1739 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1740 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1741 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1742 | if (!(((
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||
1743 | ossl_statem_fatal((s), (47), (581), (232), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1744 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1745 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1746 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1747 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1748 | 1296 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1749 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1751 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1752 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1753 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1754 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1755 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1756 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1757 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1758 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1759 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1760 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1761 | if (value != s->ext.max_fragment_len_mode
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||
1762 | ossl_statem_fatal((s), (47), (581), (232), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1763 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1764 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1765 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1766 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1767 | 1309 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1768 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1769 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1770 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1771 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1772 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1773 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1774 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1775 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1776 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1777 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1778 | s->session->ext.max_fragment_len_mode = value; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1779 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1780 | return executed 6 times by 1 test: 1;return 1; Executed by:
executed 6 times by 1 test: return 1; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||
1781 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1782 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1783 | int tls_parse_stoc_server_name(SSL *s, PACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1784 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1785 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1786 | if (s->ext.hostname ==
| 0-680 | ||||||||||||||||||||||||||||||||||||||||||||||||
1787 | ((void *)0)
| 0-680 | ||||||||||||||||||||||||||||||||||||||||||||||||
1788 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1789 | ossl_statem_fatal((s), (80), (583), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1790 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1791 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1792 | 1327 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1793 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1794 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1795 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1796 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1797 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1798 | if (PACKET_remaining(pkt) > 0
| 2-678 | ||||||||||||||||||||||||||||||||||||||||||||||||
1799 | ossl_statem_fatal((s), (50), (583), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1800 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1801 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1802 | 1333 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1803 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1804 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1805 | return executed 2 times by 1 test: 0;return 0; Executed by:
executed 2 times by 1 test: return 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
1806 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1807 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1808 | if (!s->hit
| 0-678 | ||||||||||||||||||||||||||||||||||||||||||||||||
1809 | if (s->session->ext.hostname !=
| 0-678 | ||||||||||||||||||||||||||||||||||||||||||||||||
1810 | ((void *)0)
| 0-678 | ||||||||||||||||||||||||||||||||||||||||||||||||
1811 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1812 | ossl_statem_fatal((s), (80), (583), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1813 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1814 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1815 | 1340 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1816 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1817 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1818 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1819 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1820 | s->session->ext.hostname = CRYPTO_strdup(s->ext.hostname, __FILE__, 1343); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1821 | if (s->session->ext.hostname ==
| 0-678 | ||||||||||||||||||||||||||||||||||||||||||||||||
1822 | ((void *)0)
| 0-678 | ||||||||||||||||||||||||||||||||||||||||||||||||
1823 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1824 | ossl_statem_fatal((s), (80), (583), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1825 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1826 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1827 | 1346 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1828 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1829 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1830 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1831 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1832 | } executed 678 times by 1 test: end of block Executed by:
| 678 | ||||||||||||||||||||||||||||||||||||||||||||||||
1833 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1834 | return executed 678 times by 1 test: 1;return 1; Executed by:
executed 678 times by 1 test: return 1; Executed by:
| 678 | ||||||||||||||||||||||||||||||||||||||||||||||||
1835 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1836 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1837 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1838 | int tls_parse_stoc_ec_pt_formats(SSL *s, PACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1839 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1840 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1841 | size_t ecpointformats_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1842 | PACKET ecptformatlist; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1843 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1844 | if (!PACKET_as_length_prefixed_1(pkt, &ecptformatlist)
| 3-1050 | ||||||||||||||||||||||||||||||||||||||||||||||||
1845 | ossl_statem_fatal((s), (50), (580), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1846 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1847 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1848 | 1363 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1849 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1850 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1851 | return executed 3 times by 1 test: 0;return 0; Executed by:
executed 3 times by 1 test: return 0; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||
1852 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1853 | if (!s->hit
| 13-1037 | ||||||||||||||||||||||||||||||||||||||||||||||||
1854 | ecpointformats_len = PACKET_remaining(&ecptformatlist); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1855 | if (ecpointformats_len == 0
| 1-1036 | ||||||||||||||||||||||||||||||||||||||||||||||||
1856 | ossl_statem_fatal((s), (50), (580), (271), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1857 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1858 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1859 | 1370 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1860 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1861 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1862 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1863 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1864 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1865 | s->session->ext.ecpointformats_len = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1866 | CRYPTO_free(s->session->ext.ecpointformats, __FILE__, 1375); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1867 | s->session->ext.ecpointformats = CRYPTO_malloc(ecpointformats_len, __FILE__, 1376); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1868 | if (s->session->ext.ecpointformats ==
| 0-1036 | ||||||||||||||||||||||||||||||||||||||||||||||||
1869 | ((void *)0)
| 0-1036 | ||||||||||||||||||||||||||||||||||||||||||||||||
1870 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1871 | ossl_statem_fatal((s), (80), (580), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1872 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1873 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1874 | 1379 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1875 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1876 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1877 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1878 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1879 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1880 | s->session->ext.ecpointformats_len = ecpointformats_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1881 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1882 | if (!PACKET_copy_bytes(&ecptformatlist,
| 0-1036 | ||||||||||||||||||||||||||||||||||||||||||||||||
1883 | s->session->ext.ecpointformats,
| 0-1036 | ||||||||||||||||||||||||||||||||||||||||||||||||
1884 | ecpointformats_len)
| 0-1036 | ||||||||||||||||||||||||||||||||||||||||||||||||
1885 | ossl_statem_fatal((s), (80), (580), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1886 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1887 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1888 | 1389 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1889 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1890 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1891 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1892 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1893 | } executed 1036 times by 1 test: end of block Executed by:
| 1036 | ||||||||||||||||||||||||||||||||||||||||||||||||
1894 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1895 | return executed 1049 times by 1 test: 1;return 1; Executed by:
executed 1049 times by 1 test: return 1; Executed by:
| 1049 | ||||||||||||||||||||||||||||||||||||||||||||||||
1896 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1897 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1898 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1899 | int tls_parse_stoc_session_ticket(SSL *s, PACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1900 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1901 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1902 | if (s->ext.session_ticket_cb !=
| 0-1607 | ||||||||||||||||||||||||||||||||||||||||||||||||
1903 | ((void *)0)
| 0-1607 | ||||||||||||||||||||||||||||||||||||||||||||||||
1904 | && | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1905 | !s->ext.session_ticket_cb(s, PACKET_data(pkt),
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1906 | PACKET_remaining(pkt),
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1907 | s->ext.session_ticket_cb_arg)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1908 | ossl_statem_fatal((s), (40), (584), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1909 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1910 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1911 | 1406 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1912 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1913 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1914 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1915 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1916 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1917 | if (!tls_use_ticket(s)
| 0-1607 | ||||||||||||||||||||||||||||||||||||||||||||||||
1918 | ossl_statem_fatal((s), (110), (584), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1919 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1920 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1921 | 1412 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1922 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1923 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1924 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1925 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1926 | if (PACKET_remaining(pkt) > 0
| 1-1606 | ||||||||||||||||||||||||||||||||||||||||||||||||
1927 | ossl_statem_fatal((s), (50), (584), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1928 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1929 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1930 | 1417 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1931 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1932 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1933 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
1934 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1935 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1936 | s->ext.ticket_expected = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1937 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1938 | return executed 1606 times by 1 test: 1;return 1; Executed by:
executed 1606 times by 1 test: return 1; Executed by:
| 1606 | ||||||||||||||||||||||||||||||||||||||||||||||||
1939 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1940 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1941 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1942 | int tls_parse_stoc_status_request(SSL *s, PACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1943 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1944 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1945 | if (context == 0x4000
| 0-12 | ||||||||||||||||||||||||||||||||||||||||||||||||
1946 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1947 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1948 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1949 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1950 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1951 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1952 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1953 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1954 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1955 | if (s->ext.status_type != 1
| 0-12 | ||||||||||||||||||||||||||||||||||||||||||||||||
1956 | ossl_statem_fatal((s), (110), (585), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1957 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1958 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1959 | 1442 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1960 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1961 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1962 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1963 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1964 | if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
| 0-10 | ||||||||||||||||||||||||||||||||||||||||||||||||
1965 | ossl_statem_fatal((s), (50), (585), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1966 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1967 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1968 | 1447 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1969 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1970 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1971 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1972 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1973 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1974 | if ((!(s->method->ssl3_enc->enc_flags & 0x8)
| 0-10 | ||||||||||||||||||||||||||||||||||||||||||||||||
1975 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1976 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1977 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1978 | if (chainidx != 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||
1979 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
1980 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1981 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1982 | return executed 6 times by 1 test: tls_process_cert_status_body(s, pkt);return tls_process_cert_status_body(s, pkt); Executed by:
executed 6 times by 1 test: return tls_process_cert_status_body(s, pkt); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||
1983 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1984 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1985 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1986 | s->ext.status_expected = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1987 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1988 | return executed 6 times by 1 test: 1;return 1; Executed by:
executed 6 times by 1 test: return 1; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||
1989 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1990 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1991 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1992 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1993 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1994 | int tls_parse_stoc_sct(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1995 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1996 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
1997 | if (context == 0x4000
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
1998 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
1999 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2000 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2001 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2002 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2003 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2004 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2005 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2006 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2007 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2008 | if (s->ct_validation_callback !=
| 2-5 | ||||||||||||||||||||||||||||||||||||||||||||||||
2009 | ((void *)0)
| 2-5 | ||||||||||||||||||||||||||||||||||||||||||||||||
2010 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2011 | size_t size = PACKET_remaining(pkt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2012 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2013 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2014 | CRYPTO_free(s->ext.scts, __FILE__, 1489); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2015 | s->ext.scts = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2016 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2017 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2018 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2019 | s->ext.scts_len = (uint16_t)size; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2020 | if (size > 0
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2021 | s->ext.scts = CRYPTO_malloc(size, __FILE__, 1494); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2022 | if (s->ext.scts ==
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2023 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2024 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2025 | || !PACKET_copy_bytes(pkt, s->ext.scts, size)
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2026 | ossl_statem_fatal((s), (80), (564), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2027 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2028 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2029 | 1498 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2030 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2031 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2032 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2033 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2034 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2035 | } executed 2 times by 1 test: else {end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2036 | ENDPOINT role = (
| 0-5 | ||||||||||||||||||||||||||||||||||||||||||||||||
2037 | ? ENDPOINT_CLIENT : ENDPOINT_BOTH; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2038 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2039 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2040 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2041 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2042 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2043 | if (custom_ext_find(&s->cert->custext, role,
| 2-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2044 | 18,
| 2-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2045 |
| 2-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2046 | ((void *)0)
| 2-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2047 | ) ==
| 2-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2048 | ((void *)0)
| 2-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2049 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2050 | ossl_statem_fatal((s), (110), (564), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2051 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2052 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2053 | 1514 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2054 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2055 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2056 | return executed 2 times by 1 test: 0;return 0; Executed by:
executed 2 times by 1 test: return 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2057 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2058 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2059 | if (!custom_ext_parse(s, context,
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2060 | 18,
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2061 | PACKET_data(pkt), PACKET_remaining(pkt),
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2062 | x, chainidx)
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2063 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2064 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2065 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2066 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2067 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2068 | return executed 5 times by 1 test: 1;return 1; Executed by:
executed 5 times by 1 test: return 1; Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||
2069 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2070 | static int ssl_next_proto_validate(SSL *s, PACKET *pkt) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2071 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2072 | PACKET tmp_protocol; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2073 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2074 | while (PACKET_remaining(pkt)
| 21-29 | ||||||||||||||||||||||||||||||||||||||||||||||||
2075 | if (!PACKET_get_length_prefixed_1(pkt, &tmp_protocol)
| 0-29 | ||||||||||||||||||||||||||||||||||||||||||||||||
2076 | || PACKET_remaining(&tmp_protocol) == 0
| 0-29 | ||||||||||||||||||||||||||||||||||||||||||||||||
2077 | ossl_statem_fatal((s), (50), (565), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2078 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2079 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2080 | 1546 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2081 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2082 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2083 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2084 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2085 | } executed 29 times by 1 test: end of block Executed by:
| 29 | ||||||||||||||||||||||||||||||||||||||||||||||||
2086 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2087 | return executed 21 times by 1 test: 1;return 1; Executed by:
executed 21 times by 1 test: return 1; Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2088 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2089 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2090 | int tls_parse_stoc_npn(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2091 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2092 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2093 | unsigned char *selected; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2094 | unsigned char selected_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2095 | PACKET tmppkt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2096 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2097 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2098 | if (!((
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2099 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2100 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2101 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2102 | if (s->ctx->ext.npn_select_cb ==
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2103 | ((void *)0)
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2104 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2105 | ossl_statem_fatal((s), (110), (582), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2106 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2107 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2108 | 1568 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2109 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2110 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2111 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2112 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2113 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2114 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2115 | tmppkt = *pkt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2116 | if (!ssl_next_proto_validate(s, &tmppkt)
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2117 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2118 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2119 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2120 | if (s->ctx->ext.npn_select_cb(s, &selected, &selected_len,
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2121 | PACKET_data(pkt),
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2122 | PACKET_remaining(pkt),
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2123 | s->ctx->ext.npn_select_cb_arg) !=
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2124 | 0
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2125 | ossl_statem_fatal((s), (40), (582), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2126 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2127 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2128 | 1584 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2129 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2130 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2131 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2132 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2133 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2134 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2135 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2136 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2137 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2138 | CRYPTO_free(s->ext.npn, __FILE__, 1592); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2139 | s->ext.npn = CRYPTO_malloc(selected_len, __FILE__, 1593); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2140 | if (s->ext.npn ==
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2141 | ((void *)0)
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2142 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2143 | ossl_statem_fatal((s), (80), (582), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2144 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2145 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2146 | 1596 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2147 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2148 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2149 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2150 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2151 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2152 | memcpy(s->ext.npn, selected, selected_len); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2153 | s->ext.npn_len = selected_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2154 | s->s3->npn_seen = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2155 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2156 | return executed 21 times by 1 test: 1;return 1; Executed by:
executed 21 times by 1 test: return 1; Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||
2157 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2158 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2159 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2160 | int tls_parse_stoc_alpn(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2161 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2162 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2163 | size_t len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2164 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2165 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2166 | if (!s->s3->alpn_sent
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
2167 | ossl_statem_fatal((s), (110), (579), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2168 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2169 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2170 | 1616 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2171 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2172 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2173 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2174 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2176 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2178 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2179 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2180 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2181 | if (!PACKET_get_net_2_len(pkt, &len)
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
2182 | || PACKET_remaining(pkt) != len
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
2183 | || PACKET_remaining(pkt) != len
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
2184 | ossl_statem_fatal((s), (50), (579), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2185 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2186 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2187 | 1629 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2188 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2189 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2190 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2191 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2192 | CRYPTO_free(s->s3->alpn_selected, __FILE__, 1632); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2193 | s->s3->alpn_selected = CRYPTO_malloc(len, __FILE__, 1633); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2194 | if (s->s3->alpn_selected ==
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
2195 | ((void *)0)
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
2196 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2197 | ossl_statem_fatal((s), (80), (579), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2198 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2199 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2200 | 1636 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2201 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2202 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2203 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2204 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2205 | if (!PACKET_copy_bytes(pkt, s->s3->alpn_selected, len)
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
2206 | ossl_statem_fatal((s), (50), (579), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2207 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2208 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2209 | 1641 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2210 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2211 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2212 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2213 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2214 | s->s3->alpn_selected_len = len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2215 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2216 | if (s->session->ext.alpn_selected ==
| 5-17 | ||||||||||||||||||||||||||||||||||||||||||||||||
2217 | ((void *)0)
| 5-17 | ||||||||||||||||||||||||||||||||||||||||||||||||
2218 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2219 | || s->session->ext.alpn_selected_len != len
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||
2220 | || memcmp(s->session->ext.alpn_selected, s->s3->alpn_selected, len)
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2221 | != 0
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2222 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2223 | s->ext.early_data_ok = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2224 | } executed 20 times by 1 test: end of block Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||
2225 | if (!s->hit
| 6-16 | ||||||||||||||||||||||||||||||||||||||||||||||||
2226 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2227 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2228 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2229 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2230 | if (!((s->session->ext.alpn_selected ==
| 0-16 | ||||||||||||||||||||||||||||||||||||||||||||||||
2231 | ((void *)0)
| 0-16 | ||||||||||||||||||||||||||||||||||||||||||||||||
2232 | ) != 0)
| 0-16 | ||||||||||||||||||||||||||||||||||||||||||||||||
2233 | ossl_statem_fatal((s), (80), (579), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2234 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2235 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2236 | 1660 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2237 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2238 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2239 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2240 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2241 | s->session->ext.alpn_selected = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2242 | CRYPTO_memdup((s->s3->alpn_selected), s->s3->alpn_selected_len, __FILE__, 1664); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2243 | if (s->session->ext.alpn_selected ==
| 0-16 | ||||||||||||||||||||||||||||||||||||||||||||||||
2244 | ((void *)0)
| 0-16 | ||||||||||||||||||||||||||||||||||||||||||||||||
2245 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2246 | ossl_statem_fatal((s), (80), (579), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2247 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2248 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2249 | 1667 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2250 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2251 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2252 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2253 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2254 | s->session->ext.alpn_selected_len = s->s3->alpn_selected_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2255 | } executed 16 times by 1 test: end of block Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||||||||||||||
2256 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2257 | return executed 22 times by 1 test: 1;return 1; Executed by:
executed 22 times by 1 test: return 1; Executed by:
| 22 | ||||||||||||||||||||||||||||||||||||||||||||||||
2258 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2259 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2260 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2261 | int tls_parse_stoc_use_srtp(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2262 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2263 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2264 | unsigned int id, ct, mki; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2265 | int i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2266 | struct stack_st_SRTP_PROTECTION_PROFILE *clnt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2267 | SRTP_PROTECTION_PROFILE *prof; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2268 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2269 | if (!PACKET_get_net_2(pkt, &ct)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2270 | || !PACKET_get_net_2(pkt, &id)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2271 | || !PACKET_get_1(pkt, &mki)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2272 | || PACKET_remaining(pkt) != 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2273 | ossl_statem_fatal((s), (50), (446), (353), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2274 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2275 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2276 | 1690 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2277 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2278 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2279 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2280 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2281 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2282 | if (mki != 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2283 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2284 | ossl_statem_fatal((s), (47), (446), (352), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2285 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2286 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2287 | 1697 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2288 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2289 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2290 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2291 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2292 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2293 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2294 | clnt = SSL_get_srtp_profiles(s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2295 | if (clnt ==
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2296 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2297 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2298 | ossl_statem_fatal((s), (50), (446), (359), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2299 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2300 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2301 | 1705 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2302 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2303 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2304 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2305 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2306 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2307 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2308 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2309 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2310 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2311 | for (i = 0; i < sk_SRTP_PROTECTION_PROFILE_num(clnt)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2312 | prof = sk_SRTP_PROTECTION_PROFILE_value(clnt, i); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2313 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2314 | if (prof->id == id
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2315 | s->srtp_profile = prof; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2316 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2317 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2318 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2319 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2320 | ossl_statem_fatal((s), (50), (446), (353), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2321 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2322 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2323 | 1723 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2324 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2325 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2326 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2327 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2328 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2329 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2330 | int tls_parse_stoc_etm(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2331 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2332 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2333 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2334 | if (!(s->options & 0x00080000U)
| 0-673 | ||||||||||||||||||||||||||||||||||||||||||||||||
2335 | && s->s3->tmp.new_cipher->algorithm_mac != 0x00000040U
| 9-664 | ||||||||||||||||||||||||||||||||||||||||||||||||
2336 | && s->s3->tmp.new_cipher->algorithm_enc != 0x00000004U
| 0-664 | ||||||||||||||||||||||||||||||||||||||||||||||||
2337 | s->ext.use_etm = 1; executed 664 times by 1 test: s->ext.use_etm = 1; Executed by:
| 664 | ||||||||||||||||||||||||||||||||||||||||||||||||
2338 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2339 | return executed 673 times by 1 test: 1;return 1; Executed by:
executed 673 times by 1 test: return 1; Executed by:
| 673 | ||||||||||||||||||||||||||||||||||||||||||||||||
2340 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2341 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2342 | int tls_parse_stoc_ems(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2343 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2344 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2345 | s->s3->flags |= 0x0200; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2346 | if (!s->hit
| 63-1805 | ||||||||||||||||||||||||||||||||||||||||||||||||
2347 | s->session->flags |= 0x1; executed 1805 times by 1 test: s->session->flags |= 0x1; Executed by:
| 1805 | ||||||||||||||||||||||||||||||||||||||||||||||||
2348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2349 | return executed 1868 times by 1 test: 1;return 1; Executed by:
executed 1868 times by 1 test: return 1; Executed by:
| 1868 | ||||||||||||||||||||||||||||||||||||||||||||||||
2350 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2351 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2352 | int tls_parse_stoc_supported_versions(SSL *s, PACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2353 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2354 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2355 | unsigned int version; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2356 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2357 | if (!PACKET_get_net_2(pkt, &version)
| 1-672 | ||||||||||||||||||||||||||||||||||||||||||||||||
2358 | || PACKET_remaining(pkt) != 0
| 1-671 | ||||||||||||||||||||||||||||||||||||||||||||||||
2359 | ossl_statem_fatal((s), (50), (612), (159), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2360 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2361 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2362 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2363 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2364 | 1759 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2365 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2366 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2367 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2368 | return executed 2 times by 1 test: 0;return 0; Executed by:
executed 2 times by 1 test: return 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2369 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2370 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2371 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2372 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2373 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2374 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2375 | if (version != 0x0304
| 1-670 | ||||||||||||||||||||||||||||||||||||||||||||||||
2376 | ossl_statem_fatal((s), (47), (612), (116), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2377 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2378 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2379 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2380 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2381 | 1770 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2382 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2383 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2384 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2385 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
2386 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2387 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2388 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2389 | if (context == 0x0800
| 38-632 | ||||||||||||||||||||||||||||||||||||||||||||||||
2390 | return executed 38 times by 1 test: 1;return 1; Executed by:
executed 38 times by 1 test: return 1; Executed by:
| 38 | ||||||||||||||||||||||||||||||||||||||||||||||||
2391 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2392 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2393 | s->version = version; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2394 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2395 | return executed 632 times by 1 test: 1;return 1; Executed by:
executed 632 times by 1 test: return 1; Executed by:
| 632 | ||||||||||||||||||||||||||||||||||||||||||||||||
2396 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2397 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2398 | int tls_parse_stoc_key_share(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2399 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2400 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2401 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2402 | unsigned int group_id; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2403 | PACKET encoded_pt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2404 | EVP_PKEY *ckey = s->s3->tmp.pkey, *skey = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2405 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2406 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2407 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2408 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2409 | if (ckey ==
| 0-1170 | ||||||||||||||||||||||||||||||||||||||||||||||||
2410 | ((void *)0)
| 0-1170 | ||||||||||||||||||||||||||||||||||||||||||||||||
2411 | || s->s3->peer_tmp !=
| 0-1170 | ||||||||||||||||||||||||||||||||||||||||||||||||
2412 | ((void *)0)
| 0-1170 | ||||||||||||||||||||||||||||||||||||||||||||||||
2413 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2414 | ossl_statem_fatal((s), (80), (445), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2415 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2416 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2417 | 1795 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2418 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2419 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2420 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2421 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2422 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2423 | if (!PACKET_get_net_2(pkt, &group_id)
| 2-1168 | ||||||||||||||||||||||||||||||||||||||||||||||||
2424 | ossl_statem_fatal((s), (50), (445), (159), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2425 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2426 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2427 | 1801 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2428 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2429 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2430 | return executed 2 times by 1 test: 0;return 0; Executed by:
executed 2 times by 1 test: return 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2431 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2432 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2433 | if ((
| 544-624 | ||||||||||||||||||||||||||||||||||||||||||||||||
2434 | const uint16_t *pgroups = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2435 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2436 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2437 | size_t i, num_groups; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2438 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2439 | if (PACKET_remaining(pkt) != 0
| 1-543 | ||||||||||||||||||||||||||||||||||||||||||||||||
2440 | ossl_statem_fatal((s), (50), (445), (159), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2441 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2442 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2443 | 1811 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2444 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2445 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2446 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
2447 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2449 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2450 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2451 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2452 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2453 | if (group_id == s->s3->group_id
| 2-541 | ||||||||||||||||||||||||||||||||||||||||||||||||
2454 | ossl_statem_fatal((s), (47), (445), (108), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2455 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2456 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2457 | 1821 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2458 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2459 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2460 | return executed 2 times by 1 test: 0;return 0; Executed by:
executed 2 times by 1 test: return 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2461 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2462 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2463 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2464 | tls1_get_supported_groups(s, &pgroups, &num_groups); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2465 | for (i = 0; i < num_groups
| 2-1626 | ||||||||||||||||||||||||||||||||||||||||||||||||
2466 | if (group_id == pgroups[i]
| 539-1087 | ||||||||||||||||||||||||||||||||||||||||||||||||
2467 | break; executed 539 times by 1 test: break; Executed by:
| 539 | ||||||||||||||||||||||||||||||||||||||||||||||||
2468 | } executed 1087 times by 1 test: end of block Executed by:
| 1087 | ||||||||||||||||||||||||||||||||||||||||||||||||
2469 | if (i >= num_groups
| 2-539 | ||||||||||||||||||||||||||||||||||||||||||||||||
2470 | || !tls_curve_allowed(s, group_id, (4 | (2 << 16)))
| 0-539 | ||||||||||||||||||||||||||||||||||||||||||||||||
2471 | ossl_statem_fatal((s), (47), (445), (108), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2472 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2473 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2474 | 1834 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2475 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2476 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2477 | return executed 2 times by 1 test: 0;return 0; Executed by:
executed 2 times by 1 test: return 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2478 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2479 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2480 | s->s3->group_id = group_id; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2481 | EVP_PKEY_free(s->s3->tmp.pkey); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2482 | s->s3->tmp.pkey = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2483 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2484 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2485 | return executed 539 times by 1 test: 1;return 1; Executed by:
executed 539 times by 1 test: return 1; Executed by:
| 539 | ||||||||||||||||||||||||||||||||||||||||||||||||
2486 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2487 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2488 | if (group_id != s->s3->group_id
| 2-622 | ||||||||||||||||||||||||||||||||||||||||||||||||
2489 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2490 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2491 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2492 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2493 | ossl_statem_fatal((s), (47), (445), (108), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2494 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2495 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2496 | 1850 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2497 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2498 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2499 | return executed 2 times by 1 test: 0;return 0; Executed by:
executed 2 times by 1 test: return 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
2500 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2501 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2502 | if (!PACKET_as_length_prefixed_2(pkt, &encoded_pt)
| 4-618 | ||||||||||||||||||||||||||||||||||||||||||||||||
2503 | || PACKET_remaining(&encoded_pt) == 0
| 1-617 | ||||||||||||||||||||||||||||||||||||||||||||||||
2504 | ossl_statem_fatal((s), (50), (445), (159), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2505 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2506 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2507 | 1857 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2508 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2509 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2510 | return executed 5 times by 1 test: 0;return 0; Executed by:
executed 5 times by 1 test: return 0; Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||
2511 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2512 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2513 | skey = ssl_generate_pkey(ckey); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2514 | if (skey ==
| 0-617 | ||||||||||||||||||||||||||||||||||||||||||||||||
2515 | ((void *)0)
| 0-617 | ||||||||||||||||||||||||||||||||||||||||||||||||
2516 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2517 | ossl_statem_fatal((s), (80), (445), ((1|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2518 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2519 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2520 | 1864 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2521 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2522 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2523 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2524 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2525 | if (!EVP_PKEY_set1_tls_encodedpoint(skey, PACKET_data(&encoded_pt),
| 1-616 | ||||||||||||||||||||||||||||||||||||||||||||||||
2526 | PACKET_remaining(&encoded_pt))
| 1-616 | ||||||||||||||||||||||||||||||||||||||||||||||||
2527 | ossl_statem_fatal((s), (47), (445), (306), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2528 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2529 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2530 | 1870 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2531 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2532 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2533 | EVP_PKEY_free(skey); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2534 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
2535 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2536 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2537 | if (ssl_derive(s, ckey, skey, 1) == 0
| 1-615 | ||||||||||||||||||||||||||||||||||||||||||||||||
2538 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2539 | EVP_PKEY_free(skey); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2540 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
2541 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2542 | s->s3->peer_tmp = skey; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2543 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2544 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2545 | return executed 615 times by 1 test: 1;return 1; Executed by:
executed 615 times by 1 test: return 1; Executed by:
| 615 | ||||||||||||||||||||||||||||||||||||||||||||||||
2546 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2547 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2548 | int tls_parse_stoc_cookie(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2549 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2550 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2551 | PACKET cookie; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2553 | if (!PACKET_as_length_prefixed_2(pkt, &cookie)
| 3-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
2554 | || !PACKET_memdup(&cookie, &s->ext.tls13_cookie,
| 0-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
2555 | &s->ext.tls13_cookie_len)
| 0-141 | ||||||||||||||||||||||||||||||||||||||||||||||||
2556 | ossl_statem_fatal((s), (50), (534), (159), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2557 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2558 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2559 | 1895 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2560 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2561 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2562 | return executed 3 times by 1 test: 0;return 0; Executed by:
executed 3 times by 1 test: return 0; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||
2563 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2564 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2565 | return executed 141 times by 1 test: 1;return 1; Executed by:
executed 141 times by 1 test: return 1; Executed by:
| 141 | ||||||||||||||||||||||||||||||||||||||||||||||||
2566 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2567 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2568 | int tls_parse_stoc_early_data(SSL *s, PACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2569 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2570 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2571 | if (context == 0x2000
| 19-132 | ||||||||||||||||||||||||||||||||||||||||||||||||
2572 | unsigned long max_early_data; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2573 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2574 | if (!PACKET_get_net_4(pkt, &max_early_data)
| 0-132 | ||||||||||||||||||||||||||||||||||||||||||||||||
2575 | || PACKET_remaining(pkt) != 0
| 0-132 | ||||||||||||||||||||||||||||||||||||||||||||||||
2576 | ossl_statem_fatal((s), (50), (538), (174), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2577 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2578 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2579 | 1911 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2580 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2581 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2582 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2583 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2584 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2585 | s->session->ext.max_early_data = max_early_data; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2586 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2587 | return executed 132 times by 1 test: 1;return 1; Executed by:
executed 132 times by 1 test: return 1; Executed by:
| 132 | ||||||||||||||||||||||||||||||||||||||||||||||||
2588 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2589 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2590 | if (PACKET_remaining(pkt) != 0
| 0-19 | ||||||||||||||||||||||||||||||||||||||||||||||||
2591 | ossl_statem_fatal((s), (50), (538), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2592 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2593 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2594 | 1922 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2595 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2596 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2597 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2598 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2599 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2600 | if (!s->ext.early_data_ok
| 1-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
2601 | || !s->hit
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
2602 | || s->session->ext.tick_identity != 0
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
2603 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2604 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2605 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2606 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2607 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2608 | ossl_statem_fatal((s), (47), (538), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2609 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2610 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2611 | 1935 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2612 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2613 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2614 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
2615 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2616 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2617 | s->ext.early_data = 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2618 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2619 | return executed 18 times by 1 test: 1;return 1; Executed by:
executed 18 times by 1 test: return 1; Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||
2620 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2621 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2622 | int tls_parse_stoc_psk(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2623 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2624 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2625 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2626 | unsigned int identity; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2627 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2628 | if (!PACKET_get_net_2(pkt, &identity)
| 0-107 | ||||||||||||||||||||||||||||||||||||||||||||||||
2629 | ossl_statem_fatal((s), (50), (502), (159), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2630 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2631 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2632 | 1952 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2633 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2634 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2635 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2636 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2637 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2638 | if (s->session->ext.tick_identity == (int)identity
| 18-89 | ||||||||||||||||||||||||||||||||||||||||||||||||
2639 | s->hit = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2640 | SSL_SESSION_free(s->psksession); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2641 | s->psksession = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2642 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2643 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2644 | return executed 89 times by 1 test: 1;return 1; Executed by:
executed 89 times by 1 test: return 1; Executed by:
| 89 | ||||||||||||||||||||||||||||||||||||||||||||||||
2645 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2646 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2647 | if (s->psksession ==
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
2648 | ((void *)0)
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
2649 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2650 | || s->psksession->ext.tick_identity != (int)identity
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
2651 | ossl_statem_fatal((s), (47), (502), (114), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2652 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2653 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2654 | 1966 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2655 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2656 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2657 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
2658 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2659 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2660 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2661 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2662 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2664 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2665 | if ((s->early_data_state != SSL_EARLY_DATA_WRITE_RETRY
| 1-17 | ||||||||||||||||||||||||||||||||||||||||||||||||
2666 | && s->early_data_state != SSL_EARLY_DATA_FINISHED_WRITING
| 7-10 | ||||||||||||||||||||||||||||||||||||||||||||||||
2667 | || s->session->ext.max_early_data > 0
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||
2668 | || s->psksession->ext.max_early_data == 0
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||
2669 | memcpy(s->early_secret, s->psksession->early_secret, 64); executed 10 times by 1 test: memcpy(s->early_secret, s->psksession->early_secret, 64); Executed by:
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||
2670 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2671 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2672 | s->session = s->psksession; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2673 | s->psksession = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2674 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2675 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2676 | s->hit = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
2677 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2678 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
2679 | return executed 18 times by 1 test: 1;return 1; Executed by:
executed 18 times by 1 test: return 1; Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||
2680 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |