Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/ssl_lib.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||||||||||||||
5 | - | |||||||||||||||||||||||||||||||||||||
6 | const char SSL_version_str[] = "OpenSSL 1.1.2-dev xx XXX xxxx"; | - | ||||||||||||||||||||||||||||||||||||
7 | - | |||||||||||||||||||||||||||||||||||||
8 | static int ssl_undefined_function_1(SSL *ssl, SSL3_RECORD *r, size_t s, int t) | - | ||||||||||||||||||||||||||||||||||||
9 | { | - | ||||||||||||||||||||||||||||||||||||
10 | (void)r; | - | ||||||||||||||||||||||||||||||||||||
11 | (void)s; | - | ||||||||||||||||||||||||||||||||||||
12 | (void)t; | - | ||||||||||||||||||||||||||||||||||||
13 | return never executed: ssl_undefined_function(ssl);return ssl_undefined_function(ssl); never executed: return ssl_undefined_function(ssl); | 0 | ||||||||||||||||||||||||||||||||||||
14 | } | - | ||||||||||||||||||||||||||||||||||||
15 | - | |||||||||||||||||||||||||||||||||||||
16 | static int ssl_undefined_function_2(SSL *ssl, SSL3_RECORD *r, unsigned char *s, | - | ||||||||||||||||||||||||||||||||||||
17 | int t) | - | ||||||||||||||||||||||||||||||||||||
18 | { | - | ||||||||||||||||||||||||||||||||||||
19 | (void)r; | - | ||||||||||||||||||||||||||||||||||||
20 | (void)s; | - | ||||||||||||||||||||||||||||||||||||
21 | (void)t; | - | ||||||||||||||||||||||||||||||||||||
22 | return never executed: ssl_undefined_function(ssl);return ssl_undefined_function(ssl); never executed: return ssl_undefined_function(ssl); | 0 | ||||||||||||||||||||||||||||||||||||
23 | } | - | ||||||||||||||||||||||||||||||||||||
24 | - | |||||||||||||||||||||||||||||||||||||
25 | static int ssl_undefined_function_3(SSL *ssl, unsigned char *r, | - | ||||||||||||||||||||||||||||||||||||
26 | unsigned char *s, size_t t, size_t *u) | - | ||||||||||||||||||||||||||||||||||||
27 | { | - | ||||||||||||||||||||||||||||||||||||
28 | (void)r; | - | ||||||||||||||||||||||||||||||||||||
29 | (void)s; | - | ||||||||||||||||||||||||||||||||||||
30 | (void)t; | - | ||||||||||||||||||||||||||||||||||||
31 | (void)u; | - | ||||||||||||||||||||||||||||||||||||
32 | return never executed: ssl_undefined_function(ssl);return ssl_undefined_function(ssl); never executed: return ssl_undefined_function(ssl); | 0 | ||||||||||||||||||||||||||||||||||||
33 | } | - | ||||||||||||||||||||||||||||||||||||
34 | - | |||||||||||||||||||||||||||||||||||||
35 | static int ssl_undefined_function_4(SSL *ssl, int r) | - | ||||||||||||||||||||||||||||||||||||
36 | { | - | ||||||||||||||||||||||||||||||||||||
37 | (void)r; | - | ||||||||||||||||||||||||||||||||||||
38 | return never executed: ssl_undefined_function(ssl);return ssl_undefined_function(ssl); never executed: return ssl_undefined_function(ssl); | 0 | ||||||||||||||||||||||||||||||||||||
39 | } | - | ||||||||||||||||||||||||||||||||||||
40 | - | |||||||||||||||||||||||||||||||||||||
41 | static size_t ssl_undefined_function_5(SSL *ssl, const char *r, size_t s, | - | ||||||||||||||||||||||||||||||||||||
42 | unsigned char *t) | - | ||||||||||||||||||||||||||||||||||||
43 | { | - | ||||||||||||||||||||||||||||||||||||
44 | (void)r; | - | ||||||||||||||||||||||||||||||||||||
45 | (void)s; | - | ||||||||||||||||||||||||||||||||||||
46 | (void)t; | - | ||||||||||||||||||||||||||||||||||||
47 | return never executed: ssl_undefined_function(ssl);return ssl_undefined_function(ssl); never executed: return ssl_undefined_function(ssl); | 0 | ||||||||||||||||||||||||||||||||||||
48 | } | - | ||||||||||||||||||||||||||||||||||||
49 | - | |||||||||||||||||||||||||||||||||||||
50 | static int ssl_undefined_function_6(int r) | - | ||||||||||||||||||||||||||||||||||||
51 | { | - | ||||||||||||||||||||||||||||||||||||
52 | (void)r; | - | ||||||||||||||||||||||||||||||||||||
53 | return never executed: ssl_undefined_function(return ssl_undefined_function( ((void *)0) ); never executed: return ssl_undefined_function( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
54 | ((void *)0) never executed: return ssl_undefined_function( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
55 | ); never executed: return ssl_undefined_function( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
56 | } | - | ||||||||||||||||||||||||||||||||||||
57 | - | |||||||||||||||||||||||||||||||||||||
58 | static int ssl_undefined_function_7(SSL *ssl, unsigned char *r, size_t s, | - | ||||||||||||||||||||||||||||||||||||
59 | const char *t, size_t u, | - | ||||||||||||||||||||||||||||||||||||
60 | const unsigned char *v, size_t w, int x) | - | ||||||||||||||||||||||||||||||||||||
61 | { | - | ||||||||||||||||||||||||||||||||||||
62 | (void)r; | - | ||||||||||||||||||||||||||||||||||||
63 | (void)s; | - | ||||||||||||||||||||||||||||||||||||
64 | (void)t; | - | ||||||||||||||||||||||||||||||||||||
65 | (void)u; | - | ||||||||||||||||||||||||||||||||||||
66 | (void)v; | - | ||||||||||||||||||||||||||||||||||||
67 | (void)w; | - | ||||||||||||||||||||||||||||||||||||
68 | (void)x; | - | ||||||||||||||||||||||||||||||||||||
69 | return never executed: ssl_undefined_function(ssl);return ssl_undefined_function(ssl); never executed: return ssl_undefined_function(ssl); | 0 | ||||||||||||||||||||||||||||||||||||
70 | } | - | ||||||||||||||||||||||||||||||||||||
71 | - | |||||||||||||||||||||||||||||||||||||
72 | SSL3_ENC_METHOD ssl3_undef_enc_method = { | - | ||||||||||||||||||||||||||||||||||||
73 | ssl_undefined_function_1, | - | ||||||||||||||||||||||||||||||||||||
74 | ssl_undefined_function_2, | - | ||||||||||||||||||||||||||||||||||||
75 | ssl_undefined_function, | - | ||||||||||||||||||||||||||||||||||||
76 | ssl_undefined_function_3, | - | ||||||||||||||||||||||||||||||||||||
77 | ssl_undefined_function_4, | - | ||||||||||||||||||||||||||||||||||||
78 | ssl_undefined_function_5, | - | ||||||||||||||||||||||||||||||||||||
79 | - | |||||||||||||||||||||||||||||||||||||
80 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
81 | , | - | ||||||||||||||||||||||||||||||||||||
82 | 0, | - | ||||||||||||||||||||||||||||||||||||
83 | - | |||||||||||||||||||||||||||||||||||||
84 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
85 | , | - | ||||||||||||||||||||||||||||||||||||
86 | 0, | - | ||||||||||||||||||||||||||||||||||||
87 | ssl_undefined_function_6, | - | ||||||||||||||||||||||||||||||||||||
88 | ssl_undefined_function_7, | - | ||||||||||||||||||||||||||||||||||||
89 | }; | - | ||||||||||||||||||||||||||||||||||||
90 | - | |||||||||||||||||||||||||||||||||||||
91 | struct ssl_async_args { | - | ||||||||||||||||||||||||||||||||||||
92 | SSL *s; | - | ||||||||||||||||||||||||||||||||||||
93 | void *buf; | - | ||||||||||||||||||||||||||||||||||||
94 | size_t num; | - | ||||||||||||||||||||||||||||||||||||
95 | enum { READFUNC, WRITEFUNC, OTHERFUNC } type; | - | ||||||||||||||||||||||||||||||||||||
96 | union { | - | ||||||||||||||||||||||||||||||||||||
97 | int (*func_read) (SSL *, void *, size_t, size_t *); | - | ||||||||||||||||||||||||||||||||||||
98 | int (*func_write) (SSL *, const void *, size_t, size_t *); | - | ||||||||||||||||||||||||||||||||||||
99 | int (*func_other) (SSL *); | - | ||||||||||||||||||||||||||||||||||||
100 | } f; | - | ||||||||||||||||||||||||||||||||||||
101 | }; | - | ||||||||||||||||||||||||||||||||||||
102 | - | |||||||||||||||||||||||||||||||||||||
103 | static const struct { | - | ||||||||||||||||||||||||||||||||||||
104 | uint8_t mtype; | - | ||||||||||||||||||||||||||||||||||||
105 | uint8_t ord; | - | ||||||||||||||||||||||||||||||||||||
106 | int nid; | - | ||||||||||||||||||||||||||||||||||||
107 | } dane_mds[] = { | - | ||||||||||||||||||||||||||||||||||||
108 | { | - | ||||||||||||||||||||||||||||||||||||
109 | 0, 0, 0 | - | ||||||||||||||||||||||||||||||||||||
110 | }, | - | ||||||||||||||||||||||||||||||||||||
111 | { | - | ||||||||||||||||||||||||||||||||||||
112 | 1, 1, 672 | - | ||||||||||||||||||||||||||||||||||||
113 | }, | - | ||||||||||||||||||||||||||||||||||||
114 | { | - | ||||||||||||||||||||||||||||||||||||
115 | 2, 2, 674 | - | ||||||||||||||||||||||||||||||||||||
116 | }, | - | ||||||||||||||||||||||||||||||||||||
117 | }; | - | ||||||||||||||||||||||||||||||||||||
118 | - | |||||||||||||||||||||||||||||||||||||
119 | static int dane_ctx_enable(struct dane_ctx_st *dctx) | - | ||||||||||||||||||||||||||||||||||||
120 | { | - | ||||||||||||||||||||||||||||||||||||
121 | const EVP_MD **mdevp; | - | ||||||||||||||||||||||||||||||||||||
122 | uint8_t *mdord; | - | ||||||||||||||||||||||||||||||||||||
123 | uint8_t mdmax = 2; | - | ||||||||||||||||||||||||||||||||||||
124 | int n = ((int)mdmax) + 1; | - | ||||||||||||||||||||||||||||||||||||
125 | size_t i; | - | ||||||||||||||||||||||||||||||||||||
126 | - | |||||||||||||||||||||||||||||||||||||
127 | if (dctx->mdevp !=
| 0-1 | ||||||||||||||||||||||||||||||||||||
128 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
129 | ) | - | ||||||||||||||||||||||||||||||||||||
130 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
131 | - | |||||||||||||||||||||||||||||||||||||
132 | mdevp = CRYPTO_zalloc(n * sizeof(*mdevp), __FILE__, 144); | - | ||||||||||||||||||||||||||||||||||||
133 | mdord = CRYPTO_zalloc(n * sizeof(*mdord), __FILE__, 145); | - | ||||||||||||||||||||||||||||||||||||
134 | - | |||||||||||||||||||||||||||||||||||||
135 | if (mdord ==
| 0-1 | ||||||||||||||||||||||||||||||||||||
136 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
137 | || mdevp ==
| 0-1 | ||||||||||||||||||||||||||||||||||||
138 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
139 | ) { | - | ||||||||||||||||||||||||||||||||||||
140 | CRYPTO_free(mdord, __FILE__, 148); | - | ||||||||||||||||||||||||||||||||||||
141 | CRYPTO_free(mdevp, __FILE__, 149); | - | ||||||||||||||||||||||||||||||||||||
142 | ERR_put_error(20,(347),((1|64)),__FILE__,150); | - | ||||||||||||||||||||||||||||||||||||
143 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
144 | } | - | ||||||||||||||||||||||||||||||||||||
145 | - | |||||||||||||||||||||||||||||||||||||
146 | - | |||||||||||||||||||||||||||||||||||||
147 | for (i = 0; i < (sizeof(dane_mds)/sizeof((dane_mds)[0]))
| 1-3 | ||||||||||||||||||||||||||||||||||||
148 | const EVP_MD *md; | - | ||||||||||||||||||||||||||||||||||||
149 | - | |||||||||||||||||||||||||||||||||||||
150 | if (dane_mds[i].nid == 0
| 1-2 | ||||||||||||||||||||||||||||||||||||
151 | (
| 0-2 | ||||||||||||||||||||||||||||||||||||
152 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
153 | ) | - | ||||||||||||||||||||||||||||||||||||
154 | continue; executed 1 time by 1 test: continue; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
155 | mdevp[dane_mds[i].mtype] = md; | - | ||||||||||||||||||||||||||||||||||||
156 | mdord[dane_mds[i].mtype] = dane_mds[i].ord; | - | ||||||||||||||||||||||||||||||||||||
157 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
158 | - | |||||||||||||||||||||||||||||||||||||
159 | dctx->mdevp = mdevp; | - | ||||||||||||||||||||||||||||||||||||
160 | dctx->mdord = mdord; | - | ||||||||||||||||||||||||||||||||||||
161 | dctx->mdmax = mdmax; | - | ||||||||||||||||||||||||||||||||||||
162 | - | |||||||||||||||||||||||||||||||||||||
163 | return executed 1 time by 1 test: 1;return 1; Executed by:
executed 1 time by 1 test: return 1; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
164 | } | - | ||||||||||||||||||||||||||||||||||||
165 | - | |||||||||||||||||||||||||||||||||||||
166 | static void dane_ctx_final(struct dane_ctx_st *dctx) | - | ||||||||||||||||||||||||||||||||||||
167 | { | - | ||||||||||||||||||||||||||||||||||||
168 | CRYPTO_free(dctx->mdevp, __FILE__, 174); | - | ||||||||||||||||||||||||||||||||||||
169 | dctx->mdevp = | - | ||||||||||||||||||||||||||||||||||||
170 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
171 | ; | - | ||||||||||||||||||||||||||||||||||||
172 | - | |||||||||||||||||||||||||||||||||||||
173 | CRYPTO_free(dctx->mdord, __FILE__, 177); | - | ||||||||||||||||||||||||||||||||||||
174 | dctx->mdord = | - | ||||||||||||||||||||||||||||||||||||
175 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
176 | ; | - | ||||||||||||||||||||||||||||||||||||
177 | dctx->mdmax = 0; | - | ||||||||||||||||||||||||||||||||||||
178 | } executed 8017 times by 2 tests: end of block Executed by:
| 8017 | ||||||||||||||||||||||||||||||||||||
179 | - | |||||||||||||||||||||||||||||||||||||
180 | static void tlsa_free(danetls_record *t) | - | ||||||||||||||||||||||||||||||||||||
181 | { | - | ||||||||||||||||||||||||||||||||||||
182 | if (t ==
| 0-50 | ||||||||||||||||||||||||||||||||||||
183 | ((void *)0)
| 0-50 | ||||||||||||||||||||||||||||||||||||
184 | ) | - | ||||||||||||||||||||||||||||||||||||
185 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
186 | CRYPTO_free(t->data, __FILE__, 186); | - | ||||||||||||||||||||||||||||||||||||
187 | EVP_PKEY_free(t->spki); | - | ||||||||||||||||||||||||||||||||||||
188 | CRYPTO_free(t, __FILE__, 188); | - | ||||||||||||||||||||||||||||||||||||
189 | } executed 50 times by 1 test: end of block Executed by:
| 50 | ||||||||||||||||||||||||||||||||||||
190 | - | |||||||||||||||||||||||||||||||||||||
191 | static void dane_final(SSL_DANE *dane) | - | ||||||||||||||||||||||||||||||||||||
192 | { | - | ||||||||||||||||||||||||||||||||||||
193 | sk_danetls_record_pop_free(dane->trecs, tlsa_free); | - | ||||||||||||||||||||||||||||||||||||
194 | dane->trecs = | - | ||||||||||||||||||||||||||||||||||||
195 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
196 | ; | - | ||||||||||||||||||||||||||||||||||||
197 | - | |||||||||||||||||||||||||||||||||||||
198 | sk_X509_pop_free(dane->certs, X509_free); | - | ||||||||||||||||||||||||||||||||||||
199 | dane->certs = | - | ||||||||||||||||||||||||||||||||||||
200 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
201 | ; | - | ||||||||||||||||||||||||||||||||||||
202 | - | |||||||||||||||||||||||||||||||||||||
203 | X509_free(dane->mcert); | - | ||||||||||||||||||||||||||||||||||||
204 | dane->mcert = | - | ||||||||||||||||||||||||||||||||||||
205 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
206 | ; | - | ||||||||||||||||||||||||||||||||||||
207 | dane->mtlsa = | - | ||||||||||||||||||||||||||||||||||||
208 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
209 | ; | - | ||||||||||||||||||||||||||||||||||||
210 | dane->mdpth = -1; | - | ||||||||||||||||||||||||||||||||||||
211 | dane->pdpth = -1; | - | ||||||||||||||||||||||||||||||||||||
212 | } executed 8254 times by 2 tests: end of block Executed by:
| 8254 | ||||||||||||||||||||||||||||||||||||
213 | - | |||||||||||||||||||||||||||||||||||||
214 | - | |||||||||||||||||||||||||||||||||||||
215 | - | |||||||||||||||||||||||||||||||||||||
216 | - | |||||||||||||||||||||||||||||||||||||
217 | static int ssl_dane_dup(SSL *to, SSL *from) | - | ||||||||||||||||||||||||||||||||||||
218 | { | - | ||||||||||||||||||||||||||||||||||||
219 | int num; | - | ||||||||||||||||||||||||||||||||||||
220 | int i; | - | ||||||||||||||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||||||||||||||
222 | if (!((
| 0 | ||||||||||||||||||||||||||||||||||||
223 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
224 | && sk_danetls_record_num((&from->dane)->trecs) > 0
| 0 | ||||||||||||||||||||||||||||||||||||
225 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
226 | - | |||||||||||||||||||||||||||||||||||||
227 | num = sk_danetls_record_num(from->dane.trecs); | - | ||||||||||||||||||||||||||||||||||||
228 | dane_final(&to->dane); | - | ||||||||||||||||||||||||||||||||||||
229 | to->dane.flags = from->dane.flags; | - | ||||||||||||||||||||||||||||||||||||
230 | to->dane.dctx = &to->ctx->dane; | - | ||||||||||||||||||||||||||||||||||||
231 | to->dane.trecs = sk_danetls_record_new_reserve( | - | ||||||||||||||||||||||||||||||||||||
232 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
233 | , num); | - | ||||||||||||||||||||||||||||||||||||
234 | - | |||||||||||||||||||||||||||||||||||||
235 | if (to->dane.trecs ==
| 0 | ||||||||||||||||||||||||||||||||||||
236 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
237 | ) { | - | ||||||||||||||||||||||||||||||||||||
238 | ERR_put_error(20,(403),((1|64)),__FILE__,224); | - | ||||||||||||||||||||||||||||||||||||
239 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
240 | } | - | ||||||||||||||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||||||||||||||
242 | for (i = 0; i < num
| 0 | ||||||||||||||||||||||||||||||||||||
243 | danetls_record *t = sk_danetls_record_value(from->dane.trecs, i); | - | ||||||||||||||||||||||||||||||||||||
244 | - | |||||||||||||||||||||||||||||||||||||
245 | if (SSL_dane_tlsa_add(to, t->usage, t->selector, t->mtype,
| 0 | ||||||||||||||||||||||||||||||||||||
246 | t->data, t->dlen) <= 0
| 0 | ||||||||||||||||||||||||||||||||||||
247 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
248 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
249 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
250 | } | - | ||||||||||||||||||||||||||||||||||||
251 | - | |||||||||||||||||||||||||||||||||||||
252 | static int dane_mtype_set(struct dane_ctx_st *dctx, | - | ||||||||||||||||||||||||||||||||||||
253 | const EVP_MD *md, uint8_t mtype, uint8_t ord) | - | ||||||||||||||||||||||||||||||||||||
254 | { | - | ||||||||||||||||||||||||||||||||||||
255 | int i; | - | ||||||||||||||||||||||||||||||||||||
256 | - | |||||||||||||||||||||||||||||||||||||
257 | if (mtype == 0
| 0-2 | ||||||||||||||||||||||||||||||||||||
258 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
259 | ) { | - | ||||||||||||||||||||||||||||||||||||
260 | ERR_put_error(20,(393),(173),__FILE__,244); | - | ||||||||||||||||||||||||||||||||||||
261 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
262 | } | - | ||||||||||||||||||||||||||||||||||||
263 | - | |||||||||||||||||||||||||||||||||||||
264 | if (mtype > dctx->mdmax
| 0-2 | ||||||||||||||||||||||||||||||||||||
265 | const EVP_MD **mdevp; | - | ||||||||||||||||||||||||||||||||||||
266 | uint8_t *mdord; | - | ||||||||||||||||||||||||||||||||||||
267 | int n = ((int)mtype) + 1; | - | ||||||||||||||||||||||||||||||||||||
268 | - | |||||||||||||||||||||||||||||||||||||
269 | mdevp = CRYPTO_realloc(dctx->mdevp, n * sizeof(*mdevp), __FILE__, 253); | - | ||||||||||||||||||||||||||||||||||||
270 | if (mdevp ==
| 0 | ||||||||||||||||||||||||||||||||||||
271 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
272 | ) { | - | ||||||||||||||||||||||||||||||||||||
273 | ERR_put_error(20,(393),((1|64)),__FILE__,255); | - | ||||||||||||||||||||||||||||||||||||
274 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
275 | } | - | ||||||||||||||||||||||||||||||||||||
276 | dctx->mdevp = mdevp; | - | ||||||||||||||||||||||||||||||||||||
277 | - | |||||||||||||||||||||||||||||||||||||
278 | mdord = CRYPTO_realloc(dctx->mdord, n * sizeof(*mdord), __FILE__, 260); | - | ||||||||||||||||||||||||||||||||||||
279 | if (mdord ==
| 0 | ||||||||||||||||||||||||||||||||||||
280 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
281 | ) { | - | ||||||||||||||||||||||||||||||||||||
282 | ERR_put_error(20,(393),((1|64)),__FILE__,262); | - | ||||||||||||||||||||||||||||||||||||
283 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
284 | } | - | ||||||||||||||||||||||||||||||||||||
285 | dctx->mdord = mdord; | - | ||||||||||||||||||||||||||||||||||||
286 | - | |||||||||||||||||||||||||||||||||||||
287 | - | |||||||||||||||||||||||||||||||||||||
288 | for (i = dctx->mdmax + 1; i < mtype
| 0 | ||||||||||||||||||||||||||||||||||||
289 | mdevp[i] = | - | ||||||||||||||||||||||||||||||||||||
290 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
291 | ; | - | ||||||||||||||||||||||||||||||||||||
292 | mdord[i] = 0; | - | ||||||||||||||||||||||||||||||||||||
293 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
294 | - | |||||||||||||||||||||||||||||||||||||
295 | dctx->mdmax = mtype; | - | ||||||||||||||||||||||||||||||||||||
296 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
297 | - | |||||||||||||||||||||||||||||||||||||
298 | dctx->mdevp[mtype] = md; | - | ||||||||||||||||||||||||||||||||||||
299 | - | |||||||||||||||||||||||||||||||||||||
300 | dctx->mdord[mtype] = (
| 0-2 | ||||||||||||||||||||||||||||||||||||
301 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
302 | )
| 0-2 | ||||||||||||||||||||||||||||||||||||
303 | - | |||||||||||||||||||||||||||||||||||||
304 | return executed 2 times by 1 test: 1;return 1; Executed by:
executed 2 times by 1 test: return 1; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
305 | } | - | ||||||||||||||||||||||||||||||||||||
306 | - | |||||||||||||||||||||||||||||||||||||
307 | static const EVP_MD *tlsa_md_get(SSL_DANE *dane, uint8_t mtype) | - | ||||||||||||||||||||||||||||||||||||
308 | { | - | ||||||||||||||||||||||||||||||||||||
309 | if (mtype > dane->dctx->mdmax
| 0-45 | ||||||||||||||||||||||||||||||||||||
310 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
311 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
312 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
313 | return executed 45 times by 1 test: dane->dctx->mdevp[mtype];return dane->dctx->mdevp[mtype]; Executed by:
executed 45 times by 1 test: return dane->dctx->mdevp[mtype]; Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||
314 | } | - | ||||||||||||||||||||||||||||||||||||
315 | - | |||||||||||||||||||||||||||||||||||||
316 | static int dane_tlsa_add(SSL_DANE *dane, | - | ||||||||||||||||||||||||||||||||||||
317 | uint8_t usage, | - | ||||||||||||||||||||||||||||||||||||
318 | uint8_t selector, | - | ||||||||||||||||||||||||||||||||||||
319 | uint8_t mtype, unsigned const char *data, size_t dlen) | - | ||||||||||||||||||||||||||||||||||||
320 | { | - | ||||||||||||||||||||||||||||||||||||
321 | danetls_record *t; | - | ||||||||||||||||||||||||||||||||||||
322 | const EVP_MD *md = | - | ||||||||||||||||||||||||||||||||||||
323 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
324 | ; | - | ||||||||||||||||||||||||||||||||||||
325 | int ilen = (int)dlen; | - | ||||||||||||||||||||||||||||||||||||
326 | int i; | - | ||||||||||||||||||||||||||||||||||||
327 | int num; | - | ||||||||||||||||||||||||||||||||||||
328 | - | |||||||||||||||||||||||||||||||||||||
329 | if (dane->trecs ==
| 0-50 | ||||||||||||||||||||||||||||||||||||
330 | ((void *)0)
| 0-50 | ||||||||||||||||||||||||||||||||||||
331 | ) { | - | ||||||||||||||||||||||||||||||||||||
332 | ERR_put_error(20,(394),(175),__FILE__,302); | - | ||||||||||||||||||||||||||||||||||||
333 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
334 | } | - | ||||||||||||||||||||||||||||||||||||
335 | - | |||||||||||||||||||||||||||||||||||||
336 | if (ilen < 0
| 0-50 | ||||||||||||||||||||||||||||||||||||
337 | ERR_put_error(20,(394),(189),__FILE__,307); | - | ||||||||||||||||||||||||||||||||||||
338 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
339 | } | - | ||||||||||||||||||||||||||||||||||||
340 | - | |||||||||||||||||||||||||||||||||||||
341 | if (usage > 3
| 0-50 | ||||||||||||||||||||||||||||||||||||
342 | ERR_put_error(20,(394),(184),__FILE__,312); | - | ||||||||||||||||||||||||||||||||||||
343 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
344 | } | - | ||||||||||||||||||||||||||||||||||||
345 | - | |||||||||||||||||||||||||||||||||||||
346 | if (selector > 1
| 0-50 | ||||||||||||||||||||||||||||||||||||
347 | ERR_put_error(20,(394),(202),__FILE__,317); | - | ||||||||||||||||||||||||||||||||||||
348 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
349 | } | - | ||||||||||||||||||||||||||||||||||||
350 | - | |||||||||||||||||||||||||||||||||||||
351 | if (mtype != 0
| 5-45 | ||||||||||||||||||||||||||||||||||||
352 | md = tlsa_md_get(dane, mtype); | - | ||||||||||||||||||||||||||||||||||||
353 | if (md ==
| 0-45 | ||||||||||||||||||||||||||||||||||||
354 | ((void *)0)
| 0-45 | ||||||||||||||||||||||||||||||||||||
355 | ) { | - | ||||||||||||||||||||||||||||||||||||
356 | ERR_put_error(20,(394),(200),__FILE__,324); | - | ||||||||||||||||||||||||||||||||||||
357 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
358 | } | - | ||||||||||||||||||||||||||||||||||||
359 | } executed 45 times by 1 test: end of block Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||
360 | - | |||||||||||||||||||||||||||||||||||||
361 | if (md !=
| 5-45 | ||||||||||||||||||||||||||||||||||||
362 | ((void *)0)
| 5-45 | ||||||||||||||||||||||||||||||||||||
363 | && dlen != (size_t)EVP_MD_size(md)
| 0-45 | ||||||||||||||||||||||||||||||||||||
364 | ERR_put_error(20,(394),(192),__FILE__,330); | - | ||||||||||||||||||||||||||||||||||||
365 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
366 | } | - | ||||||||||||||||||||||||||||||||||||
367 | if (!data
| 0-50 | ||||||||||||||||||||||||||||||||||||
368 | ERR_put_error(20,(394),(203),__FILE__,334); | - | ||||||||||||||||||||||||||||||||||||
369 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
370 | } | - | ||||||||||||||||||||||||||||||||||||
371 | - | |||||||||||||||||||||||||||||||||||||
372 | if ((
| 0-50 | ||||||||||||||||||||||||||||||||||||
373 | ((void *)0)
| 0-50 | ||||||||||||||||||||||||||||||||||||
374 | ) { | - | ||||||||||||||||||||||||||||||||||||
375 | ERR_put_error(20,(394),((1|64)),__FILE__,339); | - | ||||||||||||||||||||||||||||||||||||
376 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
377 | } | - | ||||||||||||||||||||||||||||||||||||
378 | - | |||||||||||||||||||||||||||||||||||||
379 | t->usage = usage; | - | ||||||||||||||||||||||||||||||||||||
380 | t->selector = selector; | - | ||||||||||||||||||||||||||||||||||||
381 | t->mtype = mtype; | - | ||||||||||||||||||||||||||||||||||||
382 | t->data = CRYPTO_malloc(dlen, __FILE__, 346); | - | ||||||||||||||||||||||||||||||||||||
383 | if (t->data ==
| 0-50 | ||||||||||||||||||||||||||||||||||||
384 | ((void *)0)
| 0-50 | ||||||||||||||||||||||||||||||||||||
385 | ) { | - | ||||||||||||||||||||||||||||||||||||
386 | tlsa_free(t); | - | ||||||||||||||||||||||||||||||||||||
387 | ERR_put_error(20,(394),((1|64)),__FILE__,349); | - | ||||||||||||||||||||||||||||||||||||
388 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
389 | } | - | ||||||||||||||||||||||||||||||||||||
390 | memcpy(t->data, data, dlen); | - | ||||||||||||||||||||||||||||||||||||
391 | t->dlen = dlen; | - | ||||||||||||||||||||||||||||||||||||
392 | - | |||||||||||||||||||||||||||||||||||||
393 | - | |||||||||||||||||||||||||||||||||||||
394 | if (mtype == 0
| 5-45 | ||||||||||||||||||||||||||||||||||||
395 | const unsigned char *p = data; | - | ||||||||||||||||||||||||||||||||||||
396 | X509 *cert = | - | ||||||||||||||||||||||||||||||||||||
397 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
398 | ; | - | ||||||||||||||||||||||||||||||||||||
399 | EVP_PKEY *pkey = | - | ||||||||||||||||||||||||||||||||||||
400 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
401 | ; | - | ||||||||||||||||||||||||||||||||||||
402 | - | |||||||||||||||||||||||||||||||||||||
403 | switch (selector) { | - | ||||||||||||||||||||||||||||||||||||
404 | case executed 3 times by 1 test: 0:case 0: Executed by:
executed 3 times by 1 test: case 0: Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
405 | if (!d2i_X509(&cert, &p, ilen)
| 0-3 | ||||||||||||||||||||||||||||||||||||
406 | dlen != (size_t)(p - data)
| 0-3 | ||||||||||||||||||||||||||||||||||||
407 | tlsa_free(t); | - | ||||||||||||||||||||||||||||||||||||
408 | ERR_put_error(20,(394),(180),__FILE__,366); | - | ||||||||||||||||||||||||||||||||||||
409 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
410 | } | - | ||||||||||||||||||||||||||||||||||||
411 | if (X509_get0_pubkey(cert) ==
| 0-3 | ||||||||||||||||||||||||||||||||||||
412 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
413 | ) { | - | ||||||||||||||||||||||||||||||||||||
414 | tlsa_free(t); | - | ||||||||||||||||||||||||||||||||||||
415 | ERR_put_error(20,(394),(180),__FILE__,371); | - | ||||||||||||||||||||||||||||||||||||
416 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
417 | } | - | ||||||||||||||||||||||||||||||||||||
418 | - | |||||||||||||||||||||||||||||||||||||
419 | if (((((
| 0-3 | ||||||||||||||||||||||||||||||||||||
420 | X509_free(cert); | - | ||||||||||||||||||||||||||||||||||||
421 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
422 | } | - | ||||||||||||||||||||||||||||||||||||
423 | if ((dane->certs ==
| 0-3 | ||||||||||||||||||||||||||||||||||||
424 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
425 | && | - | ||||||||||||||||||||||||||||||||||||
426 | (
| 0-3 | ||||||||||||||||||||||||||||||||||||
427 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
428 | ) || | - | ||||||||||||||||||||||||||||||||||||
429 | !sk_X509_push(dane->certs, cert)
| 0-3 | ||||||||||||||||||||||||||||||||||||
430 | ERR_put_error(20,(394),((1|64)),__FILE__,390); | - | ||||||||||||||||||||||||||||||||||||
431 | X509_free(cert); | - | ||||||||||||||||||||||||||||||||||||
432 | tlsa_free(t); | - | ||||||||||||||||||||||||||||||||||||
433 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
434 | } | - | ||||||||||||||||||||||||||||||||||||
435 | break; executed 3 times by 1 test: break; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
436 | - | |||||||||||||||||||||||||||||||||||||
437 | case executed 2 times by 1 test: 1:case 1: Executed by:
executed 2 times by 1 test: case 1: Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
438 | if (!d2i_PUBKEY(&pkey, &p, ilen)
| 0-2 | ||||||||||||||||||||||||||||||||||||
439 | dlen != (size_t)(p - data)
| 0-2 | ||||||||||||||||||||||||||||||||||||
440 | tlsa_free(t); | - | ||||||||||||||||||||||||||||||||||||
441 | ERR_put_error(20,(394),(201),__FILE__,401); | - | ||||||||||||||||||||||||||||||||||||
442 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
443 | } | - | ||||||||||||||||||||||||||||||||||||
444 | - | |||||||||||||||||||||||||||||||||||||
445 | - | |||||||||||||||||||||||||||||||||||||
446 | - | |||||||||||||||||||||||||||||||||||||
447 | - | |||||||||||||||||||||||||||||||||||||
448 | - | |||||||||||||||||||||||||||||||||||||
449 | - | |||||||||||||||||||||||||||||||||||||
450 | if (usage == 2
| 0-2 | ||||||||||||||||||||||||||||||||||||
451 | t->spki = pkey; executed 2 times by 1 test: t->spki = pkey; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
452 | else | - | ||||||||||||||||||||||||||||||||||||
453 | EVP_PKEY_free(pkey); never executed: EVP_PKEY_free(pkey); | 0 | ||||||||||||||||||||||||||||||||||||
454 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
455 | } | - | ||||||||||||||||||||||||||||||||||||
456 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
457 | num = sk_danetls_record_num(dane->trecs); | - | ||||||||||||||||||||||||||||||||||||
458 | for (i = 0; i < num
| 1-50 | ||||||||||||||||||||||||||||||||||||
459 | danetls_record *rec = sk_danetls_record_value(dane->trecs, i); | - | ||||||||||||||||||||||||||||||||||||
460 | - | |||||||||||||||||||||||||||||||||||||
461 | if (rec->usage > usage
| 0-1 | ||||||||||||||||||||||||||||||||||||
462 | continue; executed 1 time by 1 test: continue; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
463 | if (rec->usage < usage
| 0 | ||||||||||||||||||||||||||||||||||||
464 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
465 | if (rec->selector > selector
| 0 | ||||||||||||||||||||||||||||||||||||
466 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
467 | if (rec->selector < selector
| 0 | ||||||||||||||||||||||||||||||||||||
468 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
469 | if (dane->dctx->mdord[rec->mtype] > dane->dctx->mdord[mtype]
| 0 | ||||||||||||||||||||||||||||||||||||
470 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
471 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
472 | } | - | ||||||||||||||||||||||||||||||||||||
473 | - | |||||||||||||||||||||||||||||||||||||
474 | if (!sk_danetls_record_insert(dane->trecs, t, i)
| 0-50 | ||||||||||||||||||||||||||||||||||||
475 | tlsa_free(t); | - | ||||||||||||||||||||||||||||||||||||
476 | ERR_put_error(20,(394),((1|64)),__FILE__,451); | - | ||||||||||||||||||||||||||||||||||||
477 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
478 | } | - | ||||||||||||||||||||||||||||||||||||
479 | dane->umask |= (((uint32_t)1) << usage); | - | ||||||||||||||||||||||||||||||||||||
480 | - | |||||||||||||||||||||||||||||||||||||
481 | return executed 50 times by 1 test: 1;return 1; Executed by:
executed 50 times by 1 test: return 1; Executed by:
| 50 | ||||||||||||||||||||||||||||||||||||
482 | } | - | ||||||||||||||||||||||||||||||||||||
483 | - | |||||||||||||||||||||||||||||||||||||
484 | - | |||||||||||||||||||||||||||||||||||||
485 | - | |||||||||||||||||||||||||||||||||||||
486 | - | |||||||||||||||||||||||||||||||||||||
487 | - | |||||||||||||||||||||||||||||||||||||
488 | static int ssl_check_allowed_versions(int min_version, int max_version) | - | ||||||||||||||||||||||||||||||||||||
489 | { | - | ||||||||||||||||||||||||||||||||||||
490 | int minisdtls = 0, maxisdtls = 0; | - | ||||||||||||||||||||||||||||||||||||
491 | - | |||||||||||||||||||||||||||||||||||||
492 | - | |||||||||||||||||||||||||||||||||||||
493 | if (min_version == 0x0100
| 2-8536 | ||||||||||||||||||||||||||||||||||||
494 | || min_version >> 8 == 0xFE
| 112-8424 | ||||||||||||||||||||||||||||||||||||
495 | minisdtls = 1; executed 114 times by 1 test: minisdtls = 1; Executed by:
| 114 | ||||||||||||||||||||||||||||||||||||
496 | if (max_version == 0x0100
| 1-8537 | ||||||||||||||||||||||||||||||||||||
497 | || max_version >> 8 == 0xFE
| 294-8243 | ||||||||||||||||||||||||||||||||||||
498 | maxisdtls = 1; executed 295 times by 1 test: maxisdtls = 1; Executed by:
| 295 | ||||||||||||||||||||||||||||||||||||
499 | - | |||||||||||||||||||||||||||||||||||||
500 | if ((minisdtls
| 0-8424 | ||||||||||||||||||||||||||||||||||||
501 | || (maxisdtls
| 0-8243 | ||||||||||||||||||||||||||||||||||||
502 | - | |||||||||||||||||||||||||||||||||||||
503 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
504 | } | - | ||||||||||||||||||||||||||||||||||||
505 | - | |||||||||||||||||||||||||||||||||||||
506 | if (minisdtls
| 114-8424 | ||||||||||||||||||||||||||||||||||||
507 | - | |||||||||||||||||||||||||||||||||||||
508 | if (min_version == 0
| 114-238 | ||||||||||||||||||||||||||||||||||||
509 | - | |||||||||||||||||||||||||||||||||||||
510 | min_version = 0xFEFF; executed 238 times by 1 test: min_version = 0xFEFF; Executed by:
| 238 | ||||||||||||||||||||||||||||||||||||
511 | if (max_version == 0
| 57-295 | ||||||||||||||||||||||||||||||||||||
512 | max_version = 0xFEFD; executed 57 times by 1 test: max_version = 0xFEFD; Executed by:
| 57 | ||||||||||||||||||||||||||||||||||||
513 | if (0 | - | ||||||||||||||||||||||||||||||||||||
514 | ) | - | ||||||||||||||||||||||||||||||||||||
515 | return 0; dead code: return 0; | - | ||||||||||||||||||||||||||||||||||||
516 | } executed 352 times by 1 test: else {end of block Executed by:
| 352 | ||||||||||||||||||||||||||||||||||||
517 | - | |||||||||||||||||||||||||||||||||||||
518 | if (min_version == 0
| 1850-6336 | ||||||||||||||||||||||||||||||||||||
519 | min_version = 0x0300; executed 6336 times by 1 test: min_version = 0x0300; Executed by:
| 6336 | ||||||||||||||||||||||||||||||||||||
520 | if (max_version == 0
| 3217-4969 | ||||||||||||||||||||||||||||||||||||
521 | max_version = 0x0304; executed 4969 times by 1 test: max_version = 0x0304; Executed by:
| 4969 | ||||||||||||||||||||||||||||||||||||
522 | if (min_version == 0x0300
| 1802-6384 | ||||||||||||||||||||||||||||||||||||
523 | min_version = 0x0301; executed 6384 times by 1 test: min_version = 0x0301; Executed by:
| 6384 | ||||||||||||||||||||||||||||||||||||
524 | if (0 | - | ||||||||||||||||||||||||||||||||||||
525 | - | |||||||||||||||||||||||||||||||||||||
526 | || (min_version <= 0x0300
| 0-8186 | ||||||||||||||||||||||||||||||||||||
527 | ) | - | ||||||||||||||||||||||||||||||||||||
528 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
529 | } executed 8186 times by 1 test: end of block Executed by:
| 8186 | ||||||||||||||||||||||||||||||||||||
530 | return executed 8538 times by 1 test: 1;return 1; Executed by:
executed 8538 times by 1 test: return 1; Executed by:
| 8538 | ||||||||||||||||||||||||||||||||||||
531 | } | - | ||||||||||||||||||||||||||||||||||||
532 | - | |||||||||||||||||||||||||||||||||||||
533 | static void clear_ciphers(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
534 | { | - | ||||||||||||||||||||||||||||||||||||
535 | - | |||||||||||||||||||||||||||||||||||||
536 | ssl_clear_cipher_ctx(s); | - | ||||||||||||||||||||||||||||||||||||
537 | ssl_clear_hash_ctx(&s->read_hash); | - | ||||||||||||||||||||||||||||||||||||
538 | ssl_clear_hash_ctx(&s->write_hash); | - | ||||||||||||||||||||||||||||||||||||
539 | } executed 32630 times by 2 tests: end of block Executed by:
| 32630 | ||||||||||||||||||||||||||||||||||||
540 | - | |||||||||||||||||||||||||||||||||||||
541 | int SSL_clear(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
542 | { | - | ||||||||||||||||||||||||||||||||||||
543 | if (s->method ==
| 0-16269 | ||||||||||||||||||||||||||||||||||||
544 | ((void *)0)
| 0-16269 | ||||||||||||||||||||||||||||||||||||
545 | ) { | - | ||||||||||||||||||||||||||||||||||||
546 | ERR_put_error(20,(164),(188),__FILE__,580); | - | ||||||||||||||||||||||||||||||||||||
547 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
548 | } | - | ||||||||||||||||||||||||||||||||||||
549 | - | |||||||||||||||||||||||||||||||||||||
550 | if (ssl_clear_bad_session(s)
| 3-16266 | ||||||||||||||||||||||||||||||||||||
551 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||||||||||||||
552 | s->session = | - | ||||||||||||||||||||||||||||||||||||
553 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
554 | ; | - | ||||||||||||||||||||||||||||||||||||
555 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
556 | SSL_SESSION_free(s->psksession); | - | ||||||||||||||||||||||||||||||||||||
557 | s->psksession = | - | ||||||||||||||||||||||||||||||||||||
558 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
559 | ; | - | ||||||||||||||||||||||||||||||||||||
560 | CRYPTO_free(s->psksession_id, __FILE__, 590); | - | ||||||||||||||||||||||||||||||||||||
561 | s->psksession_id = | - | ||||||||||||||||||||||||||||||||||||
562 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
563 | ; | - | ||||||||||||||||||||||||||||||||||||
564 | s->psksession_id_len = 0; | - | ||||||||||||||||||||||||||||||||||||
565 | s->hello_retry_request = 0; | - | ||||||||||||||||||||||||||||||||||||
566 | s->sent_tickets = 0; | - | ||||||||||||||||||||||||||||||||||||
567 | - | |||||||||||||||||||||||||||||||||||||
568 | s->error = 0; | - | ||||||||||||||||||||||||||||||||||||
569 | s->hit = 0; | - | ||||||||||||||||||||||||||||||||||||
570 | s->shutdown = 0; | - | ||||||||||||||||||||||||||||||||||||
571 | - | |||||||||||||||||||||||||||||||||||||
572 | if (s->renegotiate
| 0-16269 | ||||||||||||||||||||||||||||||||||||
573 | ERR_put_error(20,(164),((4|64)),__FILE__,601); | - | ||||||||||||||||||||||||||||||||||||
574 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
575 | } | - | ||||||||||||||||||||||||||||||||||||
576 | - | |||||||||||||||||||||||||||||||||||||
577 | ossl_statem_clear(s); | - | ||||||||||||||||||||||||||||||||||||
578 | - | |||||||||||||||||||||||||||||||||||||
579 | s->version = s->method->version; | - | ||||||||||||||||||||||||||||||||||||
580 | s->client_version = s->version; | - | ||||||||||||||||||||||||||||||||||||
581 | s->rwstate = 1; | - | ||||||||||||||||||||||||||||||||||||
582 | - | |||||||||||||||||||||||||||||||||||||
583 | BUF_MEM_free(s->init_buf); | - | ||||||||||||||||||||||||||||||||||||
584 | s->init_buf = | - | ||||||||||||||||||||||||||||||||||||
585 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
586 | ; | - | ||||||||||||||||||||||||||||||||||||
587 | clear_ciphers(s); | - | ||||||||||||||||||||||||||||||||||||
588 | s->first_packet = 0; | - | ||||||||||||||||||||||||||||||||||||
589 | - | |||||||||||||||||||||||||||||||||||||
590 | s->key_update = -1; | - | ||||||||||||||||||||||||||||||||||||
591 | - | |||||||||||||||||||||||||||||||||||||
592 | EVP_MD_CTX_free(s->pha_dgst); | - | ||||||||||||||||||||||||||||||||||||
593 | s->pha_dgst = | - | ||||||||||||||||||||||||||||||||||||
594 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
595 | ; | - | ||||||||||||||||||||||||||||||||||||
596 | - | |||||||||||||||||||||||||||||||||||||
597 | - | |||||||||||||||||||||||||||||||||||||
598 | s->dane.mdpth = -1; | - | ||||||||||||||||||||||||||||||||||||
599 | s->dane.pdpth = -1; | - | ||||||||||||||||||||||||||||||||||||
600 | X509_free(s->dane.mcert); | - | ||||||||||||||||||||||||||||||||||||
601 | s->dane.mcert = | - | ||||||||||||||||||||||||||||||||||||
602 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
603 | ; | - | ||||||||||||||||||||||||||||||||||||
604 | s->dane.mtlsa = | - | ||||||||||||||||||||||||||||||||||||
605 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
606 | ; | - | ||||||||||||||||||||||||||||||||||||
607 | - | |||||||||||||||||||||||||||||||||||||
608 | - | |||||||||||||||||||||||||||||||||||||
609 | X509_VERIFY_PARAM_move_peername(s->param, | - | ||||||||||||||||||||||||||||||||||||
610 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
611 | ); | - | ||||||||||||||||||||||||||||||||||||
612 | - | |||||||||||||||||||||||||||||||||||||
613 | - | |||||||||||||||||||||||||||||||||||||
614 | - | |||||||||||||||||||||||||||||||||||||
615 | - | |||||||||||||||||||||||||||||||||||||
616 | - | |||||||||||||||||||||||||||||||||||||
617 | if (s->method != s->ctx->method
| 35-16234 | ||||||||||||||||||||||||||||||||||||
618 | s->method->ssl_free(s); | - | ||||||||||||||||||||||||||||||||||||
619 | s->method = s->ctx->method; | - | ||||||||||||||||||||||||||||||||||||
620 | if (!s->method->ssl_new(s)
| 0-35 | ||||||||||||||||||||||||||||||||||||
621 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
622 | } executed 35 times by 1 test: else {end of block Executed by:
| 35 | ||||||||||||||||||||||||||||||||||||
623 | if (!s->method->ssl_clear(s)
| 0-16234 | ||||||||||||||||||||||||||||||||||||
624 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
625 | } executed 16234 times by 2 tests: end of block Executed by:
| 16234 | ||||||||||||||||||||||||||||||||||||
626 | - | |||||||||||||||||||||||||||||||||||||
627 | RECORD_LAYER_clear(&s->rlayer); | - | ||||||||||||||||||||||||||||||||||||
628 | - | |||||||||||||||||||||||||||||||||||||
629 | return executed 16269 times by 2 tests: 1;return 1; Executed by:
executed 16269 times by 2 tests: return 1; Executed by:
| 16269 | ||||||||||||||||||||||||||||||||||||
630 | } | - | ||||||||||||||||||||||||||||||||||||
631 | - | |||||||||||||||||||||||||||||||||||||
632 | - | |||||||||||||||||||||||||||||||||||||
633 | int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth) | - | ||||||||||||||||||||||||||||||||||||
634 | { | - | ||||||||||||||||||||||||||||||||||||
635 | struct stack_st_SSL_CIPHER *sk; | - | ||||||||||||||||||||||||||||||||||||
636 | - | |||||||||||||||||||||||||||||||||||||
637 | ctx->method = meth; | - | ||||||||||||||||||||||||||||||||||||
638 | - | |||||||||||||||||||||||||||||||||||||
639 | if (!SSL_CTX_set_ciphersuites(ctx, "TLS_AES_256_GCM_SHA384:" "TLS_CHACHA20_POLY1305_SHA256:" "TLS_AES_128_GCM_SHA256")
| 0 | ||||||||||||||||||||||||||||||||||||
640 | ERR_put_error(20,(170),(230),__FILE__,658); | - | ||||||||||||||||||||||||||||||||||||
641 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
642 | } | - | ||||||||||||||||||||||||||||||||||||
643 | sk = ssl_create_cipher_list(ctx->method, | - | ||||||||||||||||||||||||||||||||||||
644 | ctx->tls13_ciphersuites, | - | ||||||||||||||||||||||||||||||||||||
645 | &(ctx->cipher_list), | - | ||||||||||||||||||||||||||||||||||||
646 | &(ctx->cipher_list_by_id), | - | ||||||||||||||||||||||||||||||||||||
647 | "ALL:!COMPLEMENTOFDEFAULT:!eNULL", ctx->cert); | - | ||||||||||||||||||||||||||||||||||||
648 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
649 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
650 | )
| 0 | ||||||||||||||||||||||||||||||||||||
651 | ERR_put_error(20,(170),(230),__FILE__,667); | - | ||||||||||||||||||||||||||||||||||||
652 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
653 | } | - | ||||||||||||||||||||||||||||||||||||
654 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
655 | } | - | ||||||||||||||||||||||||||||||||||||
656 | - | |||||||||||||||||||||||||||||||||||||
657 | SSL *SSL_new(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
658 | { | - | ||||||||||||||||||||||||||||||||||||
659 | SSL *s; | - | ||||||||||||||||||||||||||||||||||||
660 | - | |||||||||||||||||||||||||||||||||||||
661 | if (ctx ==
| 0-8254 | ||||||||||||||||||||||||||||||||||||
662 | ((void *)0)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
663 | ) { | - | ||||||||||||||||||||||||||||||||||||
664 | ERR_put_error(20,(186),(195),__FILE__,678); | - | ||||||||||||||||||||||||||||||||||||
665 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
666 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
667 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
668 | } | - | ||||||||||||||||||||||||||||||||||||
669 | if (ctx->method ==
| 0-8254 | ||||||||||||||||||||||||||||||||||||
670 | ((void *)0)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
671 | ) { | - | ||||||||||||||||||||||||||||||||||||
672 | ERR_put_error(20,(186),(228),__FILE__,682); | - | ||||||||||||||||||||||||||||||||||||
673 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
674 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
675 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
676 | } | - | ||||||||||||||||||||||||||||||||||||
677 | - | |||||||||||||||||||||||||||||||||||||
678 | s = CRYPTO_zalloc(sizeof(*s), __FILE__, 686); | - | ||||||||||||||||||||||||||||||||||||
679 | if (s ==
| 0-8254 | ||||||||||||||||||||||||||||||||||||
680 | ((void *)0)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
681 | ) | - | ||||||||||||||||||||||||||||||||||||
682 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
683 | - | |||||||||||||||||||||||||||||||||||||
684 | s->references = 1; | - | ||||||||||||||||||||||||||||||||||||
685 | s->lock = CRYPTO_THREAD_lock_new(); | - | ||||||||||||||||||||||||||||||||||||
686 | if (s->lock ==
| 0-8254 | ||||||||||||||||||||||||||||||||||||
687 | ((void *)0)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
688 | ) { | - | ||||||||||||||||||||||||||||||||||||
689 | CRYPTO_free(s, __FILE__, 693); | - | ||||||||||||||||||||||||||||||||||||
690 | s = | - | ||||||||||||||||||||||||||||||||||||
691 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
692 | ; | - | ||||||||||||||||||||||||||||||||||||
693 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
694 | } | - | ||||||||||||||||||||||||||||||||||||
695 | - | |||||||||||||||||||||||||||||||||||||
696 | RECORD_LAYER_init(&s->rlayer, s); | - | ||||||||||||||||||||||||||||||||||||
697 | - | |||||||||||||||||||||||||||||||||||||
698 | s->options = ctx->options; | - | ||||||||||||||||||||||||||||||||||||
699 | s->dane.flags = ctx->dane.flags; | - | ||||||||||||||||||||||||||||||||||||
700 | s->min_proto_version = ctx->min_proto_version; | - | ||||||||||||||||||||||||||||||||||||
701 | s->max_proto_version = ctx->max_proto_version; | - | ||||||||||||||||||||||||||||||||||||
702 | s->mode = ctx->mode; | - | ||||||||||||||||||||||||||||||||||||
703 | s->max_cert_list = ctx->max_cert_list; | - | ||||||||||||||||||||||||||||||||||||
704 | s->max_early_data = ctx->max_early_data; | - | ||||||||||||||||||||||||||||||||||||
705 | s->recv_max_early_data = ctx->recv_max_early_data; | - | ||||||||||||||||||||||||||||||||||||
706 | s->num_tickets = ctx->num_tickets; | - | ||||||||||||||||||||||||||||||||||||
707 | s->pha_enabled = ctx->pha_enabled; | - | ||||||||||||||||||||||||||||||||||||
708 | - | |||||||||||||||||||||||||||||||||||||
709 | - | |||||||||||||||||||||||||||||||||||||
710 | s->tls13_ciphersuites = sk_SSL_CIPHER_dup(ctx->tls13_ciphersuites); | - | ||||||||||||||||||||||||||||||||||||
711 | if (s->tls13_ciphersuites ==
| 0-8254 | ||||||||||||||||||||||||||||||||||||
712 | ((void *)0)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
713 | ) | - | ||||||||||||||||||||||||||||||||||||
714 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
715 | s->cert = ssl_cert_dup(ctx->cert); | - | ||||||||||||||||||||||||||||||||||||
716 | if (s->cert ==
| 0-8254 | ||||||||||||||||||||||||||||||||||||
717 | ((void *)0)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
718 | ) | - | ||||||||||||||||||||||||||||||||||||
719 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
720 | - | |||||||||||||||||||||||||||||||||||||
721 | ((&s->rlayer)->read_ahead = (ctx->read_ahead)); | - | ||||||||||||||||||||||||||||||||||||
722 | s->msg_callback = ctx->msg_callback; | - | ||||||||||||||||||||||||||||||||||||
723 | s->msg_callback_arg = ctx->msg_callback_arg; | - | ||||||||||||||||||||||||||||||||||||
724 | s->verify_mode = ctx->verify_mode; | - | ||||||||||||||||||||||||||||||||||||
725 | s->not_resumable_session_cb = ctx->not_resumable_session_cb; | - | ||||||||||||||||||||||||||||||||||||
726 | s->record_padding_cb = ctx->record_padding_cb; | - | ||||||||||||||||||||||||||||||||||||
727 | s->record_padding_arg = ctx->record_padding_arg; | - | ||||||||||||||||||||||||||||||||||||
728 | s->block_padding = ctx->block_padding; | - | ||||||||||||||||||||||||||||||||||||
729 | s->sid_ctx_length = ctx->sid_ctx_length; | - | ||||||||||||||||||||||||||||||||||||
730 | if (!((s->sid_ctx_length <= sizeof(s->sid_ctx)) != 0)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
731 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
732 | memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx)); | - | ||||||||||||||||||||||||||||||||||||
733 | s->verify_callback = ctx->default_verify_callback; | - | ||||||||||||||||||||||||||||||||||||
734 | s->generate_session_id = ctx->generate_session_id; | - | ||||||||||||||||||||||||||||||||||||
735 | - | |||||||||||||||||||||||||||||||||||||
736 | s->param = X509_VERIFY_PARAM_new(); | - | ||||||||||||||||||||||||||||||||||||
737 | if (s->param ==
| 0-8254 | ||||||||||||||||||||||||||||||||||||
738 | ((void *)0)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
739 | ) | - | ||||||||||||||||||||||||||||||||||||
740 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
741 | X509_VERIFY_PARAM_inherit(s->param, ctx->param); | - | ||||||||||||||||||||||||||||||||||||
742 | s->quiet_shutdown = ctx->quiet_shutdown; | - | ||||||||||||||||||||||||||||||||||||
743 | - | |||||||||||||||||||||||||||||||||||||
744 | s->ext.max_fragment_len_mode = ctx->ext.max_fragment_len_mode; | - | ||||||||||||||||||||||||||||||||||||
745 | s->max_send_fragment = ctx->max_send_fragment; | - | ||||||||||||||||||||||||||||||||||||
746 | s->split_send_fragment = ctx->split_send_fragment; | - | ||||||||||||||||||||||||||||||||||||
747 | s->max_pipelines = ctx->max_pipelines; | - | ||||||||||||||||||||||||||||||||||||
748 | if (s->max_pipelines > 1
| 0-8254 | ||||||||||||||||||||||||||||||||||||
749 | (( never executed: &s->rlayer)->read_ahead = (1));((&s->rlayer)->read_ahead = (1)); never executed: ((&s->rlayer)->read_ahead = (1)); | 0 | ||||||||||||||||||||||||||||||||||||
750 | if (ctx->default_read_buf_len > 0
| 0-8254 | ||||||||||||||||||||||||||||||||||||
751 | SSL_set_default_read_buffer_len(s, ctx->default_read_buf_len); never executed: SSL_set_default_read_buffer_len(s, ctx->default_read_buf_len); | 0 | ||||||||||||||||||||||||||||||||||||
752 | - | |||||||||||||||||||||||||||||||||||||
753 | SSL_CTX_up_ref(ctx); | - | ||||||||||||||||||||||||||||||||||||
754 | s->ctx = ctx; | - | ||||||||||||||||||||||||||||||||||||
755 | s->ext.debug_cb = 0; | - | ||||||||||||||||||||||||||||||||||||
756 | s->ext.debug_arg = | - | ||||||||||||||||||||||||||||||||||||
757 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
758 | ; | - | ||||||||||||||||||||||||||||||||||||
759 | s->ext.ticket_expected = 0; | - | ||||||||||||||||||||||||||||||||||||
760 | s->ext.status_type = ctx->ext.status_type; | - | ||||||||||||||||||||||||||||||||||||
761 | s->ext.status_expected = 0; | - | ||||||||||||||||||||||||||||||||||||
762 | s->ext.ocsp.ids = | - | ||||||||||||||||||||||||||||||||||||
763 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
764 | ; | - | ||||||||||||||||||||||||||||||||||||
765 | s->ext.ocsp.exts = | - | ||||||||||||||||||||||||||||||||||||
766 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
767 | ; | - | ||||||||||||||||||||||||||||||||||||
768 | s->ext.ocsp.resp = | - | ||||||||||||||||||||||||||||||||||||
769 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
770 | ; | - | ||||||||||||||||||||||||||||||||||||
771 | s->ext.ocsp.resp_len = 0; | - | ||||||||||||||||||||||||||||||||||||
772 | SSL_CTX_up_ref(ctx); | - | ||||||||||||||||||||||||||||||||||||
773 | s->session_ctx = ctx; | - | ||||||||||||||||||||||||||||||||||||
774 | - | |||||||||||||||||||||||||||||||||||||
775 | if (ctx->ext.ecpointformats
| 0-8254 | ||||||||||||||||||||||||||||||||||||
776 | s->ext.ecpointformats = | - | ||||||||||||||||||||||||||||||||||||
777 | CRYPTO_memdup((ctx->ext.ecpointformats), ctx->ext.ecpointformats_len, | - | ||||||||||||||||||||||||||||||||||||
778 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
779 | , | - | ||||||||||||||||||||||||||||||||||||
780 | 776 | - | ||||||||||||||||||||||||||||||||||||
781 | ) | - | ||||||||||||||||||||||||||||||||||||
782 | ; | - | ||||||||||||||||||||||||||||||||||||
783 | if (!s->ext.ecpointformats
| 0 | ||||||||||||||||||||||||||||||||||||
784 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
785 | s->ext.ecpointformats_len = | - | ||||||||||||||||||||||||||||||||||||
786 | ctx->ext.ecpointformats_len; | - | ||||||||||||||||||||||||||||||||||||
787 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
788 | if (ctx->ext.supportedgroups
| 101-8153 | ||||||||||||||||||||||||||||||||||||
789 | s->ext.supportedgroups = | - | ||||||||||||||||||||||||||||||||||||
790 | CRYPTO_memdup((ctx->ext.supportedgroups), ctx->ext.supportedgroups_len * sizeof(*ctx->ext.supportedgroups), | - | ||||||||||||||||||||||||||||||||||||
791 | - | |||||||||||||||||||||||||||||||||||||
792 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
793 | , | - | ||||||||||||||||||||||||||||||||||||
794 | - | |||||||||||||||||||||||||||||||||||||
795 | 786 | - | ||||||||||||||||||||||||||||||||||||
796 | ) | - | ||||||||||||||||||||||||||||||||||||
797 | - | |||||||||||||||||||||||||||||||||||||
798 | ; | - | ||||||||||||||||||||||||||||||||||||
799 | if (!s->ext.supportedgroups
| 0-101 | ||||||||||||||||||||||||||||||||||||
800 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
801 | s->ext.supportedgroups_len = ctx->ext.supportedgroups_len; | - | ||||||||||||||||||||||||||||||||||||
802 | } executed 101 times by 1 test: end of block Executed by:
| 101 | ||||||||||||||||||||||||||||||||||||
803 | - | |||||||||||||||||||||||||||||||||||||
804 | - | |||||||||||||||||||||||||||||||||||||
805 | s->ext.npn = | - | ||||||||||||||||||||||||||||||||||||
806 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
807 | ; | - | ||||||||||||||||||||||||||||||||||||
808 | - | |||||||||||||||||||||||||||||||||||||
809 | - | |||||||||||||||||||||||||||||||||||||
810 | if (s->ctx->ext.alpn
| 31-8223 | ||||||||||||||||||||||||||||||||||||
811 | s->ext.alpn = CRYPTO_malloc(s->ctx->ext.alpn_len, __FILE__, 797); | - | ||||||||||||||||||||||||||||||||||||
812 | if (s->ext.alpn ==
| 0-31 | ||||||||||||||||||||||||||||||||||||
813 | ((void *)0)
| 0-31 | ||||||||||||||||||||||||||||||||||||
814 | ) | - | ||||||||||||||||||||||||||||||||||||
815 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
816 | memcpy(s->ext.alpn, s->ctx->ext.alpn, s->ctx->ext.alpn_len); | - | ||||||||||||||||||||||||||||||||||||
817 | s->ext.alpn_len = s->ctx->ext.alpn_len; | - | ||||||||||||||||||||||||||||||||||||
818 | } executed 31 times by 1 test: end of block Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||
819 | - | |||||||||||||||||||||||||||||||||||||
820 | s->verified_chain = | - | ||||||||||||||||||||||||||||||||||||
821 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
822 | ; | - | ||||||||||||||||||||||||||||||||||||
823 | s->verify_result = 0; | - | ||||||||||||||||||||||||||||||||||||
824 | - | |||||||||||||||||||||||||||||||||||||
825 | s->default_passwd_callback = ctx->default_passwd_callback; | - | ||||||||||||||||||||||||||||||||||||
826 | s->default_passwd_callback_userdata = ctx->default_passwd_callback_userdata; | - | ||||||||||||||||||||||||||||||||||||
827 | - | |||||||||||||||||||||||||||||||||||||
828 | s->method = ctx->method; | - | ||||||||||||||||||||||||||||||||||||
829 | - | |||||||||||||||||||||||||||||||||||||
830 | s->key_update = -1; | - | ||||||||||||||||||||||||||||||||||||
831 | - | |||||||||||||||||||||||||||||||||||||
832 | s->allow_early_data_cb = ctx->allow_early_data_cb; | - | ||||||||||||||||||||||||||||||||||||
833 | s->allow_early_data_cb_data = ctx->allow_early_data_cb_data; | - | ||||||||||||||||||||||||||||||||||||
834 | - | |||||||||||||||||||||||||||||||||||||
835 | if (!s->method->ssl_new(s)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
836 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
837 | - | |||||||||||||||||||||||||||||||||||||
838 | s->server = (
| 1933-6321 | ||||||||||||||||||||||||||||||||||||
839 | - | |||||||||||||||||||||||||||||||||||||
840 | if (!SSL_clear(s)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
841 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
842 | - | |||||||||||||||||||||||||||||||||||||
843 | if (!CRYPTO_new_ex_data(0, s, &s->ex_data)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
844 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
845 | - | |||||||||||||||||||||||||||||||||||||
846 | - | |||||||||||||||||||||||||||||||||||||
847 | s->psk_client_callback = ctx->psk_client_callback; | - | ||||||||||||||||||||||||||||||||||||
848 | s->psk_server_callback = ctx->psk_server_callback; | - | ||||||||||||||||||||||||||||||||||||
849 | - | |||||||||||||||||||||||||||||||||||||
850 | s->psk_find_session_cb = ctx->psk_find_session_cb; | - | ||||||||||||||||||||||||||||||||||||
851 | s->psk_use_session_cb = ctx->psk_use_session_cb; | - | ||||||||||||||||||||||||||||||||||||
852 | - | |||||||||||||||||||||||||||||||||||||
853 | s->job = | - | ||||||||||||||||||||||||||||||||||||
854 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
855 | ; | - | ||||||||||||||||||||||||||||||||||||
856 | - | |||||||||||||||||||||||||||||||||||||
857 | - | |||||||||||||||||||||||||||||||||||||
858 | if (!SSL_set_ct_validation_callback(s, ctx->ct_validation_callback,
| 0-8254 | ||||||||||||||||||||||||||||||||||||
859 | ctx->ct_validation_callback_arg)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
860 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
861 | - | |||||||||||||||||||||||||||||||||||||
862 | - | |||||||||||||||||||||||||||||||||||||
863 | return executed 8254 times by 2 tests: s;return s; Executed by:
executed 8254 times by 2 tests: return s; Executed by:
| 8254 | ||||||||||||||||||||||||||||||||||||
864 | err: | - | ||||||||||||||||||||||||||||||||||||
865 | SSL_free(s); | - | ||||||||||||||||||||||||||||||||||||
866 | ERR_put_error(20,(186),((1|64)),__FILE__,846); | - | ||||||||||||||||||||||||||||||||||||
867 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
868 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
869 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
870 | } | - | ||||||||||||||||||||||||||||||||||||
871 | - | |||||||||||||||||||||||||||||||||||||
872 | int SSL_is_dtls(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
873 | { | - | ||||||||||||||||||||||||||||||||||||
874 | return executed 2042 times by 1 test: (return (s->method->ssl3_enc->enc_flags & 0x8) ? 1 : 0; Executed by:
executed 2042 times by 1 test: return (s->method->ssl3_enc->enc_flags & 0x8) ? 1 : 0; Executed by:
| 124-2042 | ||||||||||||||||||||||||||||||||||||
875 | } | - | ||||||||||||||||||||||||||||||||||||
876 | - | |||||||||||||||||||||||||||||||||||||
877 | int SSL_up_ref(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
878 | { | - | ||||||||||||||||||||||||||||||||||||
879 | int i; | - | ||||||||||||||||||||||||||||||||||||
880 | - | |||||||||||||||||||||||||||||||||||||
881 | if (CRYPTO_UP_REF(&s->references, &i, s->lock) <= 0
| 0 | ||||||||||||||||||||||||||||||||||||
882 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
883 | - | |||||||||||||||||||||||||||||||||||||
884 | ; | - | ||||||||||||||||||||||||||||||||||||
885 | ; | - | ||||||||||||||||||||||||||||||||||||
886 | return never executed: ((return ((i > 1) ? 1 : 0);
never executed: return ((i > 1) ? 1 : 0); | 0 | ||||||||||||||||||||||||||||||||||||
887 | } | - | ||||||||||||||||||||||||||||||||||||
888 | - | |||||||||||||||||||||||||||||||||||||
889 | int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, | - | ||||||||||||||||||||||||||||||||||||
890 | unsigned int sid_ctx_len) | - | ||||||||||||||||||||||||||||||||||||
891 | { | - | ||||||||||||||||||||||||||||||||||||
892 | if (sid_ctx_len > sizeof(ctx->sid_ctx)
| 0-439 | ||||||||||||||||||||||||||||||||||||
893 | ERR_put_error(20,(219),(273),__FILE__,872) | - | ||||||||||||||||||||||||||||||||||||
894 | ; | - | ||||||||||||||||||||||||||||||||||||
895 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
896 | } | - | ||||||||||||||||||||||||||||||||||||
897 | ctx->sid_ctx_length = sid_ctx_len; | - | ||||||||||||||||||||||||||||||||||||
898 | memcpy(ctx->sid_ctx, sid_ctx, sid_ctx_len); | - | ||||||||||||||||||||||||||||||||||||
899 | - | |||||||||||||||||||||||||||||||||||||
900 | return executed 439 times by 1 test: 1;return 1; Executed by:
executed 439 times by 1 test: return 1; Executed by:
| 439 | ||||||||||||||||||||||||||||||||||||
901 | } | - | ||||||||||||||||||||||||||||||||||||
902 | - | |||||||||||||||||||||||||||||||||||||
903 | int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, | - | ||||||||||||||||||||||||||||||||||||
904 | unsigned int sid_ctx_len) | - | ||||||||||||||||||||||||||||||||||||
905 | { | - | ||||||||||||||||||||||||||||||||||||
906 | if (sid_ctx_len > 32
| 0 | ||||||||||||||||||||||||||||||||||||
907 | ERR_put_error(20,(218),(273),__FILE__,886) | - | ||||||||||||||||||||||||||||||||||||
908 | ; | - | ||||||||||||||||||||||||||||||||||||
909 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
910 | } | - | ||||||||||||||||||||||||||||||||||||
911 | ssl->sid_ctx_length = sid_ctx_len; | - | ||||||||||||||||||||||||||||||||||||
912 | memcpy(ssl->sid_ctx, sid_ctx, sid_ctx_len); | - | ||||||||||||||||||||||||||||||||||||
913 | - | |||||||||||||||||||||||||||||||||||||
914 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
915 | } | - | ||||||||||||||||||||||||||||||||||||
916 | - | |||||||||||||||||||||||||||||||||||||
917 | int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb) | - | ||||||||||||||||||||||||||||||||||||
918 | { | - | ||||||||||||||||||||||||||||||||||||
919 | CRYPTO_THREAD_write_lock(ctx->lock); | - | ||||||||||||||||||||||||||||||||||||
920 | ctx->generate_session_id = cb; | - | ||||||||||||||||||||||||||||||||||||
921 | CRYPTO_THREAD_unlock(ctx->lock); | - | ||||||||||||||||||||||||||||||||||||
922 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
923 | } | - | ||||||||||||||||||||||||||||||||||||
924 | - | |||||||||||||||||||||||||||||||||||||
925 | int SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb) | - | ||||||||||||||||||||||||||||||||||||
926 | { | - | ||||||||||||||||||||||||||||||||||||
927 | CRYPTO_THREAD_write_lock(ssl->lock); | - | ||||||||||||||||||||||||||||||||||||
928 | ssl->generate_session_id = cb; | - | ||||||||||||||||||||||||||||||||||||
929 | CRYPTO_THREAD_unlock(ssl->lock); | - | ||||||||||||||||||||||||||||||||||||
930 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
931 | } | - | ||||||||||||||||||||||||||||||||||||
932 | - | |||||||||||||||||||||||||||||||||||||
933 | int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, | - | ||||||||||||||||||||||||||||||||||||
934 | unsigned int id_len) | - | ||||||||||||||||||||||||||||||||||||
935 | { | - | ||||||||||||||||||||||||||||||||||||
936 | - | |||||||||||||||||||||||||||||||||||||
937 | - | |||||||||||||||||||||||||||||||||||||
938 | - | |||||||||||||||||||||||||||||||||||||
939 | - | |||||||||||||||||||||||||||||||||||||
940 | - | |||||||||||||||||||||||||||||||||||||
941 | - | |||||||||||||||||||||||||||||||||||||
942 | - | |||||||||||||||||||||||||||||||||||||
943 | SSL_SESSION r, *p; | - | ||||||||||||||||||||||||||||||||||||
944 | - | |||||||||||||||||||||||||||||||||||||
945 | if (id_len > sizeof(r.session_id)
| 0-3372 | ||||||||||||||||||||||||||||||||||||
946 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
947 | - | |||||||||||||||||||||||||||||||||||||
948 | r.ssl_version = ssl->version; | - | ||||||||||||||||||||||||||||||||||||
949 | r.session_id_length = id_len; | - | ||||||||||||||||||||||||||||||||||||
950 | memcpy(r.session_id, id, id_len); | - | ||||||||||||||||||||||||||||||||||||
951 | - | |||||||||||||||||||||||||||||||||||||
952 | CRYPTO_THREAD_read_lock(ssl->session_ctx->lock); | - | ||||||||||||||||||||||||||||||||||||
953 | p = lh_SSL_SESSION_retrieve(ssl->session_ctx->sessions, &r); | - | ||||||||||||||||||||||||||||||||||||
954 | CRYPTO_THREAD_unlock(ssl->session_ctx->lock); | - | ||||||||||||||||||||||||||||||||||||
955 | return executed 3372 times by 1 test: (p != return (p != ((void *)0) ); Executed by:
executed 3372 times by 1 test: return (p != ((void *)0) ); Executed by:
| 3372 | ||||||||||||||||||||||||||||||||||||
956 | ((void *)0) executed 3372 times by 1 test: return (p != ((void *)0) ); Executed by:
| 3372 | ||||||||||||||||||||||||||||||||||||
957 | ); executed 3372 times by 1 test: return (p != ((void *)0) ); Executed by:
| 3372 | ||||||||||||||||||||||||||||||||||||
958 | } | - | ||||||||||||||||||||||||||||||||||||
959 | - | |||||||||||||||||||||||||||||||||||||
960 | int SSL_CTX_set_purpose(SSL_CTX *s, int purpose) | - | ||||||||||||||||||||||||||||||||||||
961 | { | - | ||||||||||||||||||||||||||||||||||||
962 | return never executed: X509_VERIFY_PARAM_set_purpose(s->param, purpose);return X509_VERIFY_PARAM_set_purpose(s->param, purpose); never executed: return X509_VERIFY_PARAM_set_purpose(s->param, purpose); | 0 | ||||||||||||||||||||||||||||||||||||
963 | } | - | ||||||||||||||||||||||||||||||||||||
964 | - | |||||||||||||||||||||||||||||||||||||
965 | int SSL_set_purpose(SSL *s, int purpose) | - | ||||||||||||||||||||||||||||||||||||
966 | { | - | ||||||||||||||||||||||||||||||||||||
967 | return never executed: X509_VERIFY_PARAM_set_purpose(s->param, purpose);return X509_VERIFY_PARAM_set_purpose(s->param, purpose); never executed: return X509_VERIFY_PARAM_set_purpose(s->param, purpose); | 0 | ||||||||||||||||||||||||||||||||||||
968 | } | - | ||||||||||||||||||||||||||||||||||||
969 | - | |||||||||||||||||||||||||||||||||||||
970 | int SSL_CTX_set_trust(SSL_CTX *s, int trust) | - | ||||||||||||||||||||||||||||||||||||
971 | { | - | ||||||||||||||||||||||||||||||||||||
972 | return never executed: X509_VERIFY_PARAM_set_trust(s->param, trust);return X509_VERIFY_PARAM_set_trust(s->param, trust); never executed: return X509_VERIFY_PARAM_set_trust(s->param, trust); | 0 | ||||||||||||||||||||||||||||||||||||
973 | } | - | ||||||||||||||||||||||||||||||||||||
974 | - | |||||||||||||||||||||||||||||||||||||
975 | int SSL_set_trust(SSL *s, int trust) | - | ||||||||||||||||||||||||||||||||||||
976 | { | - | ||||||||||||||||||||||||||||||||||||
977 | return never executed: X509_VERIFY_PARAM_set_trust(s->param, trust);return X509_VERIFY_PARAM_set_trust(s->param, trust); never executed: return X509_VERIFY_PARAM_set_trust(s->param, trust); | 0 | ||||||||||||||||||||||||||||||||||||
978 | } | - | ||||||||||||||||||||||||||||||||||||
979 | - | |||||||||||||||||||||||||||||||||||||
980 | int SSL_set1_host(SSL *s, const char *hostname) | - | ||||||||||||||||||||||||||||||||||||
981 | { | - | ||||||||||||||||||||||||||||||||||||
982 | return never executed: X509_VERIFY_PARAM_set1_host(s->param, hostname, 0);return X509_VERIFY_PARAM_set1_host(s->param, hostname, 0); never executed: return X509_VERIFY_PARAM_set1_host(s->param, hostname, 0); | 0 | ||||||||||||||||||||||||||||||||||||
983 | } | - | ||||||||||||||||||||||||||||||||||||
984 | - | |||||||||||||||||||||||||||||||||||||
985 | int SSL_add1_host(SSL *s, const char *hostname) | - | ||||||||||||||||||||||||||||||||||||
986 | { | - | ||||||||||||||||||||||||||||||||||||
987 | return never executed: X509_VERIFY_PARAM_add1_host(s->param, hostname, 0);return X509_VERIFY_PARAM_add1_host(s->param, hostname, 0); never executed: return X509_VERIFY_PARAM_add1_host(s->param, hostname, 0); | 0 | ||||||||||||||||||||||||||||||||||||
988 | } | - | ||||||||||||||||||||||||||||||||||||
989 | - | |||||||||||||||||||||||||||||||||||||
990 | void SSL_set_hostflags(SSL *s, unsigned int flags) | - | ||||||||||||||||||||||||||||||||||||
991 | { | - | ||||||||||||||||||||||||||||||||||||
992 | X509_VERIFY_PARAM_set_hostflags(s->param, flags); | - | ||||||||||||||||||||||||||||||||||||
993 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
994 | - | |||||||||||||||||||||||||||||||||||||
995 | const char *SSL_get0_peername(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
996 | { | - | ||||||||||||||||||||||||||||||||||||
997 | return executed 53 times by 1 test: X509_VERIFY_PARAM_get0_peername(s->param);return X509_VERIFY_PARAM_get0_peername(s->param); Executed by:
executed 53 times by 1 test: return X509_VERIFY_PARAM_get0_peername(s->param); Executed by:
| 53 | ||||||||||||||||||||||||||||||||||||
998 | } | - | ||||||||||||||||||||||||||||||||||||
999 | - | |||||||||||||||||||||||||||||||||||||
1000 | int SSL_CTX_dane_enable(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
1001 | { | - | ||||||||||||||||||||||||||||||||||||
1002 | return executed 1 time by 1 test: dane_ctx_enable(&ctx->dane);return dane_ctx_enable(&ctx->dane); Executed by:
executed 1 time by 1 test: return dane_ctx_enable(&ctx->dane); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
1003 | } | - | ||||||||||||||||||||||||||||||||||||
1004 | - | |||||||||||||||||||||||||||||||||||||
1005 | unsigned long SSL_CTX_dane_set_flags(SSL_CTX *ctx, unsigned long flags) | - | ||||||||||||||||||||||||||||||||||||
1006 | { | - | ||||||||||||||||||||||||||||||||||||
1007 | unsigned long orig = ctx->dane.flags; | - | ||||||||||||||||||||||||||||||||||||
1008 | - | |||||||||||||||||||||||||||||||||||||
1009 | ctx->dane.flags |= flags; | - | ||||||||||||||||||||||||||||||||||||
1010 | return never executed: orig;return orig; never executed: return orig; | 0 | ||||||||||||||||||||||||||||||||||||
1011 | } | - | ||||||||||||||||||||||||||||||||||||
1012 | - | |||||||||||||||||||||||||||||||||||||
1013 | unsigned long SSL_CTX_dane_clear_flags(SSL_CTX *ctx, unsigned long flags) | - | ||||||||||||||||||||||||||||||||||||
1014 | { | - | ||||||||||||||||||||||||||||||||||||
1015 | unsigned long orig = ctx->dane.flags; | - | ||||||||||||||||||||||||||||||||||||
1016 | - | |||||||||||||||||||||||||||||||||||||
1017 | ctx->dane.flags &= ~flags; | - | ||||||||||||||||||||||||||||||||||||
1018 | return never executed: orig;return orig; never executed: return orig; | 0 | ||||||||||||||||||||||||||||||||||||
1019 | } | - | ||||||||||||||||||||||||||||||||||||
1020 | - | |||||||||||||||||||||||||||||||||||||
1021 | int SSL_dane_enable(SSL *s, const char *basedomain) | - | ||||||||||||||||||||||||||||||||||||
1022 | { | - | ||||||||||||||||||||||||||||||||||||
1023 | SSL_DANE *dane = &s->dane; | - | ||||||||||||||||||||||||||||||||||||
1024 | - | |||||||||||||||||||||||||||||||||||||
1025 | if (s->ctx->dane.mdmax == 0
| 0-49 | ||||||||||||||||||||||||||||||||||||
1026 | ERR_put_error(20,(395),(167),__FILE__,1002); | - | ||||||||||||||||||||||||||||||||||||
1027 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1028 | } | - | ||||||||||||||||||||||||||||||||||||
1029 | if (dane->trecs !=
| 0-49 | ||||||||||||||||||||||||||||||||||||
1030 | ((void *)0)
| 0-49 | ||||||||||||||||||||||||||||||||||||
1031 | ) { | - | ||||||||||||||||||||||||||||||||||||
1032 | ERR_put_error(20,(395),(172),__FILE__,1006); | - | ||||||||||||||||||||||||||||||||||||
1033 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1034 | } | - | ||||||||||||||||||||||||||||||||||||
1035 | - | |||||||||||||||||||||||||||||||||||||
1036 | - | |||||||||||||||||||||||||||||||||||||
1037 | - | |||||||||||||||||||||||||||||||||||||
1038 | - | |||||||||||||||||||||||||||||||||||||
1039 | - | |||||||||||||||||||||||||||||||||||||
1040 | - | |||||||||||||||||||||||||||||||||||||
1041 | if (s->ext.hostname ==
| 0-49 | ||||||||||||||||||||||||||||||||||||
1042 | ((void *)0)
| 0-49 | ||||||||||||||||||||||||||||||||||||
1043 | ) { | - | ||||||||||||||||||||||||||||||||||||
1044 | if (!SSL_ctrl(s,55,0, (void *)basedomain)
| 0-49 | ||||||||||||||||||||||||||||||||||||
1045 | ERR_put_error(20,(395),(204),__FILE__,1017); | - | ||||||||||||||||||||||||||||||||||||
1046 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1047 | } | - | ||||||||||||||||||||||||||||||||||||
1048 | } executed 49 times by 1 test: end of block Executed by:
| 49 | ||||||||||||||||||||||||||||||||||||
1049 | - | |||||||||||||||||||||||||||||||||||||
1050 | - | |||||||||||||||||||||||||||||||||||||
1051 | if (!X509_VERIFY_PARAM_set1_host(s->param, basedomain, 0)
| 0-49 | ||||||||||||||||||||||||||||||||||||
1052 | ERR_put_error(20,(395),(204),__FILE__,1024); | - | ||||||||||||||||||||||||||||||||||||
1053 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1054 | } | - | ||||||||||||||||||||||||||||||||||||
1055 | - | |||||||||||||||||||||||||||||||||||||
1056 | dane->mdpth = -1; | - | ||||||||||||||||||||||||||||||||||||
1057 | dane->pdpth = -1; | - | ||||||||||||||||||||||||||||||||||||
1058 | dane->dctx = &s->ctx->dane; | - | ||||||||||||||||||||||||||||||||||||
1059 | dane->trecs = sk_danetls_record_new_null(); | - | ||||||||||||||||||||||||||||||||||||
1060 | - | |||||||||||||||||||||||||||||||||||||
1061 | if (dane->trecs ==
| 0-49 | ||||||||||||||||||||||||||||||||||||
1062 | ((void *)0)
| 0-49 | ||||||||||||||||||||||||||||||||||||
1063 | ) { | - | ||||||||||||||||||||||||||||||||||||
1064 | ERR_put_error(20,(395),((1|64)),__FILE__,1034); | - | ||||||||||||||||||||||||||||||||||||
1065 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1066 | } | - | ||||||||||||||||||||||||||||||||||||
1067 | return executed 49 times by 1 test: 1;return 1; Executed by:
executed 49 times by 1 test: return 1; Executed by:
| 49 | ||||||||||||||||||||||||||||||||||||
1068 | } | - | ||||||||||||||||||||||||||||||||||||
1069 | - | |||||||||||||||||||||||||||||||||||||
1070 | unsigned long SSL_dane_set_flags(SSL *ssl, unsigned long flags) | - | ||||||||||||||||||||||||||||||||||||
1071 | { | - | ||||||||||||||||||||||||||||||||||||
1072 | unsigned long orig = ssl->dane.flags; | - | ||||||||||||||||||||||||||||||||||||
1073 | - | |||||||||||||||||||||||||||||||||||||
1074 | ssl->dane.flags |= flags; | - | ||||||||||||||||||||||||||||||||||||
1075 | return executed 9 times by 1 test: orig;return orig; Executed by:
executed 9 times by 1 test: return orig; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
1076 | } | - | ||||||||||||||||||||||||||||||||||||
1077 | - | |||||||||||||||||||||||||||||||||||||
1078 | unsigned long SSL_dane_clear_flags(SSL *ssl, unsigned long flags) | - | ||||||||||||||||||||||||||||||||||||
1079 | { | - | ||||||||||||||||||||||||||||||||||||
1080 | unsigned long orig = ssl->dane.flags; | - | ||||||||||||||||||||||||||||||||||||
1081 | - | |||||||||||||||||||||||||||||||||||||
1082 | ssl->dane.flags &= ~flags; | - | ||||||||||||||||||||||||||||||||||||
1083 | return never executed: orig;return orig; never executed: return orig; | 0 | ||||||||||||||||||||||||||||||||||||
1084 | } | - | ||||||||||||||||||||||||||||||||||||
1085 | - | |||||||||||||||||||||||||||||||||||||
1086 | int SSL_get0_dane_authority(SSL *s, X509 **mcert, EVP_PKEY **mspki) | - | ||||||||||||||||||||||||||||||||||||
1087 | { | - | ||||||||||||||||||||||||||||||||||||
1088 | SSL_DANE *dane = &s->dane; | - | ||||||||||||||||||||||||||||||||||||
1089 | - | |||||||||||||||||||||||||||||||||||||
1090 | if (!((
| 0-242 | ||||||||||||||||||||||||||||||||||||
1091 | ((void *)0)
| 0-242 | ||||||||||||||||||||||||||||||||||||
1092 | && sk_danetls_record_num((dane)->trecs) > 0
| 0-193 | ||||||||||||||||||||||||||||||||||||
1093 | return executed 193 times by 1 test: -1;return -1; Executed by:
executed 193 times by 1 test: return -1; Executed by:
| 193 | ||||||||||||||||||||||||||||||||||||
1094 | if (dane->mtlsa
| 7-42 | ||||||||||||||||||||||||||||||||||||
1095 | if (mcert
| 0-42 | ||||||||||||||||||||||||||||||||||||
1096 | * never executed: mcert = dane->mcert;*mcert = dane->mcert; never executed: *mcert = dane->mcert; | 0 | ||||||||||||||||||||||||||||||||||||
1097 | if (mspki
| 0-42 | ||||||||||||||||||||||||||||||||||||
1098 | * never executed: mspki = (*mspki = (dane->mcert == ((void *)0) ) ? dane->mtlsa->spki : ((void *)0) ;
never executed: *mspki = (dane->mcert == ((void *)0) ) ? dane->mtlsa->spki : ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
1099 | ((void *)0)
never executed: *mspki = (dane->mcert == ((void *)0) ) ? dane->mtlsa->spki : ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
1100 | )
never executed: *mspki = (dane->mcert == ((void *)0) ) ? dane->mtlsa->spki : ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
1101 | ((void *)0) never executed: *mspki = (dane->mcert == ((void *)0) ) ? dane->mtlsa->spki : ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
1102 | ; never executed: *mspki = (dane->mcert == ((void *)0) ) ? dane->mtlsa->spki : ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
1103 | } executed 42 times by 1 test: end of block Executed by:
| 42 | ||||||||||||||||||||||||||||||||||||
1104 | return executed 49 times by 1 test: dane->mdpth;return dane->mdpth; Executed by:
executed 49 times by 1 test: return dane->mdpth; Executed by:
| 49 | ||||||||||||||||||||||||||||||||||||
1105 | } | - | ||||||||||||||||||||||||||||||||||||
1106 | - | |||||||||||||||||||||||||||||||||||||
1107 | int SSL_get0_dane_tlsa(SSL *s, uint8_t *usage, uint8_t *selector, | - | ||||||||||||||||||||||||||||||||||||
1108 | uint8_t *mtype, unsigned const char **data, size_t *dlen) | - | ||||||||||||||||||||||||||||||||||||
1109 | { | - | ||||||||||||||||||||||||||||||||||||
1110 | SSL_DANE *dane = &s->dane; | - | ||||||||||||||||||||||||||||||||||||
1111 | - | |||||||||||||||||||||||||||||||||||||
1112 | if (!((
| 0 | ||||||||||||||||||||||||||||||||||||
1113 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1114 | && sk_danetls_record_num((dane)->trecs) > 0
| 0 | ||||||||||||||||||||||||||||||||||||
1115 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1116 | if (dane->mtlsa
| 0 | ||||||||||||||||||||||||||||||||||||
1117 | if (usage
| 0 | ||||||||||||||||||||||||||||||||||||
1118 | * never executed: usage = dane->mtlsa->usage;*usage = dane->mtlsa->usage; never executed: *usage = dane->mtlsa->usage; | 0 | ||||||||||||||||||||||||||||||||||||
1119 | if (selector
| 0 | ||||||||||||||||||||||||||||||||||||
1120 | * never executed: selector = dane->mtlsa->selector;*selector = dane->mtlsa->selector; never executed: *selector = dane->mtlsa->selector; | 0 | ||||||||||||||||||||||||||||||||||||
1121 | if (mtype
| 0 | ||||||||||||||||||||||||||||||||||||
1122 | * never executed: mtype = dane->mtlsa->mtype;*mtype = dane->mtlsa->mtype; never executed: *mtype = dane->mtlsa->mtype; | 0 | ||||||||||||||||||||||||||||||||||||
1123 | if (data
| 0 | ||||||||||||||||||||||||||||||||||||
1124 | * never executed: data = dane->mtlsa->data;*data = dane->mtlsa->data; never executed: *data = dane->mtlsa->data; | 0 | ||||||||||||||||||||||||||||||||||||
1125 | if (dlen
| 0 | ||||||||||||||||||||||||||||||||||||
1126 | * never executed: dlen = dane->mtlsa->dlen;*dlen = dane->mtlsa->dlen; never executed: *dlen = dane->mtlsa->dlen; | 0 | ||||||||||||||||||||||||||||||||||||
1127 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1128 | return never executed: dane->mdpth;return dane->mdpth; never executed: return dane->mdpth; | 0 | ||||||||||||||||||||||||||||||||||||
1129 | } | - | ||||||||||||||||||||||||||||||||||||
1130 | - | |||||||||||||||||||||||||||||||||||||
1131 | SSL_DANE *SSL_get0_dane(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1132 | { | - | ||||||||||||||||||||||||||||||||||||
1133 | return executed 49 times by 1 test: &s->dane;return &s->dane; Executed by:
executed 49 times by 1 test: return &s->dane; Executed by:
| 49 | ||||||||||||||||||||||||||||||||||||
1134 | } | - | ||||||||||||||||||||||||||||||||||||
1135 | - | |||||||||||||||||||||||||||||||||||||
1136 | int SSL_dane_tlsa_add(SSL *s, uint8_t usage, uint8_t selector, | - | ||||||||||||||||||||||||||||||||||||
1137 | uint8_t mtype, unsigned const char *data, size_t dlen) | - | ||||||||||||||||||||||||||||||||||||
1138 | { | - | ||||||||||||||||||||||||||||||||||||
1139 | return executed 50 times by 1 test: dane_tlsa_add(&s->dane, usage, selector, mtype, data, dlen);return dane_tlsa_add(&s->dane, usage, selector, mtype, data, dlen); Executed by:
executed 50 times by 1 test: return dane_tlsa_add(&s->dane, usage, selector, mtype, data, dlen); Executed by:
| 50 | ||||||||||||||||||||||||||||||||||||
1140 | } | - | ||||||||||||||||||||||||||||||||||||
1141 | - | |||||||||||||||||||||||||||||||||||||
1142 | int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md, uint8_t mtype, | - | ||||||||||||||||||||||||||||||||||||
1143 | uint8_t ord) | - | ||||||||||||||||||||||||||||||||||||
1144 | { | - | ||||||||||||||||||||||||||||||||||||
1145 | return executed 2 times by 1 test: dane_mtype_set(&ctx->dane, md, mtype, ord);return dane_mtype_set(&ctx->dane, md, mtype, ord); Executed by:
executed 2 times by 1 test: return dane_mtype_set(&ctx->dane, md, mtype, ord); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
1146 | } | - | ||||||||||||||||||||||||||||||||||||
1147 | - | |||||||||||||||||||||||||||||||||||||
1148 | int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm) | - | ||||||||||||||||||||||||||||||||||||
1149 | { | - | ||||||||||||||||||||||||||||||||||||
1150 | return never executed: X509_VERIFY_PARAM_set1(ctx->param, vpm);return X509_VERIFY_PARAM_set1(ctx->param, vpm); never executed: return X509_VERIFY_PARAM_set1(ctx->param, vpm); | 0 | ||||||||||||||||||||||||||||||||||||
1151 | } | - | ||||||||||||||||||||||||||||||||||||
1152 | - | |||||||||||||||||||||||||||||||||||||
1153 | int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm) | - | ||||||||||||||||||||||||||||||||||||
1154 | { | - | ||||||||||||||||||||||||||||||||||||
1155 | return never executed: X509_VERIFY_PARAM_set1(ssl->param, vpm);return X509_VERIFY_PARAM_set1(ssl->param, vpm); never executed: return X509_VERIFY_PARAM_set1(ssl->param, vpm); | 0 | ||||||||||||||||||||||||||||||||||||
1156 | } | - | ||||||||||||||||||||||||||||||||||||
1157 | - | |||||||||||||||||||||||||||||||||||||
1158 | X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
1159 | { | - | ||||||||||||||||||||||||||||||||||||
1160 | return never executed: ctx->param;return ctx->param; never executed: return ctx->param; | 0 | ||||||||||||||||||||||||||||||||||||
1161 | } | - | ||||||||||||||||||||||||||||||||||||
1162 | - | |||||||||||||||||||||||||||||||||||||
1163 | X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
1164 | { | - | ||||||||||||||||||||||||||||||||||||
1165 | return executed 49 times by 1 test: ssl->param;return ssl->param; Executed by:
executed 49 times by 1 test: return ssl->param; Executed by:
| 49 | ||||||||||||||||||||||||||||||||||||
1166 | } | - | ||||||||||||||||||||||||||||||||||||
1167 | - | |||||||||||||||||||||||||||||||||||||
1168 | void SSL_certs_clear(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1169 | { | - | ||||||||||||||||||||||||||||||||||||
1170 | ssl_cert_clear_certs(s->cert); | - | ||||||||||||||||||||||||||||||||||||
1171 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1172 | - | |||||||||||||||||||||||||||||||||||||
1173 | void SSL_free(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1174 | { | - | ||||||||||||||||||||||||||||||||||||
1175 | int i; | - | ||||||||||||||||||||||||||||||||||||
1176 | - | |||||||||||||||||||||||||||||||||||||
1177 | if (s ==
| 48-8254 | ||||||||||||||||||||||||||||||||||||
1178 | ((void *)0)
| 48-8254 | ||||||||||||||||||||||||||||||||||||
1179 | ) | - | ||||||||||||||||||||||||||||||||||||
1180 | return; executed 48 times by 1 test: return; Executed by:
| 48 | ||||||||||||||||||||||||||||||||||||
1181 | CRYPTO_DOWN_REF(&s->references, &i, s->lock); | - | ||||||||||||||||||||||||||||||||||||
1182 | ; | - | ||||||||||||||||||||||||||||||||||||
1183 | if (i > 0
| 0-8254 | ||||||||||||||||||||||||||||||||||||
1184 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
1185 | ; | - | ||||||||||||||||||||||||||||||||||||
1186 | - | |||||||||||||||||||||||||||||||||||||
1187 | X509_VERIFY_PARAM_free(s->param); | - | ||||||||||||||||||||||||||||||||||||
1188 | dane_final(&s->dane); | - | ||||||||||||||||||||||||||||||||||||
1189 | CRYPTO_free_ex_data(0, s, &s->ex_data); | - | ||||||||||||||||||||||||||||||||||||
1190 | - | |||||||||||||||||||||||||||||||||||||
1191 | - | |||||||||||||||||||||||||||||||||||||
1192 | ssl_free_wbio_buffer(s); | - | ||||||||||||||||||||||||||||||||||||
1193 | - | |||||||||||||||||||||||||||||||||||||
1194 | BIO_free_all(s->wbio); | - | ||||||||||||||||||||||||||||||||||||
1195 | BIO_free_all(s->rbio); | - | ||||||||||||||||||||||||||||||||||||
1196 | - | |||||||||||||||||||||||||||||||||||||
1197 | BUF_MEM_free(s->init_buf); | - | ||||||||||||||||||||||||||||||||||||
1198 | - | |||||||||||||||||||||||||||||||||||||
1199 | - | |||||||||||||||||||||||||||||||||||||
1200 | sk_SSL_CIPHER_free(s->cipher_list); | - | ||||||||||||||||||||||||||||||||||||
1201 | sk_SSL_CIPHER_free(s->cipher_list_by_id); | - | ||||||||||||||||||||||||||||||||||||
1202 | sk_SSL_CIPHER_free(s->tls13_ciphersuites); | - | ||||||||||||||||||||||||||||||||||||
1203 | - | |||||||||||||||||||||||||||||||||||||
1204 | - | |||||||||||||||||||||||||||||||||||||
1205 | if (s->session !=
| 1110-7144 | ||||||||||||||||||||||||||||||||||||
1206 | ((void *)0)
| 1110-7144 | ||||||||||||||||||||||||||||||||||||
1207 | ) { | - | ||||||||||||||||||||||||||||||||||||
1208 | ssl_clear_bad_session(s); | - | ||||||||||||||||||||||||||||||||||||
1209 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||||||||||||||
1210 | } executed 7144 times by 1 test: end of block Executed by:
| 7144 | ||||||||||||||||||||||||||||||||||||
1211 | SSL_SESSION_free(s->psksession); | - | ||||||||||||||||||||||||||||||||||||
1212 | CRYPTO_free(s->psksession_id, __FILE__, 1170); | - | ||||||||||||||||||||||||||||||||||||
1213 | - | |||||||||||||||||||||||||||||||||||||
1214 | clear_ciphers(s); | - | ||||||||||||||||||||||||||||||||||||
1215 | - | |||||||||||||||||||||||||||||||||||||
1216 | ssl_cert_free(s->cert); | - | ||||||||||||||||||||||||||||||||||||
1217 | - | |||||||||||||||||||||||||||||||||||||
1218 | - | |||||||||||||||||||||||||||||||||||||
1219 | CRYPTO_free(s->ext.hostname, __FILE__, 1177); | - | ||||||||||||||||||||||||||||||||||||
1220 | SSL_CTX_free(s->session_ctx); | - | ||||||||||||||||||||||||||||||||||||
1221 | - | |||||||||||||||||||||||||||||||||||||
1222 | CRYPTO_free(s->ext.ecpointformats, __FILE__, 1180); | - | ||||||||||||||||||||||||||||||||||||
1223 | CRYPTO_free(s->ext.supportedgroups, __FILE__, 1181); | - | ||||||||||||||||||||||||||||||||||||
1224 | - | |||||||||||||||||||||||||||||||||||||
1225 | sk_X509_EXTENSION_pop_free(s->ext.ocsp.exts, X509_EXTENSION_free); | - | ||||||||||||||||||||||||||||||||||||
1226 | - | |||||||||||||||||||||||||||||||||||||
1227 | sk_OCSP_RESPID_pop_free(s->ext.ocsp.ids, OCSP_RESPID_free); | - | ||||||||||||||||||||||||||||||||||||
1228 | - | |||||||||||||||||||||||||||||||||||||
1229 | - | |||||||||||||||||||||||||||||||||||||
1230 | SCT_LIST_free(s->scts); | - | ||||||||||||||||||||||||||||||||||||
1231 | CRYPTO_free(s->ext.scts, __FILE__, 1189); | - | ||||||||||||||||||||||||||||||||||||
1232 | - | |||||||||||||||||||||||||||||||||||||
1233 | CRYPTO_free(s->ext.ocsp.resp, __FILE__, 1191); | - | ||||||||||||||||||||||||||||||||||||
1234 | CRYPTO_free(s->ext.alpn, __FILE__, 1192); | - | ||||||||||||||||||||||||||||||||||||
1235 | CRYPTO_free(s->ext.tls13_cookie, __FILE__, 1193); | - | ||||||||||||||||||||||||||||||||||||
1236 | CRYPTO_free(s->clienthello, __FILE__, 1194); | - | ||||||||||||||||||||||||||||||||||||
1237 | CRYPTO_free(s->pha_context, __FILE__, 1195); | - | ||||||||||||||||||||||||||||||||||||
1238 | EVP_MD_CTX_free(s->pha_dgst); | - | ||||||||||||||||||||||||||||||||||||
1239 | - | |||||||||||||||||||||||||||||||||||||
1240 | sk_X509_NAME_pop_free(s->ca_names, X509_NAME_free); | - | ||||||||||||||||||||||||||||||||||||
1241 | - | |||||||||||||||||||||||||||||||||||||
1242 | sk_X509_pop_free(s->verified_chain, X509_free); | - | ||||||||||||||||||||||||||||||||||||
1243 | - | |||||||||||||||||||||||||||||||||||||
1244 | if (s->method !=
| 0-8254 | ||||||||||||||||||||||||||||||||||||
1245 | ((void *)0)
| 0-8254 | ||||||||||||||||||||||||||||||||||||
1246 | ) | - | ||||||||||||||||||||||||||||||||||||
1247 | s->method->ssl_free(s); executed 8254 times by 2 tests: s->method->ssl_free(s); Executed by:
| 8254 | ||||||||||||||||||||||||||||||||||||
1248 | - | |||||||||||||||||||||||||||||||||||||
1249 | RECORD_LAYER_release(&s->rlayer); | - | ||||||||||||||||||||||||||||||||||||
1250 | - | |||||||||||||||||||||||||||||||||||||
1251 | SSL_CTX_free(s->ctx); | - | ||||||||||||||||||||||||||||||||||||
1252 | - | |||||||||||||||||||||||||||||||||||||
1253 | ASYNC_WAIT_CTX_free(s->waitctx); | - | ||||||||||||||||||||||||||||||||||||
1254 | - | |||||||||||||||||||||||||||||||||||||
1255 | - | |||||||||||||||||||||||||||||||||||||
1256 | CRYPTO_free(s->ext.npn, __FILE__, 1212); | - | ||||||||||||||||||||||||||||||||||||
1257 | - | |||||||||||||||||||||||||||||||||||||
1258 | - | |||||||||||||||||||||||||||||||||||||
1259 | - | |||||||||||||||||||||||||||||||||||||
1260 | sk_SRTP_PROTECTION_PROFILE_free(s->srtp_profiles); | - | ||||||||||||||||||||||||||||||||||||
1261 | - | |||||||||||||||||||||||||||||||||||||
1262 | - | |||||||||||||||||||||||||||||||||||||
1263 | CRYPTO_THREAD_lock_free(s->lock); | - | ||||||||||||||||||||||||||||||||||||
1264 | - | |||||||||||||||||||||||||||||||||||||
1265 | CRYPTO_free(s, __FILE__, 1221); | - | ||||||||||||||||||||||||||||||||||||
1266 | } executed 8254 times by 2 tests: end of block Executed by:
| 8254 | ||||||||||||||||||||||||||||||||||||
1267 | - | |||||||||||||||||||||||||||||||||||||
1268 | void SSL_set0_rbio(SSL *s, BIO *rbio) | - | ||||||||||||||||||||||||||||||||||||
1269 | { | - | ||||||||||||||||||||||||||||||||||||
1270 | BIO_free_all(s->rbio); | - | ||||||||||||||||||||||||||||||||||||
1271 | s->rbio = rbio; | - | ||||||||||||||||||||||||||||||||||||
1272 | } executed 8403 times by 1 test: end of block Executed by:
| 8403 | ||||||||||||||||||||||||||||||||||||
1273 | - | |||||||||||||||||||||||||||||||||||||
1274 | void SSL_set0_wbio(SSL *s, BIO *wbio) | - | ||||||||||||||||||||||||||||||||||||
1275 | { | - | ||||||||||||||||||||||||||||||||||||
1276 | - | |||||||||||||||||||||||||||||||||||||
1277 | - | |||||||||||||||||||||||||||||||||||||
1278 | - | |||||||||||||||||||||||||||||||||||||
1279 | if (s->bbio !=
| 5-8395 | ||||||||||||||||||||||||||||||||||||
1280 | ((void *)0)
| 5-8395 | ||||||||||||||||||||||||||||||||||||
1281 | ) | - | ||||||||||||||||||||||||||||||||||||
1282 | s->wbio = BIO_pop(s->wbio); executed 5 times by 1 test: s->wbio = BIO_pop(s->wbio); Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
1283 | - | |||||||||||||||||||||||||||||||||||||
1284 | BIO_free_all(s->wbio); | - | ||||||||||||||||||||||||||||||||||||
1285 | s->wbio = wbio; | - | ||||||||||||||||||||||||||||||||||||
1286 | - | |||||||||||||||||||||||||||||||||||||
1287 | - | |||||||||||||||||||||||||||||||||||||
1288 | if (s->bbio !=
| 5-8395 | ||||||||||||||||||||||||||||||||||||
1289 | ((void *)0)
| 5-8395 | ||||||||||||||||||||||||||||||||||||
1290 | ) | - | ||||||||||||||||||||||||||||||||||||
1291 | s->wbio = BIO_push(s->bbio, s->wbio); executed 5 times by 1 test: s->wbio = BIO_push(s->bbio, s->wbio); Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
1292 | } executed 8400 times by 1 test: end of block Executed by:
| 8400 | ||||||||||||||||||||||||||||||||||||
1293 | - | |||||||||||||||||||||||||||||||||||||
1294 | void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) | - | ||||||||||||||||||||||||||||||||||||
1295 | { | - | ||||||||||||||||||||||||||||||||||||
1296 | - | |||||||||||||||||||||||||||||||||||||
1297 | - | |||||||||||||||||||||||||||||||||||||
1298 | - | |||||||||||||||||||||||||||||||||||||
1299 | - | |||||||||||||||||||||||||||||||||||||
1300 | - | |||||||||||||||||||||||||||||||||||||
1301 | - | |||||||||||||||||||||||||||||||||||||
1302 | if (rbio == SSL_get_rbio(s)
| 9-8384 | ||||||||||||||||||||||||||||||||||||
1303 | return; executed 9 times by 1 test: return; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
1304 | - | |||||||||||||||||||||||||||||||||||||
1305 | - | |||||||||||||||||||||||||||||||||||||
1306 | - | |||||||||||||||||||||||||||||||||||||
1307 | - | |||||||||||||||||||||||||||||||||||||
1308 | - | |||||||||||||||||||||||||||||||||||||
1309 | if (rbio !=
| 56-8346 | ||||||||||||||||||||||||||||||||||||
1310 | ((void *)0)
| 56-8346 | ||||||||||||||||||||||||||||||||||||
1311 | && rbio == wbio
| 514-7832 | ||||||||||||||||||||||||||||||||||||
1312 | BIO_up_ref(rbio); executed 514 times by 1 test: BIO_up_ref(rbio); Executed by:
| 514 | ||||||||||||||||||||||||||||||||||||
1313 | - | |||||||||||||||||||||||||||||||||||||
1314 | - | |||||||||||||||||||||||||||||||||||||
1315 | - | |||||||||||||||||||||||||||||||||||||
1316 | - | |||||||||||||||||||||||||||||||||||||
1317 | if (rbio == SSL_get_rbio(s)
| 18-8384 | ||||||||||||||||||||||||||||||||||||
1318 | SSL_set0_wbio(s, wbio); | - | ||||||||||||||||||||||||||||||||||||
1319 | return; executed 18 times by 1 test: return; Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
1320 | } | - | ||||||||||||||||||||||||||||||||||||
1321 | - | |||||||||||||||||||||||||||||||||||||
1322 | - | |||||||||||||||||||||||||||||||||||||
1323 | - | |||||||||||||||||||||||||||||||||||||
1324 | - | |||||||||||||||||||||||||||||||||||||
1325 | - | |||||||||||||||||||||||||||||||||||||
1326 | if (wbio == SSL_get_wbio(s)
| 6-8366 | ||||||||||||||||||||||||||||||||||||
1327 | SSL_set0_rbio(s, rbio); | - | ||||||||||||||||||||||||||||||||||||
1328 | return; executed 12 times by 1 test: return; Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
1329 | } | - | ||||||||||||||||||||||||||||||||||||
1330 | - | |||||||||||||||||||||||||||||||||||||
1331 | - | |||||||||||||||||||||||||||||||||||||
1332 | SSL_set0_rbio(s, rbio); | - | ||||||||||||||||||||||||||||||||||||
1333 | SSL_set0_wbio(s, wbio); | - | ||||||||||||||||||||||||||||||||||||
1334 | } executed 8372 times by 1 test: end of block Executed by:
| 8372 | ||||||||||||||||||||||||||||||||||||
1335 | - | |||||||||||||||||||||||||||||||||||||
1336 | BIO *SSL_get_rbio(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1337 | { | - | ||||||||||||||||||||||||||||||||||||
1338 | return executed 53084 times by 1 test: s->rbio;return s->rbio; Executed by:
executed 53084 times by 1 test: return s->rbio; Executed by:
| 53084 | ||||||||||||||||||||||||||||||||||||
1339 | } | - | ||||||||||||||||||||||||||||||||||||
1340 | - | |||||||||||||||||||||||||||||||||||||
1341 | BIO *SSL_get_wbio(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1342 | { | - | ||||||||||||||||||||||||||||||||||||
1343 | if (s->bbio !=
| 5500-8621 | ||||||||||||||||||||||||||||||||||||
1344 | ((void *)0)
| 5500-8621 | ||||||||||||||||||||||||||||||||||||
1345 | ) { | - | ||||||||||||||||||||||||||||||||||||
1346 | - | |||||||||||||||||||||||||||||||||||||
1347 | - | |||||||||||||||||||||||||||||||||||||
1348 | - | |||||||||||||||||||||||||||||||||||||
1349 | - | |||||||||||||||||||||||||||||||||||||
1350 | return executed 5500 times by 1 test: BIO_next(s->bbio);return BIO_next(s->bbio); Executed by:
executed 5500 times by 1 test: return BIO_next(s->bbio); Executed by:
| 5500 | ||||||||||||||||||||||||||||||||||||
1351 | } | - | ||||||||||||||||||||||||||||||||||||
1352 | return executed 8621 times by 1 test: s->wbio;return s->wbio; Executed by:
executed 8621 times by 1 test: return s->wbio; Executed by:
| 8621 | ||||||||||||||||||||||||||||||||||||
1353 | } | - | ||||||||||||||||||||||||||||||||||||
1354 | - | |||||||||||||||||||||||||||||||||||||
1355 | int SSL_get_fd(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1356 | { | - | ||||||||||||||||||||||||||||||||||||
1357 | return executed 4156 times by 1 test: SSL_get_rfd(s);return SSL_get_rfd(s); Executed by:
executed 4156 times by 1 test: return SSL_get_rfd(s); Executed by:
| 4156 | ||||||||||||||||||||||||||||||||||||
1358 | } | - | ||||||||||||||||||||||||||||||||||||
1359 | - | |||||||||||||||||||||||||||||||||||||
1360 | int SSL_get_rfd(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1361 | { | - | ||||||||||||||||||||||||||||||||||||
1362 | int ret = -1; | - | ||||||||||||||||||||||||||||||||||||
1363 | BIO *b, *r; | - | ||||||||||||||||||||||||||||||||||||
1364 | - | |||||||||||||||||||||||||||||||||||||
1365 | b = SSL_get_rbio(s); | - | ||||||||||||||||||||||||||||||||||||
1366 | r = BIO_find_type(b, 0x0100); | - | ||||||||||||||||||||||||||||||||||||
1367 | if (r !=
| 0-4156 | ||||||||||||||||||||||||||||||||||||
1368 | ((void *)0)
| 0-4156 | ||||||||||||||||||||||||||||||||||||
1369 | ) | - | ||||||||||||||||||||||||||||||||||||
1370 | BIO_ctrl(r,105,0,(char *)(&ret)); executed 4156 times by 1 test: BIO_ctrl(r,105,0,(char *)(&ret)); Executed by:
| 4156 | ||||||||||||||||||||||||||||||||||||
1371 | return executed 4156 times by 1 test: ret;return ret; Executed by:
executed 4156 times by 1 test: return ret; Executed by:
| 4156 | ||||||||||||||||||||||||||||||||||||
1372 | } | - | ||||||||||||||||||||||||||||||||||||
1373 | - | |||||||||||||||||||||||||||||||||||||
1374 | int SSL_get_wfd(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1375 | { | - | ||||||||||||||||||||||||||||||||||||
1376 | int ret = -1; | - | ||||||||||||||||||||||||||||||||||||
1377 | BIO *b, *r; | - | ||||||||||||||||||||||||||||||||||||
1378 | - | |||||||||||||||||||||||||||||||||||||
1379 | b = SSL_get_wbio(s); | - | ||||||||||||||||||||||||||||||||||||
1380 | r = BIO_find_type(b, 0x0100); | - | ||||||||||||||||||||||||||||||||||||
1381 | if (r !=
| 0 | ||||||||||||||||||||||||||||||||||||
1382 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1383 | ) | - | ||||||||||||||||||||||||||||||||||||
1384 | BIO_ctrl(r,105,0,(char *)(&ret)); never executed: BIO_ctrl(r,105,0,(char *)(&ret)); | 0 | ||||||||||||||||||||||||||||||||||||
1385 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
1386 | } | - | ||||||||||||||||||||||||||||||||||||
1387 | - | |||||||||||||||||||||||||||||||||||||
1388 | - | |||||||||||||||||||||||||||||||||||||
1389 | int SSL_set_fd(SSL *s, int fd) | - | ||||||||||||||||||||||||||||||||||||
1390 | { | - | ||||||||||||||||||||||||||||||||||||
1391 | int ret = 0; | - | ||||||||||||||||||||||||||||||||||||
1392 | BIO *bio = | - | ||||||||||||||||||||||||||||||||||||
1393 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
1394 | ; | - | ||||||||||||||||||||||||||||||||||||
1395 | - | |||||||||||||||||||||||||||||||||||||
1396 | bio = BIO_new(BIO_s_socket()); | - | ||||||||||||||||||||||||||||||||||||
1397 | - | |||||||||||||||||||||||||||||||||||||
1398 | if (bio ==
| 0 | ||||||||||||||||||||||||||||||||||||
1399 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1400 | ) { | - | ||||||||||||||||||||||||||||||||||||
1401 | ERR_put_error(20,(192),(7),__FILE__,1341); | - | ||||||||||||||||||||||||||||||||||||
1402 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
1403 | } | - | ||||||||||||||||||||||||||||||||||||
1404 | BIO_int_ctrl(bio,104,0x00,fd); | - | ||||||||||||||||||||||||||||||||||||
1405 | SSL_set_bio(s, bio, bio); | - | ||||||||||||||||||||||||||||||||||||
1406 | ret = 1; | - | ||||||||||||||||||||||||||||||||||||
1407 | err: code before this statement never executed: err: | 0 | ||||||||||||||||||||||||||||||||||||
1408 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
1409 | } | - | ||||||||||||||||||||||||||||||||||||
1410 | - | |||||||||||||||||||||||||||||||||||||
1411 | int SSL_set_wfd(SSL *s, int fd) | - | ||||||||||||||||||||||||||||||||||||
1412 | { | - | ||||||||||||||||||||||||||||||||||||
1413 | BIO *rbio = SSL_get_rbio(s); | - | ||||||||||||||||||||||||||||||||||||
1414 | - | |||||||||||||||||||||||||||||||||||||
1415 | if (rbio ==
| 0 | ||||||||||||||||||||||||||||||||||||
1416 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1417 | || BIO_method_type(rbio) != ( 5|0x0400|0x0100)
| 0 | ||||||||||||||||||||||||||||||||||||
1418 | || (
| 0 | ||||||||||||||||||||||||||||||||||||
1419 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1420 | )) != fd
| 0 | ||||||||||||||||||||||||||||||||||||
1421 | BIO *bio = BIO_new(BIO_s_socket()); | - | ||||||||||||||||||||||||||||||||||||
1422 | - | |||||||||||||||||||||||||||||||||||||
1423 | if (bio ==
| 0 | ||||||||||||||||||||||||||||||||||||
1424 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1425 | ) { | - | ||||||||||||||||||||||||||||||||||||
1426 | ERR_put_error(20,(196),(7),__FILE__,1360); | - | ||||||||||||||||||||||||||||||||||||
1427 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1428 | } | - | ||||||||||||||||||||||||||||||||||||
1429 | BIO_int_ctrl(bio,104,0x00,fd); | - | ||||||||||||||||||||||||||||||||||||
1430 | SSL_set0_wbio(s, bio); | - | ||||||||||||||||||||||||||||||||||||
1431 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
1432 | BIO_up_ref(rbio); | - | ||||||||||||||||||||||||||||||||||||
1433 | SSL_set0_wbio(s, rbio); | - | ||||||||||||||||||||||||||||||||||||
1434 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1435 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
1436 | } | - | ||||||||||||||||||||||||||||||||||||
1437 | - | |||||||||||||||||||||||||||||||||||||
1438 | int SSL_set_rfd(SSL *s, int fd) | - | ||||||||||||||||||||||||||||||||||||
1439 | { | - | ||||||||||||||||||||||||||||||||||||
1440 | BIO *wbio = SSL_get_wbio(s); | - | ||||||||||||||||||||||||||||||||||||
1441 | - | |||||||||||||||||||||||||||||||||||||
1442 | if (wbio ==
| 0 | ||||||||||||||||||||||||||||||||||||
1443 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1444 | || BIO_method_type(wbio) != ( 5|0x0400|0x0100)
| 0 | ||||||||||||||||||||||||||||||||||||
1445 | || ((
| 0 | ||||||||||||||||||||||||||||||||||||
1446 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1447 | )) != fd)
| 0 | ||||||||||||||||||||||||||||||||||||
1448 | BIO *bio = BIO_new(BIO_s_socket()); | - | ||||||||||||||||||||||||||||||||||||
1449 | - | |||||||||||||||||||||||||||||||||||||
1450 | if (bio ==
| 0 | ||||||||||||||||||||||||||||||||||||
1451 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1452 | ) { | - | ||||||||||||||||||||||||||||||||||||
1453 | ERR_put_error(20,(194),(7),__FILE__,1381); | - | ||||||||||||||||||||||||||||||||||||
1454 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1455 | } | - | ||||||||||||||||||||||||||||||||||||
1456 | BIO_int_ctrl(bio,104,0x00,fd); | - | ||||||||||||||||||||||||||||||||||||
1457 | SSL_set0_rbio(s, bio); | - | ||||||||||||||||||||||||||||||||||||
1458 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
1459 | BIO_up_ref(wbio); | - | ||||||||||||||||||||||||||||||||||||
1460 | SSL_set0_rbio(s, wbio); | - | ||||||||||||||||||||||||||||||||||||
1461 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1462 | - | |||||||||||||||||||||||||||||||||||||
1463 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
1464 | } | - | ||||||||||||||||||||||||||||||||||||
1465 | - | |||||||||||||||||||||||||||||||||||||
1466 | - | |||||||||||||||||||||||||||||||||||||
1467 | - | |||||||||||||||||||||||||||||||||||||
1468 | size_t SSL_get_finished(const SSL *s, void *buf, size_t count) | - | ||||||||||||||||||||||||||||||||||||
1469 | { | - | ||||||||||||||||||||||||||||||||||||
1470 | size_t ret = 0; | - | ||||||||||||||||||||||||||||||||||||
1471 | - | |||||||||||||||||||||||||||||||||||||
1472 | if (s->s3 !=
| 0 | ||||||||||||||||||||||||||||||||||||
1473 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1474 | ) { | - | ||||||||||||||||||||||||||||||||||||
1475 | ret = s->s3->tmp.finish_md_len; | - | ||||||||||||||||||||||||||||||||||||
1476 | if (count > ret
| 0 | ||||||||||||||||||||||||||||||||||||
1477 | count = ret; never executed: count = ret; | 0 | ||||||||||||||||||||||||||||||||||||
1478 | memcpy(buf, s->s3->tmp.finish_md, count); | - | ||||||||||||||||||||||||||||||||||||
1479 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1480 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
1481 | } | - | ||||||||||||||||||||||||||||||||||||
1482 | - | |||||||||||||||||||||||||||||||||||||
1483 | - | |||||||||||||||||||||||||||||||||||||
1484 | size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count) | - | ||||||||||||||||||||||||||||||||||||
1485 | { | - | ||||||||||||||||||||||||||||||||||||
1486 | size_t ret = 0; | - | ||||||||||||||||||||||||||||||||||||
1487 | - | |||||||||||||||||||||||||||||||||||||
1488 | if (s->s3 !=
| 0 | ||||||||||||||||||||||||||||||||||||
1489 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1490 | ) { | - | ||||||||||||||||||||||||||||||||||||
1491 | ret = s->s3->tmp.peer_finish_md_len; | - | ||||||||||||||||||||||||||||||||||||
1492 | if (count > ret
| 0 | ||||||||||||||||||||||||||||||||||||
1493 | count = ret; never executed: count = ret; | 0 | ||||||||||||||||||||||||||||||||||||
1494 | memcpy(buf, s->s3->tmp.peer_finish_md, count); | - | ||||||||||||||||||||||||||||||||||||
1495 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1496 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
1497 | } | - | ||||||||||||||||||||||||||||||||||||
1498 | - | |||||||||||||||||||||||||||||||||||||
1499 | int SSL_get_verify_mode(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1500 | { | - | ||||||||||||||||||||||||||||||||||||
1501 | return never executed: s->verify_mode;return s->verify_mode; never executed: return s->verify_mode; | 0 | ||||||||||||||||||||||||||||||||||||
1502 | } | - | ||||||||||||||||||||||||||||||||||||
1503 | - | |||||||||||||||||||||||||||||||||||||
1504 | int SSL_get_verify_depth(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1505 | { | - | ||||||||||||||||||||||||||||||||||||
1506 | return never executed: X509_VERIFY_PARAM_get_depth(s->param);return X509_VERIFY_PARAM_get_depth(s->param); never executed: return X509_VERIFY_PARAM_get_depth(s->param); | 0 | ||||||||||||||||||||||||||||||||||||
1507 | } | - | ||||||||||||||||||||||||||||||||||||
1508 | - | |||||||||||||||||||||||||||||||||||||
1509 | int (*SSL_get_verify_callback(const SSL *s)) (int, X509_STORE_CTX *) { | - | ||||||||||||||||||||||||||||||||||||
1510 | return executed 49 times by 1 test: s->verify_callback;return s->verify_callback; Executed by:
executed 49 times by 1 test: return s->verify_callback; Executed by:
| 49 | ||||||||||||||||||||||||||||||||||||
1511 | } | - | ||||||||||||||||||||||||||||||||||||
1512 | - | |||||||||||||||||||||||||||||||||||||
1513 | int SSL_CTX_get_verify_mode(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
1514 | { | - | ||||||||||||||||||||||||||||||||||||
1515 | return never executed: ctx->verify_mode;return ctx->verify_mode; never executed: return ctx->verify_mode; | 0 | ||||||||||||||||||||||||||||||||||||
1516 | } | - | ||||||||||||||||||||||||||||||||||||
1517 | - | |||||||||||||||||||||||||||||||||||||
1518 | int SSL_CTX_get_verify_depth(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
1519 | { | - | ||||||||||||||||||||||||||||||||||||
1520 | return never executed: X509_VERIFY_PARAM_get_depth(ctx->param);return X509_VERIFY_PARAM_get_depth(ctx->param); never executed: return X509_VERIFY_PARAM_get_depth(ctx->param); | 0 | ||||||||||||||||||||||||||||||||||||
1521 | } | - | ||||||||||||||||||||||||||||||||||||
1522 | - | |||||||||||||||||||||||||||||||||||||
1523 | int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx)) (int, X509_STORE_CTX *) { | - | ||||||||||||||||||||||||||||||||||||
1524 | return never executed: ctx->default_verify_callback;return ctx->default_verify_callback; never executed: return ctx->default_verify_callback; | 0 | ||||||||||||||||||||||||||||||||||||
1525 | } | - | ||||||||||||||||||||||||||||||||||||
1526 | - | |||||||||||||||||||||||||||||||||||||
1527 | void SSL_set_verify(SSL *s, int mode, | - | ||||||||||||||||||||||||||||||||||||
1528 | int (*callback) (int ok, X509_STORE_CTX *ctx)) | - | ||||||||||||||||||||||||||||||||||||
1529 | { | - | ||||||||||||||||||||||||||||||||||||
1530 | s->verify_mode = mode; | - | ||||||||||||||||||||||||||||||||||||
1531 | if (callback !=
| 0-20 | ||||||||||||||||||||||||||||||||||||
1532 | ((void *)0)
| 0-20 | ||||||||||||||||||||||||||||||||||||
1533 | ) | - | ||||||||||||||||||||||||||||||||||||
1534 | s->verify_callback = callback; never executed: s->verify_callback = callback; | 0 | ||||||||||||||||||||||||||||||||||||
1535 | } executed 20 times by 1 test: end of block Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
1536 | - | |||||||||||||||||||||||||||||||||||||
1537 | void SSL_set_verify_depth(SSL *s, int depth) | - | ||||||||||||||||||||||||||||||||||||
1538 | { | - | ||||||||||||||||||||||||||||||||||||
1539 | X509_VERIFY_PARAM_set_depth(s->param, depth); | - | ||||||||||||||||||||||||||||||||||||
1540 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1541 | - | |||||||||||||||||||||||||||||||||||||
1542 | void SSL_set_read_ahead(SSL *s, int yes) | - | ||||||||||||||||||||||||||||||||||||
1543 | { | - | ||||||||||||||||||||||||||||||||||||
1544 | ((&s->rlayer)->read_ahead = (yes)); | - | ||||||||||||||||||||||||||||||||||||
1545 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1546 | - | |||||||||||||||||||||||||||||||||||||
1547 | int SSL_get_read_ahead(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1548 | { | - | ||||||||||||||||||||||||||||||||||||
1549 | return never executed: ((&s->rlayer)->read_ahead);return ((&s->rlayer)->read_ahead); never executed: return ((&s->rlayer)->read_ahead); | 0 | ||||||||||||||||||||||||||||||||||||
1550 | } | - | ||||||||||||||||||||||||||||||||||||
1551 | - | |||||||||||||||||||||||||||||||||||||
1552 | int SSL_pending(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1553 | { | - | ||||||||||||||||||||||||||||||||||||
1554 | size_t pending = s->method->ssl_pending(s); | - | ||||||||||||||||||||||||||||||||||||
1555 | return executed 1570 times by 1 test: pending < 0x7fffffffreturn pending < 0x7fffffff ? (int)pending : 0x7fffffff; Executed by:
executed 1570 times by 1 test: return pending < 0x7fffffff ? (int)pending : 0x7fffffff; Executed by:
| 0-1570 | ||||||||||||||||||||||||||||||||||||
1556 | } | - | ||||||||||||||||||||||||||||||||||||
1557 | - | |||||||||||||||||||||||||||||||||||||
1558 | int SSL_has_pending(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1559 | { | - | ||||||||||||||||||||||||||||||||||||
1560 | if (RECORD_LAYER_processed_read_pending(&s->rlayer)
| 2-569 | ||||||||||||||||||||||||||||||||||||
1561 | return executed 2 times by 1 test: 1;return 1; Executed by:
executed 2 times by 1 test: return 1; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
1562 | - | |||||||||||||||||||||||||||||||||||||
1563 | return executed 569 times by 1 test: RECORD_LAYER_read_pending(&s->rlayer);return RECORD_LAYER_read_pending(&s->rlayer); Executed by:
executed 569 times by 1 test: return RECORD_LAYER_read_pending(&s->rlayer); Executed by:
| 569 | ||||||||||||||||||||||||||||||||||||
1564 | } | - | ||||||||||||||||||||||||||||||||||||
1565 | - | |||||||||||||||||||||||||||||||||||||
1566 | X509 *SSL_get_peer_certificate(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1567 | { | - | ||||||||||||||||||||||||||||||||||||
1568 | X509 *r; | - | ||||||||||||||||||||||||||||||||||||
1569 | - | |||||||||||||||||||||||||||||||||||||
1570 | if ((
| 0-2877 | ||||||||||||||||||||||||||||||||||||
1571 | ((void *)0)
| 0-2877 | ||||||||||||||||||||||||||||||||||||
1572 | )
| 0-2877 | ||||||||||||||||||||||||||||||||||||
1573 | ((void *)0)
| 260-2617 | ||||||||||||||||||||||||||||||||||||
1574 | )
| 260-2617 | ||||||||||||||||||||||||||||||||||||
1575 | r = executed 260 times by 1 test: r = ((void *)0) ; Executed by:
| 260 | ||||||||||||||||||||||||||||||||||||
1576 | ((void *)0) executed 260 times by 1 test: r = ((void *)0) ; Executed by:
| 260 | ||||||||||||||||||||||||||||||||||||
1577 | ; executed 260 times by 1 test: r = ((void *)0) ; Executed by:
| 260 | ||||||||||||||||||||||||||||||||||||
1578 | else | - | ||||||||||||||||||||||||||||||||||||
1579 | r = s->session->peer; executed 2617 times by 1 test: r = s->session->peer; Executed by:
| 2617 | ||||||||||||||||||||||||||||||||||||
1580 | - | |||||||||||||||||||||||||||||||||||||
1581 | if (r ==
| 1263-1614 | ||||||||||||||||||||||||||||||||||||
1582 | ((void *)0)
| 1263-1614 | ||||||||||||||||||||||||||||||||||||
1583 | ) | - | ||||||||||||||||||||||||||||||||||||
1584 | return executed 1614 times by 1 test: r;return r; Executed by:
executed 1614 times by 1 test: return r; Executed by:
| 1614 | ||||||||||||||||||||||||||||||||||||
1585 | - | |||||||||||||||||||||||||||||||||||||
1586 | X509_up_ref(r); | - | ||||||||||||||||||||||||||||||||||||
1587 | - | |||||||||||||||||||||||||||||||||||||
1588 | return executed 1263 times by 1 test: r;return r; Executed by:
executed 1263 times by 1 test: return r; Executed by:
| 1263 | ||||||||||||||||||||||||||||||||||||
1589 | } | - | ||||||||||||||||||||||||||||||||||||
1590 | - | |||||||||||||||||||||||||||||||||||||
1591 | struct stack_st_X509 *SSL_get_peer_cert_chain(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1592 | { | - | ||||||||||||||||||||||||||||||||||||
1593 | struct stack_st_X509 *r; | - | ||||||||||||||||||||||||||||||||||||
1594 | - | |||||||||||||||||||||||||||||||||||||
1595 | if ((
| 0-191 | ||||||||||||||||||||||||||||||||||||
1596 | ((void *)0)
| 0-191 | ||||||||||||||||||||||||||||||||||||
1597 | )
| 0-191 | ||||||||||||||||||||||||||||||||||||
1598 | ((void *)0)
| 0-191 | ||||||||||||||||||||||||||||||||||||
1599 | )
| 0-191 | ||||||||||||||||||||||||||||||||||||
1600 | r = never executed: r = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
1601 | ((void *)0) never executed: r = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
1602 | ; never executed: r = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
1603 | else | - | ||||||||||||||||||||||||||||||||||||
1604 | r = s->session->peer_chain; executed 191 times by 1 test: r = s->session->peer_chain; Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
1605 | - | |||||||||||||||||||||||||||||||||||||
1606 | - | |||||||||||||||||||||||||||||||||||||
1607 | - | |||||||||||||||||||||||||||||||||||||
1608 | - | |||||||||||||||||||||||||||||||||||||
1609 | - | |||||||||||||||||||||||||||||||||||||
1610 | - | |||||||||||||||||||||||||||||||||||||
1611 | return executed 191 times by 1 test: r;return r; Executed by:
executed 191 times by 1 test: return r; Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
1612 | } | - | ||||||||||||||||||||||||||||||||||||
1613 | - | |||||||||||||||||||||||||||||||||||||
1614 | - | |||||||||||||||||||||||||||||||||||||
1615 | - | |||||||||||||||||||||||||||||||||||||
1616 | - | |||||||||||||||||||||||||||||||||||||
1617 | - | |||||||||||||||||||||||||||||||||||||
1618 | int SSL_copy_session_id(SSL *t, const SSL *f) | - | ||||||||||||||||||||||||||||||||||||
1619 | { | - | ||||||||||||||||||||||||||||||||||||
1620 | int i; | - | ||||||||||||||||||||||||||||||||||||
1621 | - | |||||||||||||||||||||||||||||||||||||
1622 | if (!SSL_set_session(t, SSL_get_session(f))
| 0 | ||||||||||||||||||||||||||||||||||||
1623 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1624 | } | - | ||||||||||||||||||||||||||||||||||||
1625 | - | |||||||||||||||||||||||||||||||||||||
1626 | - | |||||||||||||||||||||||||||||||||||||
1627 | - | |||||||||||||||||||||||||||||||||||||
1628 | - | |||||||||||||||||||||||||||||||||||||
1629 | if (t->method != f->method
| 0 | ||||||||||||||||||||||||||||||||||||
1630 | t->method->ssl_free(t); | - | ||||||||||||||||||||||||||||||||||||
1631 | t->method = f->method; | - | ||||||||||||||||||||||||||||||||||||
1632 | if (t->method->ssl_new(t) == 0
| 0 | ||||||||||||||||||||||||||||||||||||
1633 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1634 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1635 | - | |||||||||||||||||||||||||||||||||||||
1636 | CRYPTO_UP_REF(&f->cert->references, &i, f->cert->lock); | - | ||||||||||||||||||||||||||||||||||||
1637 | ssl_cert_free(t->cert); | - | ||||||||||||||||||||||||||||||||||||
1638 | t->cert = f->cert; | - | ||||||||||||||||||||||||||||||||||||
1639 | if (!SSL_set_session_id_context(t, f->sid_ctx, (int)f->sid_ctx_length)
| 0 | ||||||||||||||||||||||||||||||||||||
1640 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1641 | } | - | ||||||||||||||||||||||||||||||||||||
1642 | - | |||||||||||||||||||||||||||||||||||||
1643 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
1644 | } | - | ||||||||||||||||||||||||||||||||||||
1645 | - | |||||||||||||||||||||||||||||||||||||
1646 | - | |||||||||||||||||||||||||||||||||||||
1647 | int SSL_CTX_check_private_key(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
1648 | { | - | ||||||||||||||||||||||||||||||||||||
1649 | if ((
| 0-515 | ||||||||||||||||||||||||||||||||||||
1650 | ((void *)0)
| 0-515 | ||||||||||||||||||||||||||||||||||||
1651 | )
| 0-515 | ||||||||||||||||||||||||||||||||||||
1652 | ((void *)0)
| 0-515 | ||||||||||||||||||||||||||||||||||||
1653 | )
| 0-515 | ||||||||||||||||||||||||||||||||||||
1654 | ERR_put_error(20,(168),(177),__FILE__,1577); | - | ||||||||||||||||||||||||||||||||||||
1655 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1656 | } | - | ||||||||||||||||||||||||||||||||||||
1657 | if (ctx->cert->key->privatekey ==
| 0-515 | ||||||||||||||||||||||||||||||||||||
1658 | ((void *)0)
| 0-515 | ||||||||||||||||||||||||||||||||||||
1659 | ) { | - | ||||||||||||||||||||||||||||||||||||
1660 | ERR_put_error(20,(168),(190),__FILE__,1581); | - | ||||||||||||||||||||||||||||||||||||
1661 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1662 | } | - | ||||||||||||||||||||||||||||||||||||
1663 | return executed 515 times by 1 test: X509_check_private_keyreturn X509_check_private_key (ctx->cert->key->x509, ctx->cert->key->privatekey); Executed by:
executed 515 times by 1 test: return X509_check_private_key (ctx->cert->key->x509, ctx->cert->key->privatekey); Executed by:
| 515 | ||||||||||||||||||||||||||||||||||||
1664 | (ctx->cert->key->x509, ctx->cert->key->privatekey); executed 515 times by 1 test: return X509_check_private_key (ctx->cert->key->x509, ctx->cert->key->privatekey); Executed by:
| 515 | ||||||||||||||||||||||||||||||||||||
1665 | } | - | ||||||||||||||||||||||||||||||||||||
1666 | - | |||||||||||||||||||||||||||||||||||||
1667 | - | |||||||||||||||||||||||||||||||||||||
1668 | int SSL_check_private_key(const SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
1669 | { | - | ||||||||||||||||||||||||||||||||||||
1670 | if (ssl ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
1671 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
1672 | ) { | - | ||||||||||||||||||||||||||||||||||||
1673 | ERR_put_error(20,(163),((3|64)),__FILE__,1592); | - | ||||||||||||||||||||||||||||||||||||
1674 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1675 | } | - | ||||||||||||||||||||||||||||||||||||
1676 | if (ssl->cert->key->x509 ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
1677 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
1678 | ) { | - | ||||||||||||||||||||||||||||||||||||
1679 | ERR_put_error(20,(163),(177),__FILE__,1596); | - | ||||||||||||||||||||||||||||||||||||
1680 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1681 | } | - | ||||||||||||||||||||||||||||||||||||
1682 | if (ssl->cert->key->privatekey ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
1683 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
1684 | ) { | - | ||||||||||||||||||||||||||||||||||||
1685 | ERR_put_error(20,(163),(190),__FILE__,1600); | - | ||||||||||||||||||||||||||||||||||||
1686 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1687 | } | - | ||||||||||||||||||||||||||||||||||||
1688 | return executed 2 times by 1 test: X509_check_private_key(ssl->cert->key->x509,return X509_check_private_key(ssl->cert->key->x509, ssl->cert->key->privatekey); Executed by:
executed 2 times by 1 test: return X509_check_private_key(ssl->cert->key->x509, ssl->cert->key->privatekey); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
1689 | ssl->cert->key->privatekey); executed 2 times by 1 test: return X509_check_private_key(ssl->cert->key->x509, ssl->cert->key->privatekey); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
1690 | } | - | ||||||||||||||||||||||||||||||||||||
1691 | - | |||||||||||||||||||||||||||||||||||||
1692 | int SSL_waiting_for_async(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1693 | { | - | ||||||||||||||||||||||||||||||||||||
1694 | if (s->job
| 0 | ||||||||||||||||||||||||||||||||||||
1695 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
1696 | - | |||||||||||||||||||||||||||||||||||||
1697 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1698 | } | - | ||||||||||||||||||||||||||||||||||||
1699 | - | |||||||||||||||||||||||||||||||||||||
1700 | int SSL_get_all_async_fds(SSL *s, int *fds, size_t *numfds) | - | ||||||||||||||||||||||||||||||||||||
1701 | { | - | ||||||||||||||||||||||||||||||||||||
1702 | ASYNC_WAIT_CTX *ctx = s->waitctx; | - | ||||||||||||||||||||||||||||||||||||
1703 | - | |||||||||||||||||||||||||||||||||||||
1704 | if (ctx ==
| 0 | ||||||||||||||||||||||||||||||||||||
1705 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1706 | ) | - | ||||||||||||||||||||||||||||||||||||
1707 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1708 | return never executed: ASYNC_WAIT_CTX_get_all_fds(ctx, fds, numfds);return ASYNC_WAIT_CTX_get_all_fds(ctx, fds, numfds); never executed: return ASYNC_WAIT_CTX_get_all_fds(ctx, fds, numfds); | 0 | ||||||||||||||||||||||||||||||||||||
1709 | } | - | ||||||||||||||||||||||||||||||||||||
1710 | - | |||||||||||||||||||||||||||||||||||||
1711 | int SSL_get_changed_async_fds(SSL *s, int *addfd, size_t *numaddfds, | - | ||||||||||||||||||||||||||||||||||||
1712 | int *delfd, size_t *numdelfds) | - | ||||||||||||||||||||||||||||||||||||
1713 | { | - | ||||||||||||||||||||||||||||||||||||
1714 | ASYNC_WAIT_CTX *ctx = s->waitctx; | - | ||||||||||||||||||||||||||||||||||||
1715 | - | |||||||||||||||||||||||||||||||||||||
1716 | if (ctx ==
| 0 | ||||||||||||||||||||||||||||||||||||
1717 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1718 | ) | - | ||||||||||||||||||||||||||||||||||||
1719 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1720 | return never executed: ASYNC_WAIT_CTX_get_changed_fds(ctx, addfd, numaddfds, delfd,return ASYNC_WAIT_CTX_get_changed_fds(ctx, addfd, numaddfds, delfd, numdelfds); never executed: return ASYNC_WAIT_CTX_get_changed_fds(ctx, addfd, numaddfds, delfd, numdelfds); | 0 | ||||||||||||||||||||||||||||||||||||
1721 | numdelfds); never executed: return ASYNC_WAIT_CTX_get_changed_fds(ctx, addfd, numaddfds, delfd, numdelfds); | 0 | ||||||||||||||||||||||||||||||||||||
1722 | } | - | ||||||||||||||||||||||||||||||||||||
1723 | - | |||||||||||||||||||||||||||||||||||||
1724 | int SSL_accept(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1725 | { | - | ||||||||||||||||||||||||||||||||||||
1726 | if (s->handshake_func ==
| 414-7144 | ||||||||||||||||||||||||||||||||||||
1727 | ((void *)0)
| 414-7144 | ||||||||||||||||||||||||||||||||||||
1728 | ) { | - | ||||||||||||||||||||||||||||||||||||
1729 | - | |||||||||||||||||||||||||||||||||||||
1730 | SSL_set_accept_state(s); | - | ||||||||||||||||||||||||||||||||||||
1731 | } executed 414 times by 1 test: end of block Executed by:
| 414 | ||||||||||||||||||||||||||||||||||||
1732 | - | |||||||||||||||||||||||||||||||||||||
1733 | return executed 7558 times by 1 test: SSL_do_handshake(s);return SSL_do_handshake(s); Executed by:
executed 7558 times by 1 test: return SSL_do_handshake(s); Executed by:
| 7558 | ||||||||||||||||||||||||||||||||||||
1734 | } | - | ||||||||||||||||||||||||||||||||||||
1735 | - | |||||||||||||||||||||||||||||||||||||
1736 | int SSL_connect(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1737 | { | - | ||||||||||||||||||||||||||||||||||||
1738 | if (s->handshake_func ==
| 402-6538 | ||||||||||||||||||||||||||||||||||||
1739 | ((void *)0)
| 402-6538 | ||||||||||||||||||||||||||||||||||||
1740 | ) { | - | ||||||||||||||||||||||||||||||||||||
1741 | - | |||||||||||||||||||||||||||||||||||||
1742 | SSL_set_connect_state(s); | - | ||||||||||||||||||||||||||||||||||||
1743 | } executed 402 times by 1 test: end of block Executed by:
| 402 | ||||||||||||||||||||||||||||||||||||
1744 | - | |||||||||||||||||||||||||||||||||||||
1745 | return executed 6940 times by 1 test: SSL_do_handshake(s);return SSL_do_handshake(s); Executed by:
executed 6940 times by 1 test: return SSL_do_handshake(s); Executed by:
| 6940 | ||||||||||||||||||||||||||||||||||||
1746 | } | - | ||||||||||||||||||||||||||||||||||||
1747 | - | |||||||||||||||||||||||||||||||||||||
1748 | long SSL_get_default_timeout(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1749 | { | - | ||||||||||||||||||||||||||||||||||||
1750 | return never executed: s->method->get_timeout();return s->method->get_timeout(); never executed: return s->method->get_timeout(); | 0 | ||||||||||||||||||||||||||||||||||||
1751 | } | - | ||||||||||||||||||||||||||||||||||||
1752 | - | |||||||||||||||||||||||||||||||||||||
1753 | static int ssl_start_async_job(SSL *s, struct ssl_async_args *args, | - | ||||||||||||||||||||||||||||||||||||
1754 | int (*func) (void *)) | - | ||||||||||||||||||||||||||||||||||||
1755 | { | - | ||||||||||||||||||||||||||||||||||||
1756 | int ret; | - | ||||||||||||||||||||||||||||||||||||
1757 | if (s->waitctx ==
| 0 | ||||||||||||||||||||||||||||||||||||
1758 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1759 | ) { | - | ||||||||||||||||||||||||||||||||||||
1760 | s->waitctx = ASYNC_WAIT_CTX_new(); | - | ||||||||||||||||||||||||||||||||||||
1761 | if (s->waitctx ==
| 0 | ||||||||||||||||||||||||||||||||||||
1762 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1763 | ) | - | ||||||||||||||||||||||||||||||||||||
1764 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1765 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
1766 | switch (ASYNC_start_job(&s->job, s->waitctx, &ret, func, args, | - | ||||||||||||||||||||||||||||||||||||
1767 | sizeof(struct ssl_async_args))) { | - | ||||||||||||||||||||||||||||||||||||
1768 | case never executed: 0:case 0: never executed: case 0: | 0 | ||||||||||||||||||||||||||||||||||||
1769 | s->rwstate = 1; | - | ||||||||||||||||||||||||||||||||||||
1770 | ERR_put_error(20,(389),(405),__FILE__,1673); | - | ||||||||||||||||||||||||||||||||||||
1771 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1772 | case never executed: 2:case 2: never executed: case 2: | 0 | ||||||||||||||||||||||||||||||||||||
1773 | s->rwstate = 5; | - | ||||||||||||||||||||||||||||||||||||
1774 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1775 | case never executed: 1:case 1: never executed: case 1: | 0 | ||||||||||||||||||||||||||||||||||||
1776 | s->rwstate = 6; | - | ||||||||||||||||||||||||||||||||||||
1777 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1778 | case never executed: 3:case 3: never executed: case 3: | 0 | ||||||||||||||||||||||||||||||||||||
1779 | s->job = | - | ||||||||||||||||||||||||||||||||||||
1780 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
1781 | ; | - | ||||||||||||||||||||||||||||||||||||
1782 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
1783 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
1784 | s->rwstate = 1; | - | ||||||||||||||||||||||||||||||||||||
1785 | ERR_put_error(20,(389),((4|64)),__FILE__,1686); | - | ||||||||||||||||||||||||||||||||||||
1786 | - | |||||||||||||||||||||||||||||||||||||
1787 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1788 | } | - | ||||||||||||||||||||||||||||||||||||
1789 | } | - | ||||||||||||||||||||||||||||||||||||
1790 | - | |||||||||||||||||||||||||||||||||||||
1791 | static int ssl_io_intern(void *vargs) | - | ||||||||||||||||||||||||||||||||||||
1792 | { | - | ||||||||||||||||||||||||||||||||||||
1793 | struct ssl_async_args *args; | - | ||||||||||||||||||||||||||||||||||||
1794 | SSL *s; | - | ||||||||||||||||||||||||||||||||||||
1795 | void *buf; | - | ||||||||||||||||||||||||||||||||||||
1796 | size_t num; | - | ||||||||||||||||||||||||||||||||||||
1797 | - | |||||||||||||||||||||||||||||||||||||
1798 | args = (struct ssl_async_args *)vargs; | - | ||||||||||||||||||||||||||||||||||||
1799 | s = args->s; | - | ||||||||||||||||||||||||||||||||||||
1800 | buf = args->buf; | - | ||||||||||||||||||||||||||||||||||||
1801 | num = args->num; | - | ||||||||||||||||||||||||||||||||||||
1802 | switch (args->type) { | - | ||||||||||||||||||||||||||||||||||||
1803 | case never executed: READFUNC:case READFUNC: never executed: case READFUNC: | 0 | ||||||||||||||||||||||||||||||||||||
1804 | return never executed: args->f.func_read(s, buf, num, &s->asyncrw);return args->f.func_read(s, buf, num, &s->asyncrw); never executed: return args->f.func_read(s, buf, num, &s->asyncrw); | 0 | ||||||||||||||||||||||||||||||||||||
1805 | case never executed: WRITEFUNC:case WRITEFUNC: never executed: case WRITEFUNC: | 0 | ||||||||||||||||||||||||||||||||||||
1806 | return never executed: args->f.func_write(s, buf, num, &s->asyncrw);return args->f.func_write(s, buf, num, &s->asyncrw); never executed: return args->f.func_write(s, buf, num, &s->asyncrw); | 0 | ||||||||||||||||||||||||||||||||||||
1807 | case never executed: OTHERFUNC:case OTHERFUNC: never executed: case OTHERFUNC: | 0 | ||||||||||||||||||||||||||||||||||||
1808 | return never executed: args->f.func_other(s);return args->f.func_other(s); never executed: return args->f.func_other(s); | 0 | ||||||||||||||||||||||||||||||||||||
1809 | } | - | ||||||||||||||||||||||||||||||||||||
1810 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1811 | } | - | ||||||||||||||||||||||||||||||||||||
1812 | - | |||||||||||||||||||||||||||||||||||||
1813 | int ssl_read_internal(SSL *s, void *buf, size_t num, size_t *readbytes) | - | ||||||||||||||||||||||||||||||||||||
1814 | { | - | ||||||||||||||||||||||||||||||||||||
1815 | if (s->handshake_func ==
| 0-21656 | ||||||||||||||||||||||||||||||||||||
1816 | ((void *)0)
| 0-21656 | ||||||||||||||||||||||||||||||||||||
1817 | ) { | - | ||||||||||||||||||||||||||||||||||||
1818 | ERR_put_error(20,(523),(276),__FILE__,1717); | - | ||||||||||||||||||||||||||||||||||||
1819 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1820 | } | - | ||||||||||||||||||||||||||||||||||||
1821 | - | |||||||||||||||||||||||||||||||||||||
1822 | if (s->shutdown & 2
| 110-21546 | ||||||||||||||||||||||||||||||||||||
1823 | s->rwstate = 1; | - | ||||||||||||||||||||||||||||||||||||
1824 | return executed 110 times by 1 test: 0;return 0; Executed by:
executed 110 times by 1 test: return 0; Executed by:
| 110 | ||||||||||||||||||||||||||||||||||||
1825 | } | - | ||||||||||||||||||||||||||||||||||||
1826 | - | |||||||||||||||||||||||||||||||||||||
1827 | if (s->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY
| 0-21546 | ||||||||||||||||||||||||||||||||||||
1828 | || s->early_data_state == SSL_EARLY_DATA_ACCEPT_RETRY
| 0-21546 | ||||||||||||||||||||||||||||||||||||
1829 | ERR_put_error(20,(523),((2|64)),__FILE__,1728); | - | ||||||||||||||||||||||||||||||||||||
1830 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1831 | } | - | ||||||||||||||||||||||||||||||||||||
1832 | - | |||||||||||||||||||||||||||||||||||||
1833 | - | |||||||||||||||||||||||||||||||||||||
1834 | - | |||||||||||||||||||||||||||||||||||||
1835 | - | |||||||||||||||||||||||||||||||||||||
1836 | ossl_statem_check_finish_init(s, 0); | - | ||||||||||||||||||||||||||||||||||||
1837 | - | |||||||||||||||||||||||||||||||||||||
1838 | if ((
| 0-21546 | ||||||||||||||||||||||||||||||||||||
1839 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1840 | ) { | - | ||||||||||||||||||||||||||||||||||||
1841 | struct ssl_async_args args; | - | ||||||||||||||||||||||||||||||||||||
1842 | int ret; | - | ||||||||||||||||||||||||||||||||||||
1843 | - | |||||||||||||||||||||||||||||||||||||
1844 | args.s = s; | - | ||||||||||||||||||||||||||||||||||||
1845 | args.buf = buf; | - | ||||||||||||||||||||||||||||||||||||
1846 | args.num = num; | - | ||||||||||||||||||||||||||||||||||||
1847 | args.type = READFUNC; | - | ||||||||||||||||||||||||||||||||||||
1848 | args.f.func_read = s->method->ssl_read; | - | ||||||||||||||||||||||||||||||||||||
1849 | - | |||||||||||||||||||||||||||||||||||||
1850 | ret = ssl_start_async_job(s, &args, ssl_io_intern); | - | ||||||||||||||||||||||||||||||||||||
1851 | *readbytes = s->asyncrw; | - | ||||||||||||||||||||||||||||||||||||
1852 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
1853 | } else { | - | ||||||||||||||||||||||||||||||||||||
1854 | return executed 21546 times by 1 test: s->method->ssl_read(s, buf, num, readbytes);return s->method->ssl_read(s, buf, num, readbytes); Executed by:
executed 21546 times by 1 test: return s->method->ssl_read(s, buf, num, readbytes); Executed by:
| 21546 | ||||||||||||||||||||||||||||||||||||
1855 | } | - | ||||||||||||||||||||||||||||||||||||
1856 | } | - | ||||||||||||||||||||||||||||||||||||
1857 | - | |||||||||||||||||||||||||||||||||||||
1858 | int SSL_read(SSL *s, void *buf, int num) | - | ||||||||||||||||||||||||||||||||||||
1859 | { | - | ||||||||||||||||||||||||||||||||||||
1860 | int ret; | - | ||||||||||||||||||||||||||||||||||||
1861 | size_t readbytes; | - | ||||||||||||||||||||||||||||||||||||
1862 | - | |||||||||||||||||||||||||||||||||||||
1863 | if (num < 0
| 0-10615 | ||||||||||||||||||||||||||||||||||||
1864 | ERR_put_error(20,(223),(271),__FILE__,1761); | - | ||||||||||||||||||||||||||||||||||||
1865 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1866 | } | - | ||||||||||||||||||||||||||||||||||||
1867 | - | |||||||||||||||||||||||||||||||||||||
1868 | ret = ssl_read_internal(s, buf, (size_t)num, &readbytes); | - | ||||||||||||||||||||||||||||||||||||
1869 | - | |||||||||||||||||||||||||||||||||||||
1870 | - | |||||||||||||||||||||||||||||||||||||
1871 | - | |||||||||||||||||||||||||||||||||||||
1872 | - | |||||||||||||||||||||||||||||||||||||
1873 | - | |||||||||||||||||||||||||||||||||||||
1874 | if (ret > 0
| 1450-9165 | ||||||||||||||||||||||||||||||||||||
1875 | ret = (int)readbytes; executed 9165 times by 1 test: ret = (int)readbytes; Executed by:
| 9165 | ||||||||||||||||||||||||||||||||||||
1876 | - | |||||||||||||||||||||||||||||||||||||
1877 | return executed 10615 times by 1 test: ret;return ret; Executed by:
executed 10615 times by 1 test: return ret; Executed by:
| 10615 | ||||||||||||||||||||||||||||||||||||
1878 | } | - | ||||||||||||||||||||||||||||||||||||
1879 | - | |||||||||||||||||||||||||||||||||||||
1880 | int SSL_read_ex(SSL *s, void *buf, size_t num, size_t *readbytes) | - | ||||||||||||||||||||||||||||||||||||
1881 | { | - | ||||||||||||||||||||||||||||||||||||
1882 | int ret = ssl_read_internal(s, buf, num, readbytes); | - | ||||||||||||||||||||||||||||||||||||
1883 | - | |||||||||||||||||||||||||||||||||||||
1884 | if (ret < 0
| 73-777 | ||||||||||||||||||||||||||||||||||||
1885 | ret = 0; executed 777 times by 1 test: ret = 0; Executed by:
| 777 | ||||||||||||||||||||||||||||||||||||
1886 | return executed 850 times by 1 test: ret;return ret; Executed by:
executed 850 times by 1 test: return ret; Executed by:
| 850 | ||||||||||||||||||||||||||||||||||||
1887 | } | - | ||||||||||||||||||||||||||||||||||||
1888 | - | |||||||||||||||||||||||||||||||||||||
1889 | int SSL_read_early_data(SSL *s, void *buf, size_t num, size_t *readbytes) | - | ||||||||||||||||||||||||||||||||||||
1890 | { | - | ||||||||||||||||||||||||||||||||||||
1891 | int ret; | - | ||||||||||||||||||||||||||||||||||||
1892 | - | |||||||||||||||||||||||||||||||||||||
1893 | if (!s->server
| 0-697 | ||||||||||||||||||||||||||||||||||||
1894 | ERR_put_error(20,(529),((2|64)),__FILE__,1791); | - | ||||||||||||||||||||||||||||||||||||
1895 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1896 | } | - | ||||||||||||||||||||||||||||||||||||
1897 | - | |||||||||||||||||||||||||||||||||||||
1898 | switch (s->early_data_state) { | - | ||||||||||||||||||||||||||||||||||||
1899 | case executed 675 times by 1 test: SSL_EARLY_DATA_NONE:case SSL_EARLY_DATA_NONE: Executed by:
executed 675 times by 1 test: case SSL_EARLY_DATA_NONE: Executed by:
| 675 | ||||||||||||||||||||||||||||||||||||
1900 | if (!SSL_in_before(s)
| 0-675 | ||||||||||||||||||||||||||||||||||||
1901 | ERR_put_error(20,(529),((2|64)),__FILE__,1799) | - | ||||||||||||||||||||||||||||||||||||
1902 | ; | - | ||||||||||||||||||||||||||||||||||||
1903 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1904 | } | - | ||||||||||||||||||||||||||||||||||||
1905 | - | |||||||||||||||||||||||||||||||||||||
1906 | - | |||||||||||||||||||||||||||||||||||||
1907 | case executed 3 times by 1 test: SSL_EARLY_DATA_ACCEPT_RETRY:case SSL_EARLY_DATA_ACCEPT_RETRY: Executed by:
executed 3 times by 1 test: case SSL_EARLY_DATA_ACCEPT_RETRY: Executed by:
code before this statement executed 675 times by 1 test: case SSL_EARLY_DATA_ACCEPT_RETRY: Executed by:
| 3-675 | ||||||||||||||||||||||||||||||||||||
1908 | s->early_data_state = SSL_EARLY_DATA_ACCEPTING; | - | ||||||||||||||||||||||||||||||||||||
1909 | ret = SSL_accept(s); | - | ||||||||||||||||||||||||||||||||||||
1910 | if (ret <= 0
| 159-519 | ||||||||||||||||||||||||||||||||||||
1911 | - | |||||||||||||||||||||||||||||||||||||
1912 | s->early_data_state = SSL_EARLY_DATA_ACCEPT_RETRY; | - | ||||||||||||||||||||||||||||||||||||
1913 | return executed 519 times by 1 test: 0;return 0; Executed by:
executed 519 times by 1 test: return 0; Executed by:
| 519 | ||||||||||||||||||||||||||||||||||||
1914 | } | - | ||||||||||||||||||||||||||||||||||||
1915 | - | |||||||||||||||||||||||||||||||||||||
1916 | - | |||||||||||||||||||||||||||||||||||||
1917 | case executed 13 times by 1 test: SSL_EARLY_DATA_READ_RETRY:case SSL_EARLY_DATA_READ_RETRY: Executed by:
executed 13 times by 1 test: case SSL_EARLY_DATA_READ_RETRY: Executed by:
code before this statement executed 159 times by 1 test: case SSL_EARLY_DATA_READ_RETRY: Executed by:
| 13-159 | ||||||||||||||||||||||||||||||||||||
1918 | if (s->ext.early_data == 2
| 35-137 | ||||||||||||||||||||||||||||||||||||
1919 | s->early_data_state = SSL_EARLY_DATA_READING; | - | ||||||||||||||||||||||||||||||||||||
1920 | ret = SSL_read_ex(s, buf, num, readbytes); | - | ||||||||||||||||||||||||||||||||||||
1921 | - | |||||||||||||||||||||||||||||||||||||
1922 | - | |||||||||||||||||||||||||||||||||||||
1923 | - | |||||||||||||||||||||||||||||||||||||
1924 | - | |||||||||||||||||||||||||||||||||||||
1925 | - | |||||||||||||||||||||||||||||||||||||
1926 | if (ret > 0
| 0-21 | ||||||||||||||||||||||||||||||||||||
1927 | != SSL_EARLY_DATA_FINISHED_READING
| 4-10 | ||||||||||||||||||||||||||||||||||||
1928 | s->early_data_state = SSL_EARLY_DATA_READ_RETRY; | - | ||||||||||||||||||||||||||||||||||||
1929 | return executed 25 times by 1 test: ret > 0return ret > 0 ? 1 : 0; Executed by:
executed 25 times by 1 test: return ret > 0 ? 1 : 0; Executed by:
| 4-25 | ||||||||||||||||||||||||||||||||||||
1930 | : 0; executed 25 times by 1 test: return ret > 0 ? 1 : 0; Executed by:
| 25 | ||||||||||||||||||||||||||||||||||||
1931 | } | - | ||||||||||||||||||||||||||||||||||||
1932 | } executed 10 times by 1 test: else {end of block Executed by:
| 10 | ||||||||||||||||||||||||||||||||||||
1933 | s->early_data_state = SSL_EARLY_DATA_FINISHED_READING; | - | ||||||||||||||||||||||||||||||||||||
1934 | } executed 137 times by 1 test: end of block Executed by:
| 137 | ||||||||||||||||||||||||||||||||||||
1935 | *readbytes = 0; | - | ||||||||||||||||||||||||||||||||||||
1936 | return executed 147 times by 1 test: 2;return 2; Executed by:
executed 147 times by 1 test: return 2; Executed by:
| 147 | ||||||||||||||||||||||||||||||||||||
1937 | - | |||||||||||||||||||||||||||||||||||||
1938 | default executed 6 times by 1 test: :default: Executed by:
executed 6 times by 1 test: default: Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
1939 | ERR_put_error(20,(529),((2|64)),__FILE__,1836); | - | ||||||||||||||||||||||||||||||||||||
1940 | return executed 6 times by 1 test: 0;return 0; Executed by:
executed 6 times by 1 test: return 0; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
1941 | } | - | ||||||||||||||||||||||||||||||||||||
1942 | } | - | ||||||||||||||||||||||||||||||||||||
1943 | - | |||||||||||||||||||||||||||||||||||||
1944 | int SSL_get_early_data_status(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
1945 | { | - | ||||||||||||||||||||||||||||||||||||
1946 | return executed 162 times by 1 test: s->ext.early_data;return s->ext.early_data; Executed by:
executed 162 times by 1 test: return s->ext.early_data; Executed by:
| 162 | ||||||||||||||||||||||||||||||||||||
1947 | } | - | ||||||||||||||||||||||||||||||||||||
1948 | - | |||||||||||||||||||||||||||||||||||||
1949 | static int ssl_peek_internal(SSL *s, void *buf, size_t num, size_t *readbytes) | - | ||||||||||||||||||||||||||||||||||||
1950 | { | - | ||||||||||||||||||||||||||||||||||||
1951 | if (s->handshake_func ==
| 0 | ||||||||||||||||||||||||||||||||||||
1952 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1953 | ) { | - | ||||||||||||||||||||||||||||||||||||
1954 | ERR_put_error(20,(522),(276),__FILE__,1849); | - | ||||||||||||||||||||||||||||||||||||
1955 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1956 | } | - | ||||||||||||||||||||||||||||||||||||
1957 | - | |||||||||||||||||||||||||||||||||||||
1958 | if (s->shutdown & 2
| 0 | ||||||||||||||||||||||||||||||||||||
1959 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
1960 | } | - | ||||||||||||||||||||||||||||||||||||
1961 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
1962 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
1963 | ) { | - | ||||||||||||||||||||||||||||||||||||
1964 | struct ssl_async_args args; | - | ||||||||||||||||||||||||||||||||||||
1965 | int ret; | - | ||||||||||||||||||||||||||||||||||||
1966 | - | |||||||||||||||||||||||||||||||||||||
1967 | args.s = s; | - | ||||||||||||||||||||||||||||||||||||
1968 | args.buf = buf; | - | ||||||||||||||||||||||||||||||||||||
1969 | args.num = num; | - | ||||||||||||||||||||||||||||||||||||
1970 | args.type = READFUNC; | - | ||||||||||||||||||||||||||||||||||||
1971 | args.f.func_read = s->method->ssl_peek; | - | ||||||||||||||||||||||||||||||||||||
1972 | - | |||||||||||||||||||||||||||||||||||||
1973 | ret = ssl_start_async_job(s, &args, ssl_io_intern); | - | ||||||||||||||||||||||||||||||||||||
1974 | *readbytes = s->asyncrw; | - | ||||||||||||||||||||||||||||||||||||
1975 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
1976 | } else { | - | ||||||||||||||||||||||||||||||||||||
1977 | return never executed: s->method->ssl_peek(s, buf, num, readbytes);return s->method->ssl_peek(s, buf, num, readbytes); never executed: return s->method->ssl_peek(s, buf, num, readbytes); | 0 | ||||||||||||||||||||||||||||||||||||
1978 | } | - | ||||||||||||||||||||||||||||||||||||
1979 | } | - | ||||||||||||||||||||||||||||||||||||
1980 | - | |||||||||||||||||||||||||||||||||||||
1981 | int SSL_peek(SSL *s, void *buf, int num) | - | ||||||||||||||||||||||||||||||||||||
1982 | { | - | ||||||||||||||||||||||||||||||||||||
1983 | int ret; | - | ||||||||||||||||||||||||||||||||||||
1984 | size_t readbytes; | - | ||||||||||||||||||||||||||||||||||||
1985 | - | |||||||||||||||||||||||||||||||||||||
1986 | if (num < 0
| 0 | ||||||||||||||||||||||||||||||||||||
1987 | ERR_put_error(20,(270),(271),__FILE__,1880); | - | ||||||||||||||||||||||||||||||||||||
1988 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
1989 | } | - | ||||||||||||||||||||||||||||||||||||
1990 | - | |||||||||||||||||||||||||||||||||||||
1991 | ret = ssl_peek_internal(s, buf, (size_t)num, &readbytes); | - | ||||||||||||||||||||||||||||||||||||
1992 | - | |||||||||||||||||||||||||||||||||||||
1993 | - | |||||||||||||||||||||||||||||||||||||
1994 | - | |||||||||||||||||||||||||||||||||||||
1995 | - | |||||||||||||||||||||||||||||||||||||
1996 | - | |||||||||||||||||||||||||||||||||||||
1997 | if (ret > 0
| 0 | ||||||||||||||||||||||||||||||||||||
1998 | ret = (int)readbytes; never executed: ret = (int)readbytes; | 0 | ||||||||||||||||||||||||||||||||||||
1999 | - | |||||||||||||||||||||||||||||||||||||
2000 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
2001 | } | - | ||||||||||||||||||||||||||||||||||||
2002 | - | |||||||||||||||||||||||||||||||||||||
2003 | - | |||||||||||||||||||||||||||||||||||||
2004 | int SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *readbytes) | - | ||||||||||||||||||||||||||||||||||||
2005 | { | - | ||||||||||||||||||||||||||||||||||||
2006 | int ret = ssl_peek_internal(s, buf, num, readbytes); | - | ||||||||||||||||||||||||||||||||||||
2007 | - | |||||||||||||||||||||||||||||||||||||
2008 | if (ret < 0
| 0 | ||||||||||||||||||||||||||||||||||||
2009 | ret = 0; never executed: ret = 0; | 0 | ||||||||||||||||||||||||||||||||||||
2010 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
2011 | } | - | ||||||||||||||||||||||||||||||||||||
2012 | - | |||||||||||||||||||||||||||||||||||||
2013 | int ssl_write_internal(SSL *s, const void *buf, size_t num, size_t *written) | - | ||||||||||||||||||||||||||||||||||||
2014 | { | - | ||||||||||||||||||||||||||||||||||||
2015 | if (s->handshake_func ==
| 0-6416 | ||||||||||||||||||||||||||||||||||||
2016 | ((void *)0)
| 0-6416 | ||||||||||||||||||||||||||||||||||||
2017 | ) { | - | ||||||||||||||||||||||||||||||||||||
2018 | ERR_put_error(20,(524),(276),__FILE__,1909); | - | ||||||||||||||||||||||||||||||||||||
2019 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
2020 | } | - | ||||||||||||||||||||||||||||||||||||
2021 | - | |||||||||||||||||||||||||||||||||||||
2022 | if (s->shutdown & 1
| 11-6405 | ||||||||||||||||||||||||||||||||||||
2023 | s->rwstate = 1; | - | ||||||||||||||||||||||||||||||||||||
2024 | ERR_put_error(20,(524),(207),__FILE__,1915); | - | ||||||||||||||||||||||||||||||||||||
2025 | return executed 11 times by 1 test: -1;return -1; Executed by:
executed 11 times by 1 test: return -1; Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||
2026 | } | - | ||||||||||||||||||||||||||||||||||||
2027 | - | |||||||||||||||||||||||||||||||||||||
2028 | if (s->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY
| 0-6405 | ||||||||||||||||||||||||||||||||||||
2029 | || s->early_data_state == SSL_EARLY_DATA_ACCEPT_RETRY
| 0-6405 | ||||||||||||||||||||||||||||||||||||
2030 | || s->early_data_state == SSL_EARLY_DATA_READ_RETRY
| 0-6405 | ||||||||||||||||||||||||||||||||||||
2031 | ERR_put_error(20,(524),((2|64)),__FILE__,1922); | - | ||||||||||||||||||||||||||||||||||||
2032 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2033 | } | - | ||||||||||||||||||||||||||||||||||||
2034 | - | |||||||||||||||||||||||||||||||||||||
2035 | ossl_statem_check_finish_init(s, 1); | - | ||||||||||||||||||||||||||||||||||||
2036 | - | |||||||||||||||||||||||||||||||||||||
2037 | if ((
| 0-6405 | ||||||||||||||||||||||||||||||||||||
2038 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
2039 | ) { | - | ||||||||||||||||||||||||||||||||||||
2040 | int ret; | - | ||||||||||||||||||||||||||||||||||||
2041 | struct ssl_async_args args; | - | ||||||||||||||||||||||||||||||||||||
2042 | - | |||||||||||||||||||||||||||||||||||||
2043 | args.s = s; | - | ||||||||||||||||||||||||||||||||||||
2044 | args.buf = (void *)buf; | - | ||||||||||||||||||||||||||||||||||||
2045 | args.num = num; | - | ||||||||||||||||||||||||||||||||||||
2046 | args.type = WRITEFUNC; | - | ||||||||||||||||||||||||||||||||||||
2047 | args.f.func_write = s->method->ssl_write; | - | ||||||||||||||||||||||||||||||||||||
2048 | - | |||||||||||||||||||||||||||||||||||||
2049 | ret = ssl_start_async_job(s, &args, ssl_io_intern); | - | ||||||||||||||||||||||||||||||||||||
2050 | *written = s->asyncrw; | - | ||||||||||||||||||||||||||||||||||||
2051 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
2052 | } else { | - | ||||||||||||||||||||||||||||||||||||
2053 | return executed 6405 times by 1 test: s->method->ssl_write(s, buf, num, written);return s->method->ssl_write(s, buf, num, written); Executed by:
executed 6405 times by 1 test: return s->method->ssl_write(s, buf, num, written); Executed by:
| 6405 | ||||||||||||||||||||||||||||||||||||
2054 | } | - | ||||||||||||||||||||||||||||||||||||
2055 | } | - | ||||||||||||||||||||||||||||||||||||
2056 | - | |||||||||||||||||||||||||||||||||||||
2057 | int SSL_write(SSL *s, const void *buf, int num) | - | ||||||||||||||||||||||||||||||||||||
2058 | { | - | ||||||||||||||||||||||||||||||||||||
2059 | int ret; | - | ||||||||||||||||||||||||||||||||||||
2060 | size_t written; | - | ||||||||||||||||||||||||||||||||||||
2061 | - | |||||||||||||||||||||||||||||||||||||
2062 | if (num < 0
| 0-3371 | ||||||||||||||||||||||||||||||||||||
2063 | ERR_put_error(20,(208),(271),__FILE__,1952); | - | ||||||||||||||||||||||||||||||||||||
2064 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
2065 | } | - | ||||||||||||||||||||||||||||||||||||
2066 | - | |||||||||||||||||||||||||||||||||||||
2067 | ret = ssl_write_internal(s, buf, (size_t)num, &written); | - | ||||||||||||||||||||||||||||||||||||
2068 | - | |||||||||||||||||||||||||||||||||||||
2069 | - | |||||||||||||||||||||||||||||||||||||
2070 | - | |||||||||||||||||||||||||||||||||||||
2071 | - | |||||||||||||||||||||||||||||||||||||
2072 | - | |||||||||||||||||||||||||||||||||||||
2073 | if (ret > 0
| 78-3293 | ||||||||||||||||||||||||||||||||||||
2074 | ret = (int)written; executed 3293 times by 1 test: ret = (int)written; Executed by:
| 3293 | ||||||||||||||||||||||||||||||||||||
2075 | - | |||||||||||||||||||||||||||||||||||||
2076 | return executed 3371 times by 1 test: ret;return ret; Executed by:
executed 3371 times by 1 test: return ret; Executed by:
| 3371 | ||||||||||||||||||||||||||||||||||||
2077 | } | - | ||||||||||||||||||||||||||||||||||||
2078 | - | |||||||||||||||||||||||||||||||||||||
2079 | int SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *written) | - | ||||||||||||||||||||||||||||||||||||
2080 | { | - | ||||||||||||||||||||||||||||||||||||
2081 | int ret = ssl_write_internal(s, buf, num, written); | - | ||||||||||||||||||||||||||||||||||||
2082 | - | |||||||||||||||||||||||||||||||||||||
2083 | if (ret < 0
| 26-94 | ||||||||||||||||||||||||||||||||||||
2084 | ret = 0; executed 26 times by 1 test: ret = 0; Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||
2085 | return executed 120 times by 1 test: ret;return ret; Executed by:
executed 120 times by 1 test: return ret; Executed by:
| 120 | ||||||||||||||||||||||||||||||||||||
2086 | } | - | ||||||||||||||||||||||||||||||||||||
2087 | - | |||||||||||||||||||||||||||||||||||||
2088 | int SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written) | - | ||||||||||||||||||||||||||||||||||||
2089 | { | - | ||||||||||||||||||||||||||||||||||||
2090 | int ret, early_data_state; | - | ||||||||||||||||||||||||||||||||||||
2091 | size_t writtmp; | - | ||||||||||||||||||||||||||||||||||||
2092 | uint32_t partialwrite; | - | ||||||||||||||||||||||||||||||||||||
2093 | - | |||||||||||||||||||||||||||||||||||||
2094 | switch (s->early_data_state) { | - | ||||||||||||||||||||||||||||||||||||
2095 | case executed 53 times by 1 test: SSL_EARLY_DATA_NONE:case SSL_EARLY_DATA_NONE: Executed by:
executed 53 times by 1 test: case SSL_EARLY_DATA_NONE: Executed by:
| 53 | ||||||||||||||||||||||||||||||||||||
2096 | if (s->server
| 0-53 | ||||||||||||||||||||||||||||||||||||
2097 | || !SSL_in_before(s)
| 0-53 | ||||||||||||||||||||||||||||||||||||
2098 | || ((s->session ==
| 15-38 | ||||||||||||||||||||||||||||||||||||
2099 | ((void *)0)
| 15-38 | ||||||||||||||||||||||||||||||||||||
2100 | || s->session->ext.max_early_data == 0
| 0-38 | ||||||||||||||||||||||||||||||||||||
2101 | && (
| 0-15 | ||||||||||||||||||||||||||||||||||||
2102 | ((void *)0)
| 0-15 | ||||||||||||||||||||||||||||||||||||
2103 | )
| 0-15 | ||||||||||||||||||||||||||||||||||||
2104 | ERR_put_error(20,(526),((2|64)),__FILE__,1990) | - | ||||||||||||||||||||||||||||||||||||
2105 | ; | - | ||||||||||||||||||||||||||||||||||||
2106 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2107 | } | - | ||||||||||||||||||||||||||||||||||||
2108 | - | |||||||||||||||||||||||||||||||||||||
2109 | - | |||||||||||||||||||||||||||||||||||||
2110 | case never executed: case SSL_EARLY_DATA_CONNECT_RETRY: code before this statement executed 53 times by 1 test: case SSL_EARLY_DATA_CONNECT_RETRY: Executed by:
never executed: SSL_EARLY_DATA_CONNECT_RETRY:case SSL_EARLY_DATA_CONNECT_RETRY: code before this statement executed 53 times by 1 test: case SSL_EARLY_DATA_CONNECT_RETRY: Executed by:
never executed: case SSL_EARLY_DATA_CONNECT_RETRY: | 0-53 | ||||||||||||||||||||||||||||||||||||
2111 | s->early_data_state = SSL_EARLY_DATA_CONNECTING; | - | ||||||||||||||||||||||||||||||||||||
2112 | ret = SSL_connect(s); | - | ||||||||||||||||||||||||||||||||||||
2113 | if (ret <= 0
| 3-50 | ||||||||||||||||||||||||||||||||||||
2114 | - | |||||||||||||||||||||||||||||||||||||
2115 | s->early_data_state = SSL_EARLY_DATA_CONNECT_RETRY; | - | ||||||||||||||||||||||||||||||||||||
2116 | return executed 3 times by 1 test: 0;return 0; Executed by:
executed 3 times by 1 test: return 0; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
2117 | } | - | ||||||||||||||||||||||||||||||||||||
2118 | - | |||||||||||||||||||||||||||||||||||||
2119 | - | |||||||||||||||||||||||||||||||||||||
2120 | case executed 3 times by 1 test: SSL_EARLY_DATA_WRITE_RETRY:case SSL_EARLY_DATA_WRITE_RETRY: Executed by:
executed 3 times by 1 test: case SSL_EARLY_DATA_WRITE_RETRY: Executed by:
code before this statement executed 50 times by 1 test: case SSL_EARLY_DATA_WRITE_RETRY: Executed by:
| 3-50 | ||||||||||||||||||||||||||||||||||||
2121 | s->early_data_state = SSL_EARLY_DATA_WRITING; | - | ||||||||||||||||||||||||||||||||||||
2122 | - | |||||||||||||||||||||||||||||||||||||
2123 | - | |||||||||||||||||||||||||||||||||||||
2124 | - | |||||||||||||||||||||||||||||||||||||
2125 | - | |||||||||||||||||||||||||||||||||||||
2126 | - | |||||||||||||||||||||||||||||||||||||
2127 | partialwrite = s->mode & 0x00000001U; | - | ||||||||||||||||||||||||||||||||||||
2128 | s->mode &= ~0x00000001U; | - | ||||||||||||||||||||||||||||||||||||
2129 | ret = SSL_write_ex(s, buf, num, &writtmp); | - | ||||||||||||||||||||||||||||||||||||
2130 | s->mode |= partialwrite; | - | ||||||||||||||||||||||||||||||||||||
2131 | if (!ret
| 0-53 | ||||||||||||||||||||||||||||||||||||
2132 | s->early_data_state = SSL_EARLY_DATA_WRITE_RETRY; | - | ||||||||||||||||||||||||||||||||||||
2133 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
2134 | } | - | ||||||||||||||||||||||||||||||||||||
2135 | s->early_data_state = SSL_EARLY_DATA_WRITE_FLUSH; | - | ||||||||||||||||||||||||||||||||||||
2136 | - | |||||||||||||||||||||||||||||||||||||
2137 | - | |||||||||||||||||||||||||||||||||||||
2138 | case never executed: case SSL_EARLY_DATA_WRITE_FLUSH: code before this statement executed 53 times by 1 test: case SSL_EARLY_DATA_WRITE_FLUSH: Executed by:
never executed: SSL_EARLY_DATA_WRITE_FLUSH:case SSL_EARLY_DATA_WRITE_FLUSH: code before this statement executed 53 times by 1 test: case SSL_EARLY_DATA_WRITE_FLUSH: Executed by:
never executed: case SSL_EARLY_DATA_WRITE_FLUSH: | 0-53 | ||||||||||||||||||||||||||||||||||||
2139 | - | |||||||||||||||||||||||||||||||||||||
2140 | if (statem_flush(s) != 1
| 0-53 | ||||||||||||||||||||||||||||||||||||
2141 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2142 | *written = num; | - | ||||||||||||||||||||||||||||||||||||
2143 | s->early_data_state = SSL_EARLY_DATA_WRITE_RETRY; | - | ||||||||||||||||||||||||||||||||||||
2144 | return executed 53 times by 1 test: 1;return 1; Executed by:
executed 53 times by 1 test: return 1; Executed by:
| 53 | ||||||||||||||||||||||||||||||||||||
2145 | - | |||||||||||||||||||||||||||||||||||||
2146 | case executed 3 times by 1 test: SSL_EARLY_DATA_FINISHED_READING:case SSL_EARLY_DATA_FINISHED_READING: Executed by:
executed 3 times by 1 test: case SSL_EARLY_DATA_FINISHED_READING: Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
2147 | case executed 6 times by 1 test: SSL_EARLY_DATA_READ_RETRY:case SSL_EARLY_DATA_READ_RETRY: Executed by:
executed 6 times by 1 test: case SSL_EARLY_DATA_READ_RETRY: Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
2148 | early_data_state = s->early_data_state; | - | ||||||||||||||||||||||||||||||||||||
2149 | - | |||||||||||||||||||||||||||||||||||||
2150 | s->early_data_state = SSL_EARLY_DATA_UNAUTH_WRITING; | - | ||||||||||||||||||||||||||||||||||||
2151 | ret = SSL_write_ex(s, buf, num, written); | - | ||||||||||||||||||||||||||||||||||||
2152 | - | |||||||||||||||||||||||||||||||||||||
2153 | if (ret
| 0-9 | ||||||||||||||||||||||||||||||||||||
2154 | ( executed 9 times by 1 test: void)(int)BIO_ctrl(s->wbio,11,0,(void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) ); Executed by:
executed 9 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) ); Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
2155 | ((void *)0) executed 9 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) ); Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
2156 | ); executed 9 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) ); Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
2157 | s->early_data_state = early_data_state; | - | ||||||||||||||||||||||||||||||||||||
2158 | return executed 9 times by 1 test: ret;return ret; Executed by:
executed 9 times by 1 test: return ret; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
2159 | - | |||||||||||||||||||||||||||||||||||||
2160 | default executed 6 times by 1 test: :default: Executed by:
executed 6 times by 1 test: default: Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
2161 | ERR_put_error(20,(526),((2|64)),__FILE__,2044); | - | ||||||||||||||||||||||||||||||||||||
2162 | return executed 6 times by 1 test: 0;return 0; Executed by:
executed 6 times by 1 test: return 0; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
2163 | } | - | ||||||||||||||||||||||||||||||||||||
2164 | } | - | ||||||||||||||||||||||||||||||||||||
2165 | - | |||||||||||||||||||||||||||||||||||||
2166 | int SSL_shutdown(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2167 | { | - | ||||||||||||||||||||||||||||||||||||
2168 | - | |||||||||||||||||||||||||||||||||||||
2169 | - | |||||||||||||||||||||||||||||||||||||
2170 | - | |||||||||||||||||||||||||||||||||||||
2171 | - | |||||||||||||||||||||||||||||||||||||
2172 | - | |||||||||||||||||||||||||||||||||||||
2173 | - | |||||||||||||||||||||||||||||||||||||
2174 | - | |||||||||||||||||||||||||||||||||||||
2175 | if (s->handshake_func ==
| 4-4751 | ||||||||||||||||||||||||||||||||||||
2176 | ((void *)0)
| 4-4751 | ||||||||||||||||||||||||||||||||||||
2177 | ) { | - | ||||||||||||||||||||||||||||||||||||
2178 | ERR_put_error(20,(224),(276),__FILE__,2059); | - | ||||||||||||||||||||||||||||||||||||
2179 | return executed 4 times by 1 test: -1;return -1; Executed by:
executed 4 times by 1 test: return -1; Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
2180 | } | - | ||||||||||||||||||||||||||||||||||||
2181 | - | |||||||||||||||||||||||||||||||||||||
2182 | if (!SSL_in_init(s)
| 160-4591 | ||||||||||||||||||||||||||||||||||||
2183 | if ((
| 0-4591 | ||||||||||||||||||||||||||||||||||||
2184 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
2185 | ) { | - | ||||||||||||||||||||||||||||||||||||
2186 | struct ssl_async_args args; | - | ||||||||||||||||||||||||||||||||||||
2187 | - | |||||||||||||||||||||||||||||||||||||
2188 | args.s = s; | - | ||||||||||||||||||||||||||||||||||||
2189 | args.type = OTHERFUNC; | - | ||||||||||||||||||||||||||||||||||||
2190 | args.f.func_other = s->method->ssl_shutdown; | - | ||||||||||||||||||||||||||||||||||||
2191 | - | |||||||||||||||||||||||||||||||||||||
2192 | return never executed: ssl_start_async_job(s, &args, ssl_io_intern);return ssl_start_async_job(s, &args, ssl_io_intern); never executed: return ssl_start_async_job(s, &args, ssl_io_intern); | 0 | ||||||||||||||||||||||||||||||||||||
2193 | } else { | - | ||||||||||||||||||||||||||||||||||||
2194 | return executed 4591 times by 1 test: s->method->ssl_shutdown(s);return s->method->ssl_shutdown(s); Executed by:
executed 4591 times by 1 test: return s->method->ssl_shutdown(s); Executed by:
| 4591 | ||||||||||||||||||||||||||||||||||||
2195 | } | - | ||||||||||||||||||||||||||||||||||||
2196 | } else { | - | ||||||||||||||||||||||||||||||||||||
2197 | ERR_put_error(20,(224),(407),__FILE__,2076); | - | ||||||||||||||||||||||||||||||||||||
2198 | return executed 160 times by 1 test: -1;return -1; Executed by:
executed 160 times by 1 test: return -1; Executed by:
| 160 | ||||||||||||||||||||||||||||||||||||
2199 | } | - | ||||||||||||||||||||||||||||||||||||
2200 | } | - | ||||||||||||||||||||||||||||||||||||
2201 | - | |||||||||||||||||||||||||||||||||||||
2202 | int SSL_key_update(SSL *s, int updatetype) | - | ||||||||||||||||||||||||||||||||||||
2203 | { | - | ||||||||||||||||||||||||||||||||||||
2204 | - | |||||||||||||||||||||||||||||||||||||
2205 | - | |||||||||||||||||||||||||||||||||||||
2206 | - | |||||||||||||||||||||||||||||||||||||
2207 | - | |||||||||||||||||||||||||||||||||||||
2208 | - | |||||||||||||||||||||||||||||||||||||
2209 | if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
| 0-6 | ||||||||||||||||||||||||||||||||||||
2210 | ERR_put_error(20,(515),(266),__FILE__,2089); | - | ||||||||||||||||||||||||||||||||||||
2211 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2212 | } | - | ||||||||||||||||||||||||||||||||||||
2213 | - | |||||||||||||||||||||||||||||||||||||
2214 | if (updatetype != 0
| 3 | ||||||||||||||||||||||||||||||||||||
2215 | && updatetype != 1
| 0-3 | ||||||||||||||||||||||||||||||||||||
2216 | ERR_put_error(20,(515),(120),__FILE__,2095); | - | ||||||||||||||||||||||||||||||||||||
2217 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2218 | } | - | ||||||||||||||||||||||||||||||||||||
2219 | - | |||||||||||||||||||||||||||||||||||||
2220 | if (!SSL_is_init_finished(s)
| 0-6 | ||||||||||||||||||||||||||||||||||||
2221 | ERR_put_error(20,(515),(121),__FILE__,2100); | - | ||||||||||||||||||||||||||||||||||||
2222 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2223 | } | - | ||||||||||||||||||||||||||||||||||||
2224 | - | |||||||||||||||||||||||||||||||||||||
2225 | ossl_statem_set_in_init(s, 1); | - | ||||||||||||||||||||||||||||||||||||
2226 | s->key_update = updatetype; | - | ||||||||||||||||||||||||||||||||||||
2227 | return executed 6 times by 1 test: 1;return 1; Executed by:
executed 6 times by 1 test: return 1; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
2228 | } | - | ||||||||||||||||||||||||||||||||||||
2229 | - | |||||||||||||||||||||||||||||||||||||
2230 | int SSL_get_key_update_type(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2231 | { | - | ||||||||||||||||||||||||||||||||||||
2232 | return executed 191 times by 1 test: s->key_update;return s->key_update; Executed by:
executed 191 times by 1 test: return s->key_update; Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
2233 | } | - | ||||||||||||||||||||||||||||||||||||
2234 | - | |||||||||||||||||||||||||||||||||||||
2235 | int SSL_renegotiate(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2236 | { | - | ||||||||||||||||||||||||||||||||||||
2237 | if ((!(s->method->ssl3_enc->enc_flags & 0x8)
| 0-14 | ||||||||||||||||||||||||||||||||||||
2238 | ERR_put_error(20,(516),(266),__FILE__,2117); | - | ||||||||||||||||||||||||||||||||||||
2239 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2240 | } | - | ||||||||||||||||||||||||||||||||||||
2241 | - | |||||||||||||||||||||||||||||||||||||
2242 | if ((
| 1-23 | ||||||||||||||||||||||||||||||||||||
2243 | ERR_put_error(20,(516),(339),__FILE__,2122); | - | ||||||||||||||||||||||||||||||||||||
2244 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
2245 | } | - | ||||||||||||||||||||||||||||||||||||
2246 | - | |||||||||||||||||||||||||||||||||||||
2247 | s->renegotiate = 1; | - | ||||||||||||||||||||||||||||||||||||
2248 | s->new_session = 1; | - | ||||||||||||||||||||||||||||||||||||
2249 | - | |||||||||||||||||||||||||||||||||||||
2250 | return executed 23 times by 1 test: s->method->ssl_renegotiate(s);return s->method->ssl_renegotiate(s); Executed by:
executed 23 times by 1 test: return s->method->ssl_renegotiate(s); Executed by:
| 23 | ||||||||||||||||||||||||||||||||||||
2251 | } | - | ||||||||||||||||||||||||||||||||||||
2252 | - | |||||||||||||||||||||||||||||||||||||
2253 | int SSL_renegotiate_abbreviated(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2254 | { | - | ||||||||||||||||||||||||||||||||||||
2255 | if ((!(s->method->ssl3_enc->enc_flags & 0x8)
| 0-8 | ||||||||||||||||||||||||||||||||||||
2256 | ERR_put_error(20,(546),(266),__FILE__,2135); | - | ||||||||||||||||||||||||||||||||||||
2257 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2258 | } | - | ||||||||||||||||||||||||||||||||||||
2259 | - | |||||||||||||||||||||||||||||||||||||
2260 | if ((
| 1-9 | ||||||||||||||||||||||||||||||||||||
2261 | ERR_put_error(20,(546),(339),__FILE__,2140); | - | ||||||||||||||||||||||||||||||||||||
2262 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
2263 | } | - | ||||||||||||||||||||||||||||||||||||
2264 | - | |||||||||||||||||||||||||||||||||||||
2265 | s->renegotiate = 1; | - | ||||||||||||||||||||||||||||||||||||
2266 | s->new_session = 0; | - | ||||||||||||||||||||||||||||||||||||
2267 | - | |||||||||||||||||||||||||||||||||||||
2268 | return executed 9 times by 1 test: s->method->ssl_renegotiate(s);return s->method->ssl_renegotiate(s); Executed by:
executed 9 times by 1 test: return s->method->ssl_renegotiate(s); Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
2269 | } | - | ||||||||||||||||||||||||||||||||||||
2270 | - | |||||||||||||||||||||||||||||||||||||
2271 | int SSL_renegotiate_pending(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2272 | { | - | ||||||||||||||||||||||||||||||||||||
2273 | - | |||||||||||||||||||||||||||||||||||||
2274 | - | |||||||||||||||||||||||||||||||||||||
2275 | - | |||||||||||||||||||||||||||||||||||||
2276 | - | |||||||||||||||||||||||||||||||||||||
2277 | return executed 31 times by 1 test: (s->renegotiate != 0);return (s->renegotiate != 0); Executed by:
executed 31 times by 1 test: return (s->renegotiate != 0); Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||
2278 | } | - | ||||||||||||||||||||||||||||||||||||
2279 | - | |||||||||||||||||||||||||||||||||||||
2280 | long SSL_ctrl(SSL *s, int cmd, long larg, void *parg) | - | ||||||||||||||||||||||||||||||||||||
2281 | { | - | ||||||||||||||||||||||||||||||||||||
2282 | long l; | - | ||||||||||||||||||||||||||||||||||||
2283 | - | |||||||||||||||||||||||||||||||||||||
2284 | switch (cmd) { | - | ||||||||||||||||||||||||||||||||||||
2285 | case never executed: 40:case 40: never executed: case 40: | 0 | ||||||||||||||||||||||||||||||||||||
2286 | return never executed: ((&s->rlayer)->read_ahead);return ((&s->rlayer)->read_ahead); never executed: return ((&s->rlayer)->read_ahead); | 0 | ||||||||||||||||||||||||||||||||||||
2287 | case never executed: 41:case 41: never executed: case 41: | 0 | ||||||||||||||||||||||||||||||||||||
2288 | l = ((&s->rlayer)->read_ahead); | - | ||||||||||||||||||||||||||||||||||||
2289 | ((&s->rlayer)->read_ahead = (larg)); | - | ||||||||||||||||||||||||||||||||||||
2290 | return never executed: l;return l; never executed: return l; | 0 | ||||||||||||||||||||||||||||||||||||
2291 | - | |||||||||||||||||||||||||||||||||||||
2292 | case never executed: 16:case 16: never executed: case 16: | 0 | ||||||||||||||||||||||||||||||||||||
2293 | s->msg_callback_arg = parg; | - | ||||||||||||||||||||||||||||||||||||
2294 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2295 | - | |||||||||||||||||||||||||||||||||||||
2296 | case executed 1 time by 1 test: 33:case 33: Executed by:
executed 1 time by 1 test: case 33: Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
2297 | return executed 1 time by 1 test: (s->mode |= larg);return (s->mode |= larg); Executed by:
executed 1 time by 1 test: return (s->mode |= larg); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
2298 | case never executed: 78:case 78: never executed: case 78: | 0 | ||||||||||||||||||||||||||||||||||||
2299 | return never executed: (s->mode &= ~larg);return (s->mode &= ~larg); never executed: return (s->mode &= ~larg); | 0 | ||||||||||||||||||||||||||||||||||||
2300 | case never executed: 50:case 50: never executed: case 50: | 0 | ||||||||||||||||||||||||||||||||||||
2301 | return never executed: (long)s->max_cert_list;return (long)s->max_cert_list; never executed: return (long)s->max_cert_list; | 0 | ||||||||||||||||||||||||||||||||||||
2302 | case never executed: 51:case 51: never executed: case 51: | 0 | ||||||||||||||||||||||||||||||||||||
2303 | if (larg < 0
| 0 | ||||||||||||||||||||||||||||||||||||
2304 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2305 | l = (long)s->max_cert_list; | - | ||||||||||||||||||||||||||||||||||||
2306 | s->max_cert_list = (size_t)larg; | - | ||||||||||||||||||||||||||||||||||||
2307 | return never executed: l;return l; never executed: return l; | 0 | ||||||||||||||||||||||||||||||||||||
2308 | case executed 396 times by 1 test: 52:case 52: Executed by:
executed 396 times by 1 test: case 52: Executed by:
| 396 | ||||||||||||||||||||||||||||||||||||
2309 | if (larg < 512
| 0-396 | ||||||||||||||||||||||||||||||||||||
2310 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2311 | s->max_send_fragment = larg; | - | ||||||||||||||||||||||||||||||||||||
2312 | if (s->max_send_fragment < s->split_send_fragment
| 0-396 | ||||||||||||||||||||||||||||||||||||
2313 | s->split_send_fragment = s->max_send_fragment; executed 396 times by 1 test: s->split_send_fragment = s->max_send_fragment; Executed by:
| 396 | ||||||||||||||||||||||||||||||||||||
2314 | return executed 396 times by 1 test: 1;return 1; Executed by:
executed 396 times by 1 test: return 1; Executed by:
| 396 | ||||||||||||||||||||||||||||||||||||
2315 | case never executed: 125:case 125: never executed: case 125: | 0 | ||||||||||||||||||||||||||||||||||||
2316 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
2317 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2318 | s->split_send_fragment = larg; | - | ||||||||||||||||||||||||||||||||||||
2319 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2320 | case never executed: 126:case 126: never executed: case 126: | 0 | ||||||||||||||||||||||||||||||||||||
2321 | if (larg < 1
| 0 | ||||||||||||||||||||||||||||||||||||
2322 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2323 | s->max_pipelines = larg; | - | ||||||||||||||||||||||||||||||||||||
2324 | if (larg > 1
| 0 | ||||||||||||||||||||||||||||||||||||
2325 | (( never executed: &s->rlayer)->read_ahead = (1));((&s->rlayer)->read_ahead = (1)); never executed: ((&s->rlayer)->read_ahead = (1)); | 0 | ||||||||||||||||||||||||||||||||||||
2326 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2327 | case executed 191 times by 1 test: 76:case 76: Executed by:
executed 191 times by 1 test: case 76: Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
2328 | if (s->s3
| 0-191 | ||||||||||||||||||||||||||||||||||||
2329 | return executed 191 times by 1 test: s->s3->send_connection_binding;return s->s3->send_connection_binding; Executed by:
executed 191 times by 1 test: return s->s3->send_connection_binding; Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
2330 | else | - | ||||||||||||||||||||||||||||||||||||
2331 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2332 | case never executed: 99:case 99: never executed: case 99: | 0 | ||||||||||||||||||||||||||||||||||||
2333 | return never executed: (s->cert->cert_flags |= larg);return (s->cert->cert_flags |= larg); never executed: return (s->cert->cert_flags |= larg); | 0 | ||||||||||||||||||||||||||||||||||||
2334 | case never executed: 100:case 100: never executed: case 100: | 0 | ||||||||||||||||||||||||||||||||||||
2335 | return never executed: (s->cert->cert_flags &= ~larg);return (s->cert->cert_flags &= ~larg); never executed: return (s->cert->cert_flags &= ~larg); | 0 | ||||||||||||||||||||||||||||||||||||
2336 | - | |||||||||||||||||||||||||||||||||||||
2337 | case executed 240 times by 1 test: 110:case 110: Executed by:
executed 240 times by 1 test: case 110: Executed by:
| 240 | ||||||||||||||||||||||||||||||||||||
2338 | if (parg
| 120 | ||||||||||||||||||||||||||||||||||||
2339 | if (s->s3->tmp.ciphers_raw ==
| 0-120 | ||||||||||||||||||||||||||||||||||||
2340 | ((void *)0)
| 0-120 | ||||||||||||||||||||||||||||||||||||
2341 | ) | - | ||||||||||||||||||||||||||||||||||||
2342 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2343 | *(unsigned char **)parg = s->s3->tmp.ciphers_raw; | - | ||||||||||||||||||||||||||||||||||||
2344 | return executed 120 times by 1 test: (int)s->s3->tmp.ciphers_rawlen;return (int)s->s3->tmp.ciphers_rawlen; Executed by:
executed 120 times by 1 test: return (int)s->s3->tmp.ciphers_rawlen; Executed by:
| 120 | ||||||||||||||||||||||||||||||||||||
2345 | } else { | - | ||||||||||||||||||||||||||||||||||||
2346 | return executed 120 times by 1 test: 2;return 2; Executed by:
executed 120 times by 1 test: return 2; Executed by:
| 120 | ||||||||||||||||||||||||||||||||||||
2347 | } | - | ||||||||||||||||||||||||||||||||||||
2348 | case never executed: 122:case 122: never executed: case 122: | 0 | ||||||||||||||||||||||||||||||||||||
2349 | if (!s->session
| 0 | ||||||||||||||||||||||||||||||||||||
2350 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
2351 | if (s->session->flags & 0x1
| 0 | ||||||||||||||||||||||||||||||||||||
2352 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2353 | else | - | ||||||||||||||||||||||||||||||||||||
2354 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2355 | case executed 2314 times by 1 test: 123:case 123: Executed by:
executed 2314 times by 1 test: case 123: Executed by:
| 2314 | ||||||||||||||||||||||||||||||||||||
2356 | return executed 2314 times by 1 test: ssl_check_allowed_versions(larg, s->max_proto_version)return ssl_check_allowed_versions(larg, s->max_proto_version) && ssl_set_version_bound(s->ctx->method->version, (int)larg, &s->min_proto_version); Executed by:
executed 2314 times by 1 test: return ssl_check_allowed_versions(larg, s->max_proto_version) && ssl_set_version_bound(s->ctx->method->version, (int)larg, &s->min_proto_version); Executed by:
| 0-2314 | ||||||||||||||||||||||||||||||||||||
2357 | && ssl_set_version_bound(s->ctx->method->version, (int)larg,
executed 2314 times by 1 test: return ssl_check_allowed_versions(larg, s->max_proto_version) && ssl_set_version_bound(s->ctx->method->version, (int)larg, &s->min_proto_version); Executed by:
| 0-2314 | ||||||||||||||||||||||||||||||||||||
2358 | &s->min_proto_version)
executed 2314 times by 1 test: return ssl_check_allowed_versions(larg, s->max_proto_version) && ssl_set_version_bound(s->ctx->method->version, (int)larg, &s->min_proto_version); Executed by:
| 0-2314 | ||||||||||||||||||||||||||||||||||||
2359 | case never executed: 130:case 130: never executed: case 130: | 0 | ||||||||||||||||||||||||||||||||||||
2360 | return never executed: s->min_proto_version;return s->min_proto_version; never executed: return s->min_proto_version; | 0 | ||||||||||||||||||||||||||||||||||||
2361 | case executed 4 times by 1 test: 124:case 124: Executed by:
executed 4 times by 1 test: case 124: Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
2362 | return executed 4 times by 1 test: ssl_check_allowed_versions(s->min_proto_version, larg)return ssl_check_allowed_versions(s->min_proto_version, larg) && ssl_set_version_bound(s->ctx->method->version, (int)larg, &s->max_proto_version); Executed by:
executed 4 times by 1 test: return ssl_check_allowed_versions(s->min_proto_version, larg) && ssl_set_version_bound(s->ctx->method->version, (int)larg, &s->max_proto_version); Executed by:
| 0-4 | ||||||||||||||||||||||||||||||||||||
2363 | && ssl_set_version_bound(s->ctx->method->version, (int)larg,
executed 4 times by 1 test: return ssl_check_allowed_versions(s->min_proto_version, larg) && ssl_set_version_bound(s->ctx->method->version, (int)larg, &s->max_proto_version); Executed by:
| 0-4 | ||||||||||||||||||||||||||||||||||||
2364 | &s->max_proto_version)
executed 4 times by 1 test: return ssl_check_allowed_versions(s->min_proto_version, larg) && ssl_set_version_bound(s->ctx->method->version, (int)larg, &s->max_proto_version); Executed by:
| 0-4 | ||||||||||||||||||||||||||||||||||||
2365 | case never executed: 131:case 131: never executed: case 131: | 0 | ||||||||||||||||||||||||||||||||||||
2366 | return never executed: s->max_proto_version;return s->max_proto_version; never executed: return s->max_proto_version; | 0 | ||||||||||||||||||||||||||||||||||||
2367 | default executed 8649 times by 1 test: :default: Executed by:
executed 8649 times by 1 test: default: Executed by:
| 8649 | ||||||||||||||||||||||||||||||||||||
2368 | return executed 8649 times by 1 test: s->method->ssl_ctrl(s, cmd, larg, parg);return s->method->ssl_ctrl(s, cmd, larg, parg); Executed by:
executed 8649 times by 1 test: return s->method->ssl_ctrl(s, cmd, larg, parg); Executed by:
| 8649 | ||||||||||||||||||||||||||||||||||||
2369 | } | - | ||||||||||||||||||||||||||||||||||||
2370 | } | - | ||||||||||||||||||||||||||||||||||||
2371 | - | |||||||||||||||||||||||||||||||||||||
2372 | long SSL_callback_ctrl(SSL *s, int cmd, void (*fp) (void)) | - | ||||||||||||||||||||||||||||||||||||
2373 | { | - | ||||||||||||||||||||||||||||||||||||
2374 | switch (cmd) { | - | ||||||||||||||||||||||||||||||||||||
2375 | case never executed: 15:case 15: never executed: case 15: | 0 | ||||||||||||||||||||||||||||||||||||
2376 | s->msg_callback = (void (*) | - | ||||||||||||||||||||||||||||||||||||
2377 | (int write_p, int version, int content_type, | - | ||||||||||||||||||||||||||||||||||||
2378 | const void *buf, size_t len, SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
2379 | void *arg))(fp); | - | ||||||||||||||||||||||||||||||||||||
2380 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2381 | - | |||||||||||||||||||||||||||||||||||||
2382 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
2383 | return never executed: s->method->ssl_callback_ctrl(s, cmd, fp);return s->method->ssl_callback_ctrl(s, cmd, fp); never executed: return s->method->ssl_callback_ctrl(s, cmd, fp); | 0 | ||||||||||||||||||||||||||||||||||||
2384 | } | - | ||||||||||||||||||||||||||||||||||||
2385 | } | - | ||||||||||||||||||||||||||||||||||||
2386 | - | |||||||||||||||||||||||||||||||||||||
2387 | struct lhash_st_SSL_SESSION *SSL_CTX_sessions(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
2388 | { | - | ||||||||||||||||||||||||||||||||||||
2389 | return never executed: ctx->sessions;return ctx->sessions; never executed: return ctx->sessions; | 0 | ||||||||||||||||||||||||||||||||||||
2390 | } | - | ||||||||||||||||||||||||||||||||||||
2391 | - | |||||||||||||||||||||||||||||||||||||
2392 | long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) | - | ||||||||||||||||||||||||||||||||||||
2393 | { | - | ||||||||||||||||||||||||||||||||||||
2394 | long l; | - | ||||||||||||||||||||||||||||||||||||
2395 | - | |||||||||||||||||||||||||||||||||||||
2396 | if (ctx ==
| 0-18659 | ||||||||||||||||||||||||||||||||||||
2397 | ((void *)0)
| 0-18659 | ||||||||||||||||||||||||||||||||||||
2398 | ) { | - | ||||||||||||||||||||||||||||||||||||
2399 | switch (cmd) { | - | ||||||||||||||||||||||||||||||||||||
2400 | - | |||||||||||||||||||||||||||||||||||||
2401 | case never executed: 92:case 92: never executed: case 92: | 0 | ||||||||||||||||||||||||||||||||||||
2402 | return never executed: tls1_set_groups_list(return tls1_set_groups_list( ((void *)0) , ((void *)0) , parg); never executed: return tls1_set_groups_list( ((void *)0) , ((void *)0) , parg); | 0 | ||||||||||||||||||||||||||||||||||||
2403 | ((void *)0) never executed: return tls1_set_groups_list( ((void *)0) , ((void *)0) , parg); | 0 | ||||||||||||||||||||||||||||||||||||
2404 | , never executed: return tls1_set_groups_list( ((void *)0) , ((void *)0) , parg); | 0 | ||||||||||||||||||||||||||||||||||||
2405 | ((void *)0) never executed: return tls1_set_groups_list( ((void *)0) , ((void *)0) , parg); | 0 | ||||||||||||||||||||||||||||||||||||
2406 | , parg); never executed: return tls1_set_groups_list( ((void *)0) , ((void *)0) , parg); | 0 | ||||||||||||||||||||||||||||||||||||
2407 | - | |||||||||||||||||||||||||||||||||||||
2408 | case never executed: 98:case 98: never executed: case 98: | 0 | ||||||||||||||||||||||||||||||||||||
2409 | case never executed: 102:case 102: never executed: case 102: | 0 | ||||||||||||||||||||||||||||||||||||
2410 | return never executed: tls1_set_sigalgs_list(return tls1_set_sigalgs_list( ((void *)0) , parg, 0); never executed: return tls1_set_sigalgs_list( ((void *)0) , parg, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2411 | ((void *)0) never executed: return tls1_set_sigalgs_list( ((void *)0) , parg, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2412 | , parg, 0); never executed: return tls1_set_sigalgs_list( ((void *)0) , parg, 0); | 0 | ||||||||||||||||||||||||||||||||||||
2413 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
2414 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2415 | } | - | ||||||||||||||||||||||||||||||||||||
2416 | } | - | ||||||||||||||||||||||||||||||||||||
2417 | - | |||||||||||||||||||||||||||||||||||||
2418 | switch (cmd) { | - | ||||||||||||||||||||||||||||||||||||
2419 | case never executed: 40:case 40: never executed: case 40: | 0 | ||||||||||||||||||||||||||||||||||||
2420 | return never executed: ctx->read_ahead;return ctx->read_ahead; never executed: return ctx->read_ahead; | 0 | ||||||||||||||||||||||||||||||||||||
2421 | case executed 31 times by 1 test: 41:case 41: Executed by:
executed 31 times by 1 test: case 41: Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||
2422 | l = ctx->read_ahead; | - | ||||||||||||||||||||||||||||||||||||
2423 | ctx->read_ahead = larg; | - | ||||||||||||||||||||||||||||||||||||
2424 | return executed 31 times by 1 test: l;return l; Executed by:
executed 31 times by 1 test: return l; Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||
2425 | - | |||||||||||||||||||||||||||||||||||||
2426 | case never executed: 16:case 16: never executed: case 16: | 0 | ||||||||||||||||||||||||||||||||||||
2427 | ctx->msg_callback_arg = parg; | - | ||||||||||||||||||||||||||||||||||||
2428 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2429 | - | |||||||||||||||||||||||||||||||||||||
2430 | case never executed: 50:case 50: never executed: case 50: | 0 | ||||||||||||||||||||||||||||||||||||
2431 | return never executed: (long)ctx->max_cert_list;return (long)ctx->max_cert_list; never executed: return (long)ctx->max_cert_list; | 0 | ||||||||||||||||||||||||||||||||||||
2432 | case never executed: 51:case 51: never executed: case 51: | 0 | ||||||||||||||||||||||||||||||||||||
2433 | if (larg < 0
| 0 | ||||||||||||||||||||||||||||||||||||
2434 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2435 | l = (long)ctx->max_cert_list; | - | ||||||||||||||||||||||||||||||||||||
2436 | ctx->max_cert_list = (size_t)larg; | - | ||||||||||||||||||||||||||||||||||||
2437 | return never executed: l;return l; never executed: return l; | 0 | ||||||||||||||||||||||||||||||||||||
2438 | - | |||||||||||||||||||||||||||||||||||||
2439 | case never executed: 42:case 42: never executed: case 42: | 0 | ||||||||||||||||||||||||||||||||||||
2440 | if (larg < 0
| 0 | ||||||||||||||||||||||||||||||||||||
2441 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2442 | l = (long)ctx->session_cache_size; | - | ||||||||||||||||||||||||||||||||||||
2443 | ctx->session_cache_size = (size_t)larg; | - | ||||||||||||||||||||||||||||||||||||
2444 | return never executed: l;return l; never executed: return l; | 0 | ||||||||||||||||||||||||||||||||||||
2445 | case executed 858 times by 1 test: 43:case 43: Executed by:
executed 858 times by 1 test: case 43: Executed by:
| 858 | ||||||||||||||||||||||||||||||||||||
2446 | return executed 858 times by 1 test: (long)ctx->session_cache_size;return (long)ctx->session_cache_size; Executed by:
executed 858 times by 1 test: return (long)ctx->session_cache_size; Executed by:
| 858 | ||||||||||||||||||||||||||||||||||||
2447 | case executed 418 times by 1 test: 44:case 44: Executed by:
executed 418 times by 1 test: case 44: Executed by:
| 418 | ||||||||||||||||||||||||||||||||||||
2448 | l = ctx->session_cache_mode; | - | ||||||||||||||||||||||||||||||||||||
2449 | ctx->session_cache_mode = larg; | - | ||||||||||||||||||||||||||||||||||||
2450 | return executed 418 times by 1 test: l;return l; Executed by:
executed 418 times by 1 test: return l; Executed by:
| 418 | ||||||||||||||||||||||||||||||||||||
2451 | case never executed: 45:case 45: never executed: case 45: | 0 | ||||||||||||||||||||||||||||||||||||
2452 | return never executed: ctx->session_cache_mode;return ctx->session_cache_mode; never executed: return ctx->session_cache_mode; | 0 | ||||||||||||||||||||||||||||||||||||
2453 | - | |||||||||||||||||||||||||||||||||||||
2454 | case executed 517 times by 1 test: 20:case 20: Executed by:
executed 517 times by 1 test: case 20: Executed by:
| 517 | ||||||||||||||||||||||||||||||||||||
2455 | return executed 517 times by 1 test: lh_SSL_SESSION_num_items(ctx->sessions);return lh_SSL_SESSION_num_items(ctx->sessions); Executed by:
executed 517 times by 1 test: return lh_SSL_SESSION_num_items(ctx->sessions); Executed by:
| 517 | ||||||||||||||||||||||||||||||||||||
2456 | case executed 176 times by 1 test: 21:case 21: Executed by:
executed 176 times by 1 test: case 21: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2457 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2458 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2459 | (&ctx->stats.sess_connect) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2460 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2461 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2462 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2463 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2464 | case executed 176 times by 1 test: 22:case 22: Executed by:
executed 176 times by 1 test: case 22: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2465 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2466 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2467 | (&ctx->stats.sess_connect_good) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2468 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2469 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2470 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2471 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2472 | case executed 176 times by 1 test: 23:case 23: Executed by:
executed 176 times by 1 test: case 23: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2473 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2474 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2475 | (&ctx->stats.sess_connect_renegotiate) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2476 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2477 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2478 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2479 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_connect_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2480 | case executed 176 times by 1 test: 24:case 24: Executed by:
executed 176 times by 1 test: case 24: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2481 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2482 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2483 | (&ctx->stats.sess_accept) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2484 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2485 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2486 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2487 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2488 | case executed 176 times by 1 test: 25:case 25: Executed by:
executed 176 times by 1 test: case 25: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2489 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2490 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2491 | (&ctx->stats.sess_accept_good) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2492 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2493 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2494 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2495 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_good) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2496 | case executed 176 times by 1 test: 26:case 26: Executed by:
executed 176 times by 1 test: case 26: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2497 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2498 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2499 | (&ctx->stats.sess_accept_renegotiate) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2500 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2501 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2502 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2503 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_accept_renegotiate) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2504 | case executed 176 times by 1 test: 27:case 27: Executed by:
executed 176 times by 1 test: case 27: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2505 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2506 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2507 | (&ctx->stats.sess_hit) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2508 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2509 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2510 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2511 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2512 | case executed 176 times by 1 test: 28:case 28: Executed by:
executed 176 times by 1 test: case 28: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2513 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cb_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cb_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2514 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cb_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2515 | (&ctx->stats.sess_cb_hit) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cb_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2516 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cb_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2517 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cb_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2518 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cb_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2519 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cb_hit) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2520 | case executed 176 times by 1 test: 29:case 29: Executed by:
executed 176 times by 1 test: case 29: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2521 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_miss) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_miss) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2522 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_miss) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2523 | (&ctx->stats.sess_miss) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_miss) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2524 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_miss) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2525 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_miss) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2526 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_miss) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2527 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_miss) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2528 | case executed 176 times by 1 test: 30:case 30: Executed by:
executed 176 times by 1 test: case 30: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2529 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_timeout) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_timeout) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2530 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_timeout) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2531 | (&ctx->stats.sess_timeout) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_timeout) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2532 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_timeout) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2533 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_timeout) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2534 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_timeout) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2535 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_timeout) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2536 | case executed 176 times by 1 test: 31:case 31: Executed by:
executed 176 times by 1 test: case 31: Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2537 | return executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cache_full) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cache_full) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2538 | __extension__ ({ __auto_type __atomic_load_ptr = ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cache_full) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2539 | (&ctx->stats.sess_cache_full) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cache_full) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2540 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cache_full) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2541 | memory_order_relaxed executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cache_full) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2542 | )); __atomic_load_tmp; }) executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cache_full) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2543 | ; executed 176 times by 1 test: return __extension__ ({ __auto_type __atomic_load_ptr = ( (&ctx->stats.sess_cache_full) ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, ( memory_order_relaxed )); __atomic_load_tmp; }) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
2544 | case never executed: 33:case 33: never executed: case 33: | 0 | ||||||||||||||||||||||||||||||||||||
2545 | return never executed: (ctx->mode |= larg);return (ctx->mode |= larg); never executed: return (ctx->mode |= larg); | 0 | ||||||||||||||||||||||||||||||||||||
2546 | case executed 367 times by 1 test: 78:case 78: Executed by:
executed 367 times by 1 test: case 78: Executed by:
| 367 | ||||||||||||||||||||||||||||||||||||
2547 | return executed 367 times by 1 test: (ctx->mode &= ~larg);return (ctx->mode &= ~larg); Executed by:
executed 367 times by 1 test: return (ctx->mode &= ~larg); Executed by:
| 367 | ||||||||||||||||||||||||||||||||||||
2548 | case executed 2453 times by 1 test: 52:case 52: Executed by:
executed 2453 times by 1 test: case 52: Executed by:
| 2453 | ||||||||||||||||||||||||||||||||||||
2549 | if (larg < 512
| 0-2453 | ||||||||||||||||||||||||||||||||||||
2550 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2551 | ctx->max_send_fragment = larg; | - | ||||||||||||||||||||||||||||||||||||
2552 | if (ctx->max_send_fragment < ctx->split_send_fragment
| 6-2447 | ||||||||||||||||||||||||||||||||||||
2553 | ctx->split_send_fragment = ctx->max_send_fragment; executed 2447 times by 1 test: ctx->split_send_fragment = ctx->max_send_fragment; Executed by:
| 2447 | ||||||||||||||||||||||||||||||||||||
2554 | return executed 2453 times by 1 test: 1;return 1; Executed by:
executed 2453 times by 1 test: return 1; Executed by:
| 2453 | ||||||||||||||||||||||||||||||||||||
2555 | case never executed: 125:case 125: never executed: case 125: | 0 | ||||||||||||||||||||||||||||||||||||
2556 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
2557 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2558 | ctx->split_send_fragment = larg; | - | ||||||||||||||||||||||||||||||||||||
2559 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2560 | case never executed: 126:case 126: never executed: case 126: | 0 | ||||||||||||||||||||||||||||||||||||
2561 | if (larg < 1
| 0 | ||||||||||||||||||||||||||||||||||||
2562 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2563 | ctx->max_pipelines = larg; | - | ||||||||||||||||||||||||||||||||||||
2564 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2565 | case never executed: 99:case 99: never executed: case 99: | 0 | ||||||||||||||||||||||||||||||||||||
2566 | return never executed: (ctx->cert->cert_flags |= larg);return (ctx->cert->cert_flags |= larg); never executed: return (ctx->cert->cert_flags |= larg); | 0 | ||||||||||||||||||||||||||||||||||||
2567 | case never executed: 100:case 100: never executed: case 100: | 0 | ||||||||||||||||||||||||||||||||||||
2568 | return never executed: (ctx->cert->cert_flags &= ~larg);return (ctx->cert->cert_flags &= ~larg); never executed: return (ctx->cert->cert_flags &= ~larg); | 0 | ||||||||||||||||||||||||||||||||||||
2569 | case executed 2744 times by 1 test: 123:case 123: Executed by:
executed 2744 times by 1 test: case 123: Executed by:
| 2744 | ||||||||||||||||||||||||||||||||||||
2570 | return executed 2744 times by 1 test: ssl_check_allowed_versions(larg, ctx->max_proto_version)return ssl_check_allowed_versions(larg, ctx->max_proto_version) && ssl_set_version_bound(ctx->method->version, (int)larg, &ctx->min_proto_version); Executed by:
executed 2744 times by 1 test: return ssl_check_allowed_versions(larg, ctx->max_proto_version) && ssl_set_version_bound(ctx->method->version, (int)larg, &ctx->min_proto_version); Executed by:
| 0-2744 | ||||||||||||||||||||||||||||||||||||
2571 | && ssl_set_version_bound(ctx->method->version, (int)larg,
executed 2744 times by 1 test: return ssl_check_allowed_versions(larg, ctx->max_proto_version) && ssl_set_version_bound(ctx->method->version, (int)larg, &ctx->min_proto_version); Executed by:
| 0-2744 | ||||||||||||||||||||||||||||||||||||
2572 | &ctx->min_proto_version)
executed 2744 times by 1 test: return ssl_check_allowed_versions(larg, ctx->max_proto_version) && ssl_set_version_bound(ctx->method->version, (int)larg, &ctx->min_proto_version); Executed by:
| 0-2744 | ||||||||||||||||||||||||||||||||||||
2573 | case executed 1 time by 1 test: 130:case 130: Executed by:
executed 1 time by 1 test: case 130: Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
2574 | return executed 1 time by 1 test: ctx->min_proto_version;return ctx->min_proto_version; Executed by:
executed 1 time by 1 test: return ctx->min_proto_version; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
2575 | case executed 3476 times by 1 test: 124:case 124: Executed by:
executed 3476 times by 1 test: case 124: Executed by:
| 3476 | ||||||||||||||||||||||||||||||||||||
2576 | return executed 3476 times by 1 test: ssl_check_allowed_versions(ctx->min_proto_version, larg)return ssl_check_allowed_versions(ctx->min_proto_version, larg) && ssl_set_version_bound(ctx->method->version, (int)larg, &ctx->max_proto_version); Executed by:
executed 3476 times by 1 test: return ssl_check_allowed_versions(ctx->min_proto_version, larg) && ssl_set_version_bound(ctx->method->version, (int)larg, &ctx->max_proto_version); Executed by:
| 0-3476 | ||||||||||||||||||||||||||||||||||||
2577 | && ssl_set_version_bound(ctx->method->version, (int)larg,
executed 3476 times by 1 test: return ssl_check_allowed_versions(ctx->min_proto_version, larg) && ssl_set_version_bound(ctx->method->version, (int)larg, &ctx->max_proto_version); Executed by:
| 0-3476 | ||||||||||||||||||||||||||||||||||||
2578 | &ctx->max_proto_version)
executed 3476 times by 1 test: return ssl_check_allowed_versions(ctx->min_proto_version, larg) && ssl_set_version_bound(ctx->method->version, (int)larg, &ctx->max_proto_version); Executed by:
| 0-3476 | ||||||||||||||||||||||||||||||||||||
2579 | case never executed: 131:case 131: never executed: case 131: | 0 | ||||||||||||||||||||||||||||||||||||
2580 | return never executed: ctx->max_proto_version;return ctx->max_proto_version; never executed: return ctx->max_proto_version; | 0 | ||||||||||||||||||||||||||||||||||||
2581 | default executed 5858 times by 1 test: :default: Executed by:
executed 5858 times by 1 test: default: Executed by:
| 5858 | ||||||||||||||||||||||||||||||||||||
2582 | return executed 5858 times by 1 test: ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg);return ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg); Executed by:
executed 5858 times by 1 test: return ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg); Executed by:
| 5858 | ||||||||||||||||||||||||||||||||||||
2583 | } | - | ||||||||||||||||||||||||||||||||||||
2584 | } | - | ||||||||||||||||||||||||||||||||||||
2585 | - | |||||||||||||||||||||||||||||||||||||
2586 | long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void)) | - | ||||||||||||||||||||||||||||||||||||
2587 | { | - | ||||||||||||||||||||||||||||||||||||
2588 | switch (cmd) { | - | ||||||||||||||||||||||||||||||||||||
2589 | case never executed: 15:case 15: never executed: case 15: | 0 | ||||||||||||||||||||||||||||||||||||
2590 | ctx->msg_callback = (void (*) | - | ||||||||||||||||||||||||||||||||||||
2591 | (int write_p, int version, int content_type, | - | ||||||||||||||||||||||||||||||||||||
2592 | const void *buf, size_t len, SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
2593 | void *arg))(fp); | - | ||||||||||||||||||||||||||||||||||||
2594 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2595 | - | |||||||||||||||||||||||||||||||||||||
2596 | default executed 291 times by 1 test: :default: Executed by:
executed 291 times by 1 test: default: Executed by:
| 291 | ||||||||||||||||||||||||||||||||||||
2597 | return executed 291 times by 1 test: ctx->method->ssl_ctx_callback_ctrl(ctx, cmd, fp);return ctx->method->ssl_ctx_callback_ctrl(ctx, cmd, fp); Executed by:
executed 291 times by 1 test: return ctx->method->ssl_ctx_callback_ctrl(ctx, cmd, fp); Executed by:
| 291 | ||||||||||||||||||||||||||||||||||||
2598 | } | - | ||||||||||||||||||||||||||||||||||||
2599 | } | - | ||||||||||||||||||||||||||||||||||||
2600 | - | |||||||||||||||||||||||||||||||||||||
2601 | int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b) | - | ||||||||||||||||||||||||||||||||||||
2602 | { | - | ||||||||||||||||||||||||||||||||||||
2603 | if (a->id > b->id
| 323717-448341 | ||||||||||||||||||||||||||||||||||||
2604 | return executed 323717 times by 1 test: 1;return 1; Executed by:
executed 323717 times by 1 test: return 1; Executed by:
| 323717 | ||||||||||||||||||||||||||||||||||||
2605 | if (a->id < b->id
| 67851-380490 | ||||||||||||||||||||||||||||||||||||
2606 | return executed 380490 times by 2 tests: -1;return -1; Executed by:
executed 380490 times by 2 tests: return -1; Executed by:
| 380490 | ||||||||||||||||||||||||||||||||||||
2607 | return executed 67851 times by 2 tests: 0;return 0; Executed by:
executed 67851 times by 2 tests: return 0; Executed by:
| 67851 | ||||||||||||||||||||||||||||||||||||
2608 | } | - | ||||||||||||||||||||||||||||||||||||
2609 | - | |||||||||||||||||||||||||||||||||||||
2610 | int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap, | - | ||||||||||||||||||||||||||||||||||||
2611 | const SSL_CIPHER *const *bp) | - | ||||||||||||||||||||||||||||||||||||
2612 | { | - | ||||||||||||||||||||||||||||||||||||
2613 | if ((*
| 2941153-3754606 | ||||||||||||||||||||||||||||||||||||
2614 | return executed 3754606 times by 2 tests: 1;return 1; Executed by:
executed 3754606 times by 2 tests: return 1; Executed by:
| 3754606 | ||||||||||||||||||||||||||||||||||||
2615 | if ((*
| 4120-2937033 | ||||||||||||||||||||||||||||||||||||
2616 | return executed 2937033 times by 2 tests: -1;return -1; Executed by:
executed 2937033 times by 2 tests: return -1; Executed by:
| 2937033 | ||||||||||||||||||||||||||||||||||||
2617 | return executed 4120 times by 1 test: 0;return 0; Executed by:
executed 4120 times by 1 test: return 0; Executed by:
| 4120 | ||||||||||||||||||||||||||||||||||||
2618 | } | - | ||||||||||||||||||||||||||||||||||||
2619 | - | |||||||||||||||||||||||||||||||||||||
2620 | - | |||||||||||||||||||||||||||||||||||||
2621 | - | |||||||||||||||||||||||||||||||||||||
2622 | struct stack_st_SSL_CIPHER *SSL_get_ciphers(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2623 | { | - | ||||||||||||||||||||||||||||||||||||
2624 | if (s !=
| 0-21345 | ||||||||||||||||||||||||||||||||||||
2625 | ((void *)0)
| 0-21345 | ||||||||||||||||||||||||||||||||||||
2626 | ) { | - | ||||||||||||||||||||||||||||||||||||
2627 | if (s->cipher_list !=
| 9048-12297 | ||||||||||||||||||||||||||||||||||||
2628 | ((void *)0)
| 9048-12297 | ||||||||||||||||||||||||||||||||||||
2629 | ) { | - | ||||||||||||||||||||||||||||||||||||
2630 | return executed 9048 times by 1 test: s->cipher_list;return s->cipher_list; Executed by:
executed 9048 times by 1 test: return s->cipher_list; Executed by:
| 9048 | ||||||||||||||||||||||||||||||||||||
2631 | } else if ((
| 0-12297 | ||||||||||||||||||||||||||||||||||||
2632 | ((void *)0)
| 0-12297 | ||||||||||||||||||||||||||||||||||||
2633 | )
| 0-12297 | ||||||||||||||||||||||||||||||||||||
2634 | ((void *)0)
| 0-12297 | ||||||||||||||||||||||||||||||||||||
2635 | )
| 0-12297 | ||||||||||||||||||||||||||||||||||||
2636 | return executed 12297 times by 1 test: s->ctx->cipher_list;return s->ctx->cipher_list; Executed by:
executed 12297 times by 1 test: return s->ctx->cipher_list; Executed by:
| 12297 | ||||||||||||||||||||||||||||||||||||
2637 | } | - | ||||||||||||||||||||||||||||||||||||
2638 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2639 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2640 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2641 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2642 | } | - | ||||||||||||||||||||||||||||||||||||
2643 | - | |||||||||||||||||||||||||||||||||||||
2644 | struct stack_st_SSL_CIPHER *SSL_get_client_ciphers(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2645 | { | - | ||||||||||||||||||||||||||||||||||||
2646 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
2647 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
2648 | )
| 0 | ||||||||||||||||||||||||||||||||||||
2649 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
2650 | )
| 0 | ||||||||||||||||||||||||||||||||||||
2651 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2652 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2653 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2654 | return never executed: s->session->ciphers;return s->session->ciphers; never executed: return s->session->ciphers; | 0 | ||||||||||||||||||||||||||||||||||||
2655 | } | - | ||||||||||||||||||||||||||||||||||||
2656 | - | |||||||||||||||||||||||||||||||||||||
2657 | struct stack_st_SSL_CIPHER *SSL_get1_supported_ciphers(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2658 | { | - | ||||||||||||||||||||||||||||||||||||
2659 | struct stack_st_SSL_CIPHER *sk = | - | ||||||||||||||||||||||||||||||||||||
2660 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
2661 | , *ciphers; | - | ||||||||||||||||||||||||||||||||||||
2662 | int i; | - | ||||||||||||||||||||||||||||||||||||
2663 | - | |||||||||||||||||||||||||||||||||||||
2664 | ciphers = SSL_get_ciphers(s); | - | ||||||||||||||||||||||||||||||||||||
2665 | if (!ciphers
| 0-8 | ||||||||||||||||||||||||||||||||||||
2666 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2667 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2668 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2669 | if (!ssl_set_client_disabled(s)
| 0-8 | ||||||||||||||||||||||||||||||||||||
2670 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2671 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2672 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2673 | for (i = 0; i < sk_SSL_CIPHER_num(ciphers)
| 8-573 | ||||||||||||||||||||||||||||||||||||
2674 | const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i); | - | ||||||||||||||||||||||||||||||||||||
2675 | if (!ssl_cipher_disabled(s, c, (1 | (1 << 16)), 0)
| 247-326 | ||||||||||||||||||||||||||||||||||||
2676 | if (!sk
| 8-239 | ||||||||||||||||||||||||||||||||||||
2677 | sk = sk_SSL_CIPHER_new_null(); executed 8 times by 1 test: sk = sk_SSL_CIPHER_new_null(); Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
2678 | if (!sk
| 0-247 | ||||||||||||||||||||||||||||||||||||
2679 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2680 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2681 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2682 | if (!sk_SSL_CIPHER_push(sk, c)
| 0-247 | ||||||||||||||||||||||||||||||||||||
2683 | sk_SSL_CIPHER_free(sk); | - | ||||||||||||||||||||||||||||||||||||
2684 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2685 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2686 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2687 | } | - | ||||||||||||||||||||||||||||||||||||
2688 | } executed 247 times by 1 test: end of block Executed by:
| 247 | ||||||||||||||||||||||||||||||||||||
2689 | } executed 573 times by 1 test: end of block Executed by:
| 573 | ||||||||||||||||||||||||||||||||||||
2690 | return executed 8 times by 1 test: sk;return sk; Executed by:
executed 8 times by 1 test: return sk; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
2691 | } | - | ||||||||||||||||||||||||||||||||||||
2692 | - | |||||||||||||||||||||||||||||||||||||
2693 | - | |||||||||||||||||||||||||||||||||||||
2694 | - | |||||||||||||||||||||||||||||||||||||
2695 | struct stack_st_SSL_CIPHER *ssl_get_ciphers_by_id(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2696 | { | - | ||||||||||||||||||||||||||||||||||||
2697 | if (s !=
| 0-4121 | ||||||||||||||||||||||||||||||||||||
2698 | ((void *)0)
| 0-4121 | ||||||||||||||||||||||||||||||||||||
2699 | ) { | - | ||||||||||||||||||||||||||||||||||||
2700 | if (s->cipher_list_by_id !=
| 1668-2453 | ||||||||||||||||||||||||||||||||||||
2701 | ((void *)0)
| 1668-2453 | ||||||||||||||||||||||||||||||||||||
2702 | ) { | - | ||||||||||||||||||||||||||||||||||||
2703 | return executed 2453 times by 1 test: s->cipher_list_by_id;return s->cipher_list_by_id; Executed by:
executed 2453 times by 1 test: return s->cipher_list_by_id; Executed by:
| 2453 | ||||||||||||||||||||||||||||||||||||
2704 | } else if ((
| 0-1668 | ||||||||||||||||||||||||||||||||||||
2705 | ((void *)0)
| 0-1668 | ||||||||||||||||||||||||||||||||||||
2706 | )
| 0-1668 | ||||||||||||||||||||||||||||||||||||
2707 | ((void *)0)
| 0-1668 | ||||||||||||||||||||||||||||||||||||
2708 | )
| 0-1668 | ||||||||||||||||||||||||||||||||||||
2709 | return executed 1668 times by 1 test: s->ctx->cipher_list_by_id;return s->ctx->cipher_list_by_id; Executed by:
executed 1668 times by 1 test: return s->ctx->cipher_list_by_id; Executed by:
| 1668 | ||||||||||||||||||||||||||||||||||||
2710 | } | - | ||||||||||||||||||||||||||||||||||||
2711 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
2712 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2713 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2714 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2715 | } | - | ||||||||||||||||||||||||||||||||||||
2716 | - | |||||||||||||||||||||||||||||||||||||
2717 | - | |||||||||||||||||||||||||||||||||||||
2718 | const char *SSL_get_cipher_list(const SSL *s, int n) | - | ||||||||||||||||||||||||||||||||||||
2719 | { | - | ||||||||||||||||||||||||||||||||||||
2720 | const SSL_CIPHER *c; | - | ||||||||||||||||||||||||||||||||||||
2721 | struct stack_st_SSL_CIPHER *sk; | - | ||||||||||||||||||||||||||||||||||||
2722 | - | |||||||||||||||||||||||||||||||||||||
2723 | if (s ==
| 0 | ||||||||||||||||||||||||||||||||||||
2724 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
2725 | ) | - | ||||||||||||||||||||||||||||||||||||
2726 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2727 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2728 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2729 | sk = SSL_get_ciphers(s); | - | ||||||||||||||||||||||||||||||||||||
2730 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
2731 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
2732 | )
| 0 | ||||||||||||||||||||||||||||||||||||
2733 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2734 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2735 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2736 | c = sk_SSL_CIPHER_value(sk, n); | - | ||||||||||||||||||||||||||||||||||||
2737 | if (c ==
| 0 | ||||||||||||||||||||||||||||||||||||
2738 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
2739 | ) | - | ||||||||||||||||||||||||||||||||||||
2740 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2741 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2742 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2743 | return never executed: c->name;return c->name; never executed: return c->name; | 0 | ||||||||||||||||||||||||||||||||||||
2744 | } | - | ||||||||||||||||||||||||||||||||||||
2745 | - | |||||||||||||||||||||||||||||||||||||
2746 | - | |||||||||||||||||||||||||||||||||||||
2747 | - | |||||||||||||||||||||||||||||||||||||
2748 | struct stack_st_SSL_CIPHER *SSL_CTX_get_ciphers(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
2749 | { | - | ||||||||||||||||||||||||||||||||||||
2750 | if (ctx !=
| 0-21 | ||||||||||||||||||||||||||||||||||||
2751 | ((void *)0)
| 0-21 | ||||||||||||||||||||||||||||||||||||
2752 | ) | - | ||||||||||||||||||||||||||||||||||||
2753 | return executed 21 times by 1 test: ctx->cipher_list;return ctx->cipher_list; Executed by:
executed 21 times by 1 test: return ctx->cipher_list; Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||
2754 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2755 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2756 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2757 | } | - | ||||||||||||||||||||||||||||||||||||
2758 | - | |||||||||||||||||||||||||||||||||||||
2759 | - | |||||||||||||||||||||||||||||||||||||
2760 | int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str) | - | ||||||||||||||||||||||||||||||||||||
2761 | { | - | ||||||||||||||||||||||||||||||||||||
2762 | struct stack_st_SSL_CIPHER *sk; | - | ||||||||||||||||||||||||||||||||||||
2763 | - | |||||||||||||||||||||||||||||||||||||
2764 | sk = ssl_create_cipher_list(ctx->method, ctx->tls13_ciphersuites, | - | ||||||||||||||||||||||||||||||||||||
2765 | &ctx->cipher_list, &ctx->cipher_list_by_id, str, | - | ||||||||||||||||||||||||||||||||||||
2766 | ctx->cert); | - | ||||||||||||||||||||||||||||||||||||
2767 | - | |||||||||||||||||||||||||||||||||||||
2768 | - | |||||||||||||||||||||||||||||||||||||
2769 | - | |||||||||||||||||||||||||||||||||||||
2770 | - | |||||||||||||||||||||||||||||||||||||
2771 | - | |||||||||||||||||||||||||||||||||||||
2772 | - | |||||||||||||||||||||||||||||||||||||
2773 | - | |||||||||||||||||||||||||||||||||||||
2774 | if (sk ==
| 0-4801 | ||||||||||||||||||||||||||||||||||||
2775 | ((void *)0)
| 0-4801 | ||||||||||||||||||||||||||||||||||||
2776 | ) | - | ||||||||||||||||||||||||||||||||||||
2777 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2778 | else if (sk_SSL_CIPHER_num(sk) == 0
| 0-4801 | ||||||||||||||||||||||||||||||||||||
2779 | ERR_put_error(20,(269),(185),__FILE__,2528); | - | ||||||||||||||||||||||||||||||||||||
2780 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2781 | } | - | ||||||||||||||||||||||||||||||||||||
2782 | return executed 4801 times by 1 test: 1;return 1; Executed by:
executed 4801 times by 1 test: return 1; Executed by:
| 4801 | ||||||||||||||||||||||||||||||||||||
2783 | } | - | ||||||||||||||||||||||||||||||||||||
2784 | - | |||||||||||||||||||||||||||||||||||||
2785 | - | |||||||||||||||||||||||||||||||||||||
2786 | int SSL_set_cipher_list(SSL *s, const char *str) | - | ||||||||||||||||||||||||||||||||||||
2787 | { | - | ||||||||||||||||||||||||||||||||||||
2788 | struct stack_st_SSL_CIPHER *sk; | - | ||||||||||||||||||||||||||||||||||||
2789 | - | |||||||||||||||||||||||||||||||||||||
2790 | sk = ssl_create_cipher_list(s->ctx->method, s->tls13_ciphersuites, | - | ||||||||||||||||||||||||||||||||||||
2791 | &s->cipher_list, &s->cipher_list_by_id, str, | - | ||||||||||||||||||||||||||||||||||||
2792 | s->cert); | - | ||||||||||||||||||||||||||||||||||||
2793 | - | |||||||||||||||||||||||||||||||||||||
2794 | if (sk ==
| 0-2378 | ||||||||||||||||||||||||||||||||||||
2795 | ((void *)0)
| 0-2378 | ||||||||||||||||||||||||||||||||||||
2796 | ) | - | ||||||||||||||||||||||||||||||||||||
2797 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2798 | else if (sk_SSL_CIPHER_num(sk) == 0
| 0-2378 | ||||||||||||||||||||||||||||||||||||
2799 | ERR_put_error(20,(271),(185),__FILE__,2546); | - | ||||||||||||||||||||||||||||||||||||
2800 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
2801 | } | - | ||||||||||||||||||||||||||||||||||||
2802 | return executed 2378 times by 1 test: 1;return 1; Executed by:
executed 2378 times by 1 test: return 1; Executed by:
| 2378 | ||||||||||||||||||||||||||||||||||||
2803 | } | - | ||||||||||||||||||||||||||||||||||||
2804 | - | |||||||||||||||||||||||||||||||||||||
2805 | char *SSL_get_shared_ciphers(const SSL *s, char *buf, int size) | - | ||||||||||||||||||||||||||||||||||||
2806 | { | - | ||||||||||||||||||||||||||||||||||||
2807 | char *p; | - | ||||||||||||||||||||||||||||||||||||
2808 | struct stack_st_SSL_CIPHER *clntsk, *srvrsk; | - | ||||||||||||||||||||||||||||||||||||
2809 | const SSL_CIPHER *c; | - | ||||||||||||||||||||||||||||||||||||
2810 | int i; | - | ||||||||||||||||||||||||||||||||||||
2811 | - | |||||||||||||||||||||||||||||||||||||
2812 | if (!s->server
| 0-5 | ||||||||||||||||||||||||||||||||||||
2813 | || s->session ==
| 0-5 | ||||||||||||||||||||||||||||||||||||
2814 | ((void *)0)
| 0-5 | ||||||||||||||||||||||||||||||||||||
2815 | - | |||||||||||||||||||||||||||||||||||||
2816 | || s->session->ciphers ==
| 0-5 | ||||||||||||||||||||||||||||||||||||
2817 | ((void *)0)
| 0-5 | ||||||||||||||||||||||||||||||||||||
2818 | - | |||||||||||||||||||||||||||||||||||||
2819 | || size < 2
| 0-5 | ||||||||||||||||||||||||||||||||||||
2820 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2821 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2822 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2823 | - | |||||||||||||||||||||||||||||||||||||
2824 | p = buf; | - | ||||||||||||||||||||||||||||||||||||
2825 | clntsk = s->session->ciphers; | - | ||||||||||||||||||||||||||||||||||||
2826 | srvrsk = SSL_get_ciphers(s); | - | ||||||||||||||||||||||||||||||||||||
2827 | if (clntsk ==
| 0-5 | ||||||||||||||||||||||||||||||||||||
2828 | ((void *)0)
| 0-5 | ||||||||||||||||||||||||||||||||||||
2829 | || srvrsk ==
| 0-5 | ||||||||||||||||||||||||||||||||||||
2830 | ((void *)0)
| 0-5 | ||||||||||||||||||||||||||||||||||||
2831 | ) | - | ||||||||||||||||||||||||||||||||||||
2832 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2833 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2834 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2835 | - | |||||||||||||||||||||||||||||||||||||
2836 | if (sk_SSL_CIPHER_num(clntsk) == 0
| 0-5 | ||||||||||||||||||||||||||||||||||||
2837 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2838 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2839 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2840 | - | |||||||||||||||||||||||||||||||||||||
2841 | for (i = 0; i < sk_SSL_CIPHER_num(clntsk)
| 5-14 | ||||||||||||||||||||||||||||||||||||
2842 | int n; | - | ||||||||||||||||||||||||||||||||||||
2843 | - | |||||||||||||||||||||||||||||||||||||
2844 | c = sk_SSL_CIPHER_value(clntsk, i); | - | ||||||||||||||||||||||||||||||||||||
2845 | if (sk_SSL_CIPHER_find(srvrsk, c) < 0
| 5-9 | ||||||||||||||||||||||||||||||||||||
2846 | continue; executed 5 times by 1 test: continue; Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
2847 | - | |||||||||||||||||||||||||||||||||||||
2848 | n = strlen(c->name); | - | ||||||||||||||||||||||||||||||||||||
2849 | if (n + 1 > size
| 0-9 | ||||||||||||||||||||||||||||||||||||
2850 | if (p != buf
| 0 | ||||||||||||||||||||||||||||||||||||
2851 | -- never executed: p;--p; never executed: --p; | 0 | ||||||||||||||||||||||||||||||||||||
2852 | *p = '\0'; | - | ||||||||||||||||||||||||||||||||||||
2853 | return never executed: buf;return buf; never executed: return buf; | 0 | ||||||||||||||||||||||||||||||||||||
2854 | } | - | ||||||||||||||||||||||||||||||||||||
2855 | strcpy(p, c->name); | - | ||||||||||||||||||||||||||||||||||||
2856 | p += n; | - | ||||||||||||||||||||||||||||||||||||
2857 | *(p++) = ':'; | - | ||||||||||||||||||||||||||||||||||||
2858 | size -= n + 1; | - | ||||||||||||||||||||||||||||||||||||
2859 | } executed 9 times by 1 test: end of block Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
2860 | p[-1] = '\0'; | - | ||||||||||||||||||||||||||||||||||||
2861 | return executed 5 times by 1 test: buf;return buf; Executed by:
executed 5 times by 1 test: return buf; Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
2862 | } | - | ||||||||||||||||||||||||||||||||||||
2863 | - | |||||||||||||||||||||||||||||||||||||
2864 | - | |||||||||||||||||||||||||||||||||||||
2865 | - | |||||||||||||||||||||||||||||||||||||
2866 | - | |||||||||||||||||||||||||||||||||||||
2867 | - | |||||||||||||||||||||||||||||||||||||
2868 | const char *SSL_get_servername(const SSL *s, const int type) | - | ||||||||||||||||||||||||||||||||||||
2869 | { | - | ||||||||||||||||||||||||||||||||||||
2870 | if (type != 0
| 0-175 | ||||||||||||||||||||||||||||||||||||
2871 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2872 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2873 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
2874 | - | |||||||||||||||||||||||||||||||||||||
2875 | - | |||||||||||||||||||||||||||||||||||||
2876 | - | |||||||||||||||||||||||||||||||||||||
2877 | - | |||||||||||||||||||||||||||||||||||||
2878 | - | |||||||||||||||||||||||||||||||||||||
2879 | - | |||||||||||||||||||||||||||||||||||||
2880 | - | |||||||||||||||||||||||||||||||||||||
2881 | if (s->hit
| 20-155 | ||||||||||||||||||||||||||||||||||||
2882 | return executed 20 times by 1 test: s->session->ext.hostname;return s->session->ext.hostname; Executed by:
executed 20 times by 1 test: return s->session->ext.hostname; Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
2883 | return executed 155 times by 1 test: s->ext.hostname;return s->ext.hostname; Executed by:
executed 155 times by 1 test: return s->ext.hostname; Executed by:
| 155 | ||||||||||||||||||||||||||||||||||||
2884 | } | - | ||||||||||||||||||||||||||||||||||||
2885 | - | |||||||||||||||||||||||||||||||||||||
2886 | int SSL_get_servername_type(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
2887 | { | - | ||||||||||||||||||||||||||||||||||||
2888 | if (s->session
| 0-136 | ||||||||||||||||||||||||||||||||||||
2889 | && (
| 0-136 | ||||||||||||||||||||||||||||||||||||
2890 | ext.hostname : s->ext.hostname)
| 0-136 | ||||||||||||||||||||||||||||||||||||
2891 | return executed 136 times by 1 test: 0;return 0; Executed by:
executed 136 times by 1 test: return 0; Executed by:
| 136 | ||||||||||||||||||||||||||||||||||||
2892 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
2893 | } | - | ||||||||||||||||||||||||||||||||||||
2894 | int SSL_select_next_proto(unsigned char **out, unsigned char *outlen, | - | ||||||||||||||||||||||||||||||||||||
2895 | const unsigned char *server, | - | ||||||||||||||||||||||||||||||||||||
2896 | unsigned int server_len, | - | ||||||||||||||||||||||||||||||||||||
2897 | const unsigned char *client, unsigned int client_len) | - | ||||||||||||||||||||||||||||||||||||
2898 | { | - | ||||||||||||||||||||||||||||||||||||
2899 | unsigned int i, j; | - | ||||||||||||||||||||||||||||||||||||
2900 | const unsigned char *result; | - | ||||||||||||||||||||||||||||||||||||
2901 | int status = 0; | - | ||||||||||||||||||||||||||||||||||||
2902 | - | |||||||||||||||||||||||||||||||||||||
2903 | - | |||||||||||||||||||||||||||||||||||||
2904 | - | |||||||||||||||||||||||||||||||||||||
2905 | - | |||||||||||||||||||||||||||||||||||||
2906 | for (i = 0; i < server_len
| 4-47 | ||||||||||||||||||||||||||||||||||||
2907 | for (j = 0; j < client_len
| 8-72 | ||||||||||||||||||||||||||||||||||||
2908 | if (server[i] == client[j]
| 0-72 | ||||||||||||||||||||||||||||||||||||
2909 | memcmp(&server[i + 1], &client[j + 1], server[i]) == 0
| 33-39 | ||||||||||||||||||||||||||||||||||||
2910 | - | |||||||||||||||||||||||||||||||||||||
2911 | result = &server[i]; | - | ||||||||||||||||||||||||||||||||||||
2912 | status = 1; | - | ||||||||||||||||||||||||||||||||||||
2913 | goto executed 39 times by 1 test: found;goto found; Executed by:
executed 39 times by 1 test: goto found; Executed by:
| 39 | ||||||||||||||||||||||||||||||||||||
2914 | } | - | ||||||||||||||||||||||||||||||||||||
2915 | j += client[j]; | - | ||||||||||||||||||||||||||||||||||||
2916 | j++; | - | ||||||||||||||||||||||||||||||||||||
2917 | } executed 33 times by 1 test: end of block Executed by:
| 33 | ||||||||||||||||||||||||||||||||||||
2918 | i += server[i]; | - | ||||||||||||||||||||||||||||||||||||
2919 | i++; | - | ||||||||||||||||||||||||||||||||||||
2920 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
2921 | - | |||||||||||||||||||||||||||||||||||||
2922 | - | |||||||||||||||||||||||||||||||||||||
2923 | result = client; | - | ||||||||||||||||||||||||||||||||||||
2924 | status = 2; | - | ||||||||||||||||||||||||||||||||||||
2925 | - | |||||||||||||||||||||||||||||||||||||
2926 | found: code before this statement executed 4 times by 1 test: found: Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
2927 | *out = (unsigned char *)result + 1; | - | ||||||||||||||||||||||||||||||||||||
2928 | *outlen = result[0]; | - | ||||||||||||||||||||||||||||||||||||
2929 | return executed 43 times by 1 test: status;return status; Executed by:
executed 43 times by 1 test: return status; Executed by:
| 43 | ||||||||||||||||||||||||||||||||||||
2930 | } | - | ||||||||||||||||||||||||||||||||||||
2931 | void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, | - | ||||||||||||||||||||||||||||||||||||
2932 | unsigned *len) | - | ||||||||||||||||||||||||||||||||||||
2933 | { | - | ||||||||||||||||||||||||||||||||||||
2934 | *data = s->ext.npn; | - | ||||||||||||||||||||||||||||||||||||
2935 | if (!*data
| 41-2668 | ||||||||||||||||||||||||||||||||||||
2936 | *len = 0; | - | ||||||||||||||||||||||||||||||||||||
2937 | } executed 2668 times by 1 test: else {end of block Executed by:
| 2668 | ||||||||||||||||||||||||||||||||||||
2938 | *len = (unsigned int)s->ext.npn_len; | - | ||||||||||||||||||||||||||||||||||||
2939 | } executed 41 times by 1 test: end of block Executed by:
| 41 | ||||||||||||||||||||||||||||||||||||
2940 | } | - | ||||||||||||||||||||||||||||||||||||
2941 | void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
2942 | SSL_CTX_npn_advertised_cb_func cb, | - | ||||||||||||||||||||||||||||||||||||
2943 | void *arg) | - | ||||||||||||||||||||||||||||||||||||
2944 | { | - | ||||||||||||||||||||||||||||||||||||
2945 | ctx->ext.npn_advertised_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
2946 | ctx->ext.npn_advertised_cb_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
2947 | } executed 30 times by 1 test: end of block Executed by:
| 30 | ||||||||||||||||||||||||||||||||||||
2948 | void SSL_CTX_set_next_proto_select_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
2949 | SSL_CTX_npn_select_cb_func cb, | - | ||||||||||||||||||||||||||||||||||||
2950 | void *arg) | - | ||||||||||||||||||||||||||||||||||||
2951 | { | - | ||||||||||||||||||||||||||||||||||||
2952 | ctx->ext.npn_select_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
2953 | ctx->ext.npn_select_cb_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
2954 | } executed 28 times by 1 test: end of block Executed by:
| 28 | ||||||||||||||||||||||||||||||||||||
2955 | - | |||||||||||||||||||||||||||||||||||||
2956 | - | |||||||||||||||||||||||||||||||||||||
2957 | - | |||||||||||||||||||||||||||||||||||||
2958 | - | |||||||||||||||||||||||||||||||||||||
2959 | - | |||||||||||||||||||||||||||||||||||||
2960 | - | |||||||||||||||||||||||||||||||||||||
2961 | - | |||||||||||||||||||||||||||||||||||||
2962 | int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos, | - | ||||||||||||||||||||||||||||||||||||
2963 | unsigned int protos_len) | - | ||||||||||||||||||||||||||||||||||||
2964 | { | - | ||||||||||||||||||||||||||||||||||||
2965 | CRYPTO_free(ctx->ext.alpn, __FILE__, 2749); | - | ||||||||||||||||||||||||||||||||||||
2966 | ctx->ext.alpn = CRYPTO_memdup((protos), protos_len, __FILE__, 2750); | - | ||||||||||||||||||||||||||||||||||||
2967 | if (ctx->ext.alpn ==
| 0-31 | ||||||||||||||||||||||||||||||||||||
2968 | ((void *)0)
| 0-31 | ||||||||||||||||||||||||||||||||||||
2969 | ) { | - | ||||||||||||||||||||||||||||||||||||
2970 | ERR_put_error(20,(343),((1|64)),__FILE__,2752); | - | ||||||||||||||||||||||||||||||||||||
2971 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2972 | } | - | ||||||||||||||||||||||||||||||||||||
2973 | ctx->ext.alpn_len = protos_len; | - | ||||||||||||||||||||||||||||||||||||
2974 | - | |||||||||||||||||||||||||||||||||||||
2975 | return executed 31 times by 1 test: 0;return 0; Executed by:
executed 31 times by 1 test: return 0; Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||
2976 | } | - | ||||||||||||||||||||||||||||||||||||
2977 | - | |||||||||||||||||||||||||||||||||||||
2978 | - | |||||||||||||||||||||||||||||||||||||
2979 | - | |||||||||||||||||||||||||||||||||||||
2980 | - | |||||||||||||||||||||||||||||||||||||
2981 | - | |||||||||||||||||||||||||||||||||||||
2982 | - | |||||||||||||||||||||||||||||||||||||
2983 | int SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos, | - | ||||||||||||||||||||||||||||||||||||
2984 | unsigned int protos_len) | - | ||||||||||||||||||||||||||||||||||||
2985 | { | - | ||||||||||||||||||||||||||||||||||||
2986 | CRYPTO_free(ssl->ext.alpn, __FILE__, 2768); | - | ||||||||||||||||||||||||||||||||||||
2987 | ssl->ext.alpn = CRYPTO_memdup((protos), protos_len, __FILE__, 2769); | - | ||||||||||||||||||||||||||||||||||||
2988 | if (ssl->ext.alpn ==
| 0-4 | ||||||||||||||||||||||||||||||||||||
2989 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||||||||||||||
2990 | ) { | - | ||||||||||||||||||||||||||||||||||||
2991 | ERR_put_error(20,(344),((1|64)),__FILE__,2771); | - | ||||||||||||||||||||||||||||||||||||
2992 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
2993 | } | - | ||||||||||||||||||||||||||||||||||||
2994 | ssl->ext.alpn_len = protos_len; | - | ||||||||||||||||||||||||||||||||||||
2995 | - | |||||||||||||||||||||||||||||||||||||
2996 | return executed 4 times by 1 test: 0;return 0; Executed by:
executed 4 times by 1 test: return 0; Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
2997 | } | - | ||||||||||||||||||||||||||||||||||||
2998 | - | |||||||||||||||||||||||||||||||||||||
2999 | - | |||||||||||||||||||||||||||||||||||||
3000 | - | |||||||||||||||||||||||||||||||||||||
3001 | - | |||||||||||||||||||||||||||||||||||||
3002 | - | |||||||||||||||||||||||||||||||||||||
3003 | - | |||||||||||||||||||||||||||||||||||||
3004 | void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
3005 | SSL_CTX_alpn_select_cb_func cb, | - | ||||||||||||||||||||||||||||||||||||
3006 | void *arg) | - | ||||||||||||||||||||||||||||||||||||
3007 | { | - | ||||||||||||||||||||||||||||||||||||
3008 | ctx->ext.alpn_select_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
3009 | ctx->ext.alpn_select_cb_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
3010 | } executed 33 times by 1 test: end of block Executed by:
| 33 | ||||||||||||||||||||||||||||||||||||
3011 | - | |||||||||||||||||||||||||||||||||||||
3012 | - | |||||||||||||||||||||||||||||||||||||
3013 | - | |||||||||||||||||||||||||||||||||||||
3014 | - | |||||||||||||||||||||||||||||||||||||
3015 | - | |||||||||||||||||||||||||||||||||||||
3016 | - | |||||||||||||||||||||||||||||||||||||
3017 | - | |||||||||||||||||||||||||||||||||||||
3018 | void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data, | - | ||||||||||||||||||||||||||||||||||||
3019 | unsigned int *len) | - | ||||||||||||||||||||||||||||||||||||
3020 | { | - | ||||||||||||||||||||||||||||||||||||
3021 | *data = | - | ||||||||||||||||||||||||||||||||||||
3022 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
3023 | ; | - | ||||||||||||||||||||||||||||||||||||
3024 | if (ssl->s3
| 0-2703 | ||||||||||||||||||||||||||||||||||||
3025 | * executed 2703 times by 1 test: data = ssl->s3->alpn_selected;*data = ssl->s3->alpn_selected; Executed by:
executed 2703 times by 1 test: *data = ssl->s3->alpn_selected; Executed by:
| 2703 | ||||||||||||||||||||||||||||||||||||
3026 | if (*
| 38-2665 | ||||||||||||||||||||||||||||||||||||
3027 | ((void *)0)
| 38-2665 | ||||||||||||||||||||||||||||||||||||
3028 | ) | - | ||||||||||||||||||||||||||||||||||||
3029 | * executed 2665 times by 1 test: len = 0;*len = 0; Executed by:
executed 2665 times by 1 test: *len = 0; Executed by:
| 2665 | ||||||||||||||||||||||||||||||||||||
3030 | else | - | ||||||||||||||||||||||||||||||||||||
3031 | * executed 38 times by 1 test: len = (unsigned int)ssl->s3->alpn_selected_len;*len = (unsigned int)ssl->s3->alpn_selected_len; Executed by:
executed 38 times by 1 test: *len = (unsigned int)ssl->s3->alpn_selected_len; Executed by:
| 38 | ||||||||||||||||||||||||||||||||||||
3032 | } | - | ||||||||||||||||||||||||||||||||||||
3033 | - | |||||||||||||||||||||||||||||||||||||
3034 | int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen, | - | ||||||||||||||||||||||||||||||||||||
3035 | const char *label, size_t llen, | - | ||||||||||||||||||||||||||||||||||||
3036 | const unsigned char *context, size_t contextlen, | - | ||||||||||||||||||||||||||||||||||||
3037 | int use_context) | - | ||||||||||||||||||||||||||||||||||||
3038 | { | - | ||||||||||||||||||||||||||||||||||||
3039 | if (s->version < 0x0301
| 0-24 | ||||||||||||||||||||||||||||||||||||
3040 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
3041 | - | |||||||||||||||||||||||||||||||||||||
3042 | return executed 24 times by 1 test: s->method->ssl3_enc->export_keying_material(s, out, olen, label,return s->method->ssl3_enc->export_keying_material(s, out, olen, label, llen, context, contextlen, use_context); Executed by:
executed 24 times by 1 test: return s->method->ssl3_enc->export_keying_material(s, out, olen, label, llen, context, contextlen, use_context); Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
3043 | llen, context, executed 24 times by 1 test: return s->method->ssl3_enc->export_keying_material(s, out, olen, label, llen, context, contextlen, use_context); Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
3044 | contextlen, use_context); executed 24 times by 1 test: return s->method->ssl3_enc->export_keying_material(s, out, olen, label, llen, context, contextlen, use_context); Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
3045 | } | - | ||||||||||||||||||||||||||||||||||||
3046 | - | |||||||||||||||||||||||||||||||||||||
3047 | int SSL_export_keying_material_early(SSL *s, unsigned char *out, size_t olen, | - | ||||||||||||||||||||||||||||||||||||
3048 | const char *label, size_t llen, | - | ||||||||||||||||||||||||||||||||||||
3049 | const unsigned char *context, | - | ||||||||||||||||||||||||||||||||||||
3050 | size_t contextlen) | - | ||||||||||||||||||||||||||||||||||||
3051 | { | - | ||||||||||||||||||||||||||||||||||||
3052 | if (s->version != 0x0304
| 0-12 | ||||||||||||||||||||||||||||||||||||
3053 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
3054 | - | |||||||||||||||||||||||||||||||||||||
3055 | return executed 12 times by 1 test: tls13_export_keying_material_early(s, out, olen, label, llen,return tls13_export_keying_material_early(s, out, olen, label, llen, context, contextlen); Executed by:
executed 12 times by 1 test: return tls13_export_keying_material_early(s, out, olen, label, llen, context, contextlen); Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
3056 | context, contextlen); executed 12 times by 1 test: return tls13_export_keying_material_early(s, out, olen, label, llen, context, contextlen); Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
3057 | } | - | ||||||||||||||||||||||||||||||||||||
3058 | - | |||||||||||||||||||||||||||||||||||||
3059 | static unsigned long ssl_session_hash(const SSL_SESSION *a) | - | ||||||||||||||||||||||||||||||||||||
3060 | { | - | ||||||||||||||||||||||||||||||||||||
3061 | const unsigned char *session_id = a->session_id; | - | ||||||||||||||||||||||||||||||||||||
3062 | unsigned long l; | - | ||||||||||||||||||||||||||||||||||||
3063 | unsigned char tmp_storage[4]; | - | ||||||||||||||||||||||||||||||||||||
3064 | - | |||||||||||||||||||||||||||||||||||||
3065 | if (a->session_id_length < sizeof(tmp_storage)
| 33-6375 | ||||||||||||||||||||||||||||||||||||
3066 | memset(tmp_storage, 0, sizeof(tmp_storage)); | - | ||||||||||||||||||||||||||||||||||||
3067 | memcpy(tmp_storage, a->session_id, a->session_id_length); | - | ||||||||||||||||||||||||||||||||||||
3068 | session_id = tmp_storage; | - | ||||||||||||||||||||||||||||||||||||
3069 | } executed 33 times by 1 test: end of block Executed by:
| 33 | ||||||||||||||||||||||||||||||||||||
3070 | - | |||||||||||||||||||||||||||||||||||||
3071 | l = (unsigned long) | - | ||||||||||||||||||||||||||||||||||||
3072 | ((unsigned long)session_id[0]) | | - | ||||||||||||||||||||||||||||||||||||
3073 | ((unsigned long)session_id[1] << 8L) | | - | ||||||||||||||||||||||||||||||||||||
3074 | ((unsigned long)session_id[2] << 16L) | | - | ||||||||||||||||||||||||||||||||||||
3075 | ((unsigned long)session_id[3] << 24L); | - | ||||||||||||||||||||||||||||||||||||
3076 | return executed 6408 times by 1 test: l;return l; Executed by:
executed 6408 times by 1 test: return l; Executed by:
| 6408 | ||||||||||||||||||||||||||||||||||||
3077 | } | - | ||||||||||||||||||||||||||||||||||||
3078 | static int ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b) | - | ||||||||||||||||||||||||||||||||||||
3079 | { | - | ||||||||||||||||||||||||||||||||||||
3080 | if (a->ssl_version != b->ssl_version
| 12-826 | ||||||||||||||||||||||||||||||||||||
3081 | return executed 12 times by 1 test: 1;return 1; Executed by:
executed 12 times by 1 test: return 1; Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
3082 | if (a->session_id_length != b->session_id_length
| 0-826 | ||||||||||||||||||||||||||||||||||||
3083 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
3084 | return executed 826 times by 1 test: memcmp(a->session_id, b->session_id, a->session_id_length);return memcmp(a->session_id, b->session_id, a->session_id_length); Executed by:
executed 826 times by 1 test: return memcmp(a->session_id, b->session_id, a->session_id_length); Executed by:
| 826 | ||||||||||||||||||||||||||||||||||||
3085 | } | - | ||||||||||||||||||||||||||||||||||||
3086 | SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth) | - | ||||||||||||||||||||||||||||||||||||
3087 | { | - | ||||||||||||||||||||||||||||||||||||
3088 | SSL_CTX *ret = | - | ||||||||||||||||||||||||||||||||||||
3089 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
3090 | ; | - | ||||||||||||||||||||||||||||||||||||
3091 | - | |||||||||||||||||||||||||||||||||||||
3092 | if (meth ==
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3093 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3094 | ) { | - | ||||||||||||||||||||||||||||||||||||
3095 | ERR_put_error(20,(169),(196),__FILE__,2883); | - | ||||||||||||||||||||||||||||||||||||
3096 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3097 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3098 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3099 | } | - | ||||||||||||||||||||||||||||||||||||
3100 | - | |||||||||||||||||||||||||||||||||||||
3101 | if (!OPENSSL_init_ssl(0x00200000L,
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3102 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3103 | )
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3104 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3105 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3106 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3107 | - | |||||||||||||||||||||||||||||||||||||
3108 | if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3109 | ERR_put_error(20,(169),(269),__FILE__,2891); | - | ||||||||||||||||||||||||||||||||||||
3110 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3111 | } | - | ||||||||||||||||||||||||||||||||||||
3112 | ret = CRYPTO_zalloc(sizeof(*ret), __FILE__, 2894); | - | ||||||||||||||||||||||||||||||||||||
3113 | if (ret ==
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3114 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3115 | ) | - | ||||||||||||||||||||||||||||||||||||
3116 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3117 | - | |||||||||||||||||||||||||||||||||||||
3118 | ret->method = meth; | - | ||||||||||||||||||||||||||||||||||||
3119 | ret->min_proto_version = 0; | - | ||||||||||||||||||||||||||||||||||||
3120 | ret->max_proto_version = 0; | - | ||||||||||||||||||||||||||||||||||||
3121 | ret->mode = 0x00000004U; | - | ||||||||||||||||||||||||||||||||||||
3122 | ret->session_cache_mode = 0x0002; | - | ||||||||||||||||||||||||||||||||||||
3123 | ret->session_cache_size = (1024*20); | - | ||||||||||||||||||||||||||||||||||||
3124 | - | |||||||||||||||||||||||||||||||||||||
3125 | ret->session_timeout = meth->get_timeout(); | - | ||||||||||||||||||||||||||||||||||||
3126 | ret->references = 1; | - | ||||||||||||||||||||||||||||||||||||
3127 | ret->lock = CRYPTO_THREAD_lock_new(); | - | ||||||||||||||||||||||||||||||||||||
3128 | if (ret->lock ==
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3129 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3130 | ) { | - | ||||||||||||||||||||||||||||||||||||
3131 | ERR_put_error(20,(169),((1|64)),__FILE__,2909); | - | ||||||||||||||||||||||||||||||||||||
3132 | CRYPTO_free(ret, __FILE__, 2910); | - | ||||||||||||||||||||||||||||||||||||
3133 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3134 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3135 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3136 | } | - | ||||||||||||||||||||||||||||||||||||
3137 | ret->max_cert_list = 1024*100; | - | ||||||||||||||||||||||||||||||||||||
3138 | ret->verify_mode = 0x00; | - | ||||||||||||||||||||||||||||||||||||
3139 | if ((
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3140 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3141 | ) | - | ||||||||||||||||||||||||||||||||||||
3142 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3143 | - | |||||||||||||||||||||||||||||||||||||
3144 | ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp); | - | ||||||||||||||||||||||||||||||||||||
3145 | if (ret->sessions ==
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3146 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3147 | ) | - | ||||||||||||||||||||||||||||||||||||
3148 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3149 | ret->cert_store = X509_STORE_new(); | - | ||||||||||||||||||||||||||||||||||||
3150 | if (ret->cert_store ==
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3151 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3152 | ) | - | ||||||||||||||||||||||||||||||||||||
3153 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3154 | - | |||||||||||||||||||||||||||||||||||||
3155 | ret->ctlog_store = CTLOG_STORE_new(); | - | ||||||||||||||||||||||||||||||||||||
3156 | if (ret->ctlog_store ==
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3157 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3158 | ) | - | ||||||||||||||||||||||||||||||||||||
3159 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3160 | - | |||||||||||||||||||||||||||||||||||||
3161 | - | |||||||||||||||||||||||||||||||||||||
3162 | if (!SSL_CTX_set_ciphersuites(ret, "TLS_AES_256_GCM_SHA384:" "TLS_CHACHA20_POLY1305_SHA256:" "TLS_AES_128_GCM_SHA256")
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3163 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3164 | - | |||||||||||||||||||||||||||||||||||||
3165 | if (!ssl_create_cipher_list(ret->method,
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3166 | ret->tls13_ciphersuites,
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3167 | &ret->cipher_list, &ret->cipher_list_by_id,
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3168 | "ALL:!COMPLEMENTOFDEFAULT:!eNULL", ret->cert)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3169 | || sk_SSL_CIPHER_num(ret->cipher_list) <= 0
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3170 | ERR_put_error(20,(169),(161),__FILE__,2938); | - | ||||||||||||||||||||||||||||||||||||
3171 | goto never executed: err2;goto err2; never executed: goto err2; | 0 | ||||||||||||||||||||||||||||||||||||
3172 | } | - | ||||||||||||||||||||||||||||||||||||
3173 | - | |||||||||||||||||||||||||||||||||||||
3174 | ret->param = X509_VERIFY_PARAM_new(); | - | ||||||||||||||||||||||||||||||||||||
3175 | if (ret->param ==
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3176 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3177 | ) | - | ||||||||||||||||||||||||||||||||||||
3178 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3179 | - | |||||||||||||||||||||||||||||||||||||
3180 | if ((
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3181 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3182 | ) { | - | ||||||||||||||||||||||||||||||||||||
3183 | ERR_put_error(20,(169),(242),__FILE__,2947); | - | ||||||||||||||||||||||||||||||||||||
3184 | goto never executed: err2;goto err2; never executed: goto err2; | 0 | ||||||||||||||||||||||||||||||||||||
3185 | } | - | ||||||||||||||||||||||||||||||||||||
3186 | if ((
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3187 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3188 | ) { | - | ||||||||||||||||||||||||||||||||||||
3189 | ERR_put_error(20,(169),(243),__FILE__,2951); | - | ||||||||||||||||||||||||||||||||||||
3190 | goto never executed: err2;goto err2; never executed: goto err2; | 0 | ||||||||||||||||||||||||||||||||||||
3191 | } | - | ||||||||||||||||||||||||||||||||||||
3192 | - | |||||||||||||||||||||||||||||||||||||
3193 | if ((
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3194 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3195 | ) | - | ||||||||||||||||||||||||||||||||||||
3196 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3197 | - | |||||||||||||||||||||||||||||||||||||
3198 | if (!CRYPTO_new_ex_data(1, ret, &ret->ex_data)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3199 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3200 | - | |||||||||||||||||||||||||||||||||||||
3201 | if ((
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3202 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3203 | ) | - | ||||||||||||||||||||||||||||||||||||
3204 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3205 | - | |||||||||||||||||||||||||||||||||||||
3206 | - | |||||||||||||||||||||||||||||||||||||
3207 | if (!(meth->ssl3_enc->enc_flags & 0x8)
| 305-7712 | ||||||||||||||||||||||||||||||||||||
3208 | ret->comp_methods = SSL_COMP_get_compression_methods(); executed 7712 times by 2 tests: ret->comp_methods = SSL_COMP_get_compression_methods(); Executed by:
| 7712 | ||||||||||||||||||||||||||||||||||||
3209 | - | |||||||||||||||||||||||||||||||||||||
3210 | ret->max_send_fragment = 16384; | - | ||||||||||||||||||||||||||||||||||||
3211 | ret->split_send_fragment = 16384; | - | ||||||||||||||||||||||||||||||||||||
3212 | - | |||||||||||||||||||||||||||||||||||||
3213 | - | |||||||||||||||||||||||||||||||||||||
3214 | if ((
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3215 | sizeof(ret->ext.tick_key_name)) <= 0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3216 | || (
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3217 | sizeof(ret->ext.secure->tick_hmac_key)) <= 0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3218 | || (
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3219 | sizeof(ret->ext.secure->tick_aes_key)) <= 0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3220 | ret->options |= 0x00004000U; never executed: ret->options |= 0x00004000U; | 0 | ||||||||||||||||||||||||||||||||||||
3221 | - | |||||||||||||||||||||||||||||||||||||
3222 | if (RAND_priv_bytes(ret->ext.cookie_hmac_key,
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3223 | sizeof(ret->ext.cookie_hmac_key)) <= 0
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3224 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3225 | - | |||||||||||||||||||||||||||||||||||||
3226 | - | |||||||||||||||||||||||||||||||||||||
3227 | if (!SSL_CTX_SRP_CTX_init(ret)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3228 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3229 | ret->options |= 0x00000004U; | - | ||||||||||||||||||||||||||||||||||||
3230 | ret->options |= 0x00020000U | 0x00100000U; | - | ||||||||||||||||||||||||||||||||||||
3231 | - | |||||||||||||||||||||||||||||||||||||
3232 | ret->ext.status_type = -1; | - | ||||||||||||||||||||||||||||||||||||
3233 | ret->max_early_data = 0; | - | ||||||||||||||||||||||||||||||||||||
3234 | ret->recv_max_early_data = 16384; | - | ||||||||||||||||||||||||||||||||||||
3235 | - | |||||||||||||||||||||||||||||||||||||
3236 | - | |||||||||||||||||||||||||||||||||||||
3237 | ret->num_tickets = 2; | - | ||||||||||||||||||||||||||||||||||||
3238 | - | |||||||||||||||||||||||||||||||||||||
3239 | ssl_ctx_system_config(ret); | - | ||||||||||||||||||||||||||||||||||||
3240 | - | |||||||||||||||||||||||||||||||||||||
3241 | return executed 8017 times by 2 tests: ret;return ret; Executed by:
executed 8017 times by 2 tests: return ret; Executed by:
| 8017 | ||||||||||||||||||||||||||||||||||||
3242 | err: | - | ||||||||||||||||||||||||||||||||||||
3243 | ERR_put_error(20,(169),((1|64)),__FILE__,3058); | - | ||||||||||||||||||||||||||||||||||||
3244 | err2: code before this statement never executed: err2: | 0 | ||||||||||||||||||||||||||||||||||||
3245 | SSL_CTX_free(ret); | - | ||||||||||||||||||||||||||||||||||||
3246 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3247 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3248 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3249 | } | - | ||||||||||||||||||||||||||||||||||||
3250 | - | |||||||||||||||||||||||||||||||||||||
3251 | int SSL_CTX_up_ref(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
3252 | { | - | ||||||||||||||||||||||||||||||||||||
3253 | int i; | - | ||||||||||||||||||||||||||||||||||||
3254 | - | |||||||||||||||||||||||||||||||||||||
3255 | if (CRYPTO_UP_REF(&ctx->references, &i, ctx->lock) <= 0
| 0-16532 | ||||||||||||||||||||||||||||||||||||
3256 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
3257 | - | |||||||||||||||||||||||||||||||||||||
3258 | ; | - | ||||||||||||||||||||||||||||||||||||
3259 | ; | - | ||||||||||||||||||||||||||||||||||||
3260 | return executed 16532 times by 2 tests: ((return ((i > 1) ? 1 : 0); Executed by:
executed 16532 times by 2 tests: return ((i > 1) ? 1 : 0); Executed by:
| 0-16532 | ||||||||||||||||||||||||||||||||||||
3261 | } | - | ||||||||||||||||||||||||||||||||||||
3262 | - | |||||||||||||||||||||||||||||||||||||
3263 | void SSL_CTX_free(SSL_CTX *a) | - | ||||||||||||||||||||||||||||||||||||
3264 | { | - | ||||||||||||||||||||||||||||||||||||
3265 | int i; | - | ||||||||||||||||||||||||||||||||||||
3266 | - | |||||||||||||||||||||||||||||||||||||
3267 | if (a ==
| 3272-24549 | ||||||||||||||||||||||||||||||||||||
3268 | ((void *)0)
| 3272-24549 | ||||||||||||||||||||||||||||||||||||
3269 | ) | - | ||||||||||||||||||||||||||||||||||||
3270 | return; executed 3272 times by 1 test: return; Executed by:
| 3272 | ||||||||||||||||||||||||||||||||||||
3271 | - | |||||||||||||||||||||||||||||||||||||
3272 | CRYPTO_DOWN_REF(&a->references, &i, a->lock); | - | ||||||||||||||||||||||||||||||||||||
3273 | ; | - | ||||||||||||||||||||||||||||||||||||
3274 | if (i > 0
| 8017-16532 | ||||||||||||||||||||||||||||||||||||
3275 | return; executed 16532 times by 2 tests: return; Executed by:
| 16532 | ||||||||||||||||||||||||||||||||||||
3276 | ; | - | ||||||||||||||||||||||||||||||||||||
3277 | - | |||||||||||||||||||||||||||||||||||||
3278 | X509_VERIFY_PARAM_free(a->param); | - | ||||||||||||||||||||||||||||||||||||
3279 | dane_ctx_final(&a->dane); | - | ||||||||||||||||||||||||||||||||||||
3280 | if (a->sessions !=
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3281 | ((void *)0)
| 0-8017 | ||||||||||||||||||||||||||||||||||||
3282 | ) | - | ||||||||||||||||||||||||||||||||||||
3283 | SSL_CTX_flush_sessions(a, 0); executed 8017 times by 2 tests: SSL_CTX_flush_sessions(a, 0); Executed by:
| 8017 | ||||||||||||||||||||||||||||||||||||
3284 | - | |||||||||||||||||||||||||||||||||||||
3285 | CRYPTO_free_ex_data(1, a, &a->ex_data); | - | ||||||||||||||||||||||||||||||||||||
3286 | lh_SSL_SESSION_free(a->sessions); | - | ||||||||||||||||||||||||||||||||||||
3287 | X509_STORE_free(a->cert_store); | - | ||||||||||||||||||||||||||||||||||||
3288 | - | |||||||||||||||||||||||||||||||||||||
3289 | CTLOG_STORE_free(a->ctlog_store); | - | ||||||||||||||||||||||||||||||||||||
3290 | - | |||||||||||||||||||||||||||||||||||||
3291 | sk_SSL_CIPHER_free(a->cipher_list); | - | ||||||||||||||||||||||||||||||||||||
3292 | sk_SSL_CIPHER_free(a->cipher_list_by_id); | - | ||||||||||||||||||||||||||||||||||||
3293 | sk_SSL_CIPHER_free(a->tls13_ciphersuites); | - | ||||||||||||||||||||||||||||||||||||
3294 | ssl_cert_free(a->cert); | - | ||||||||||||||||||||||||||||||||||||
3295 | sk_X509_NAME_pop_free(a->ca_names, X509_NAME_free); | - | ||||||||||||||||||||||||||||||||||||
3296 | sk_X509_pop_free(a->extra_certs, X509_free); | - | ||||||||||||||||||||||||||||||||||||
3297 | a->comp_methods = | - | ||||||||||||||||||||||||||||||||||||
3298 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
3299 | ; | - | ||||||||||||||||||||||||||||||||||||
3300 | - | |||||||||||||||||||||||||||||||||||||
3301 | sk_SRTP_PROTECTION_PROFILE_free(a->srtp_profiles); | - | ||||||||||||||||||||||||||||||||||||
3302 | - | |||||||||||||||||||||||||||||||||||||
3303 | - | |||||||||||||||||||||||||||||||||||||
3304 | SSL_CTX_SRP_CTX_free(a); | - | ||||||||||||||||||||||||||||||||||||
3305 | - | |||||||||||||||||||||||||||||||||||||
3306 | - | |||||||||||||||||||||||||||||||||||||
3307 | ENGINE_finish(a->client_cert_engine); | - | ||||||||||||||||||||||||||||||||||||
3308 | - | |||||||||||||||||||||||||||||||||||||
3309 | - | |||||||||||||||||||||||||||||||||||||
3310 | - | |||||||||||||||||||||||||||||||||||||
3311 | CRYPTO_free(a->ext.ecpointformats, __FILE__, 3128); | - | ||||||||||||||||||||||||||||||||||||
3312 | CRYPTO_free(a->ext.supportedgroups, __FILE__, 3129); | - | ||||||||||||||||||||||||||||||||||||
3313 | - | |||||||||||||||||||||||||||||||||||||
3314 | CRYPTO_free(a->ext.alpn, __FILE__, 3131); | - | ||||||||||||||||||||||||||||||||||||
3315 | CRYPTO_secure_free(a->ext.secure, __FILE__, 3132); | - | ||||||||||||||||||||||||||||||||||||
3316 | - | |||||||||||||||||||||||||||||||||||||
3317 | CRYPTO_THREAD_lock_free(a->lock); | - | ||||||||||||||||||||||||||||||||||||
3318 | - | |||||||||||||||||||||||||||||||||||||
3319 | CRYPTO_free(a, __FILE__, 3136); | - | ||||||||||||||||||||||||||||||||||||
3320 | } executed 8017 times by 2 tests: end of block Executed by:
| 8017 | ||||||||||||||||||||||||||||||||||||
3321 | - | |||||||||||||||||||||||||||||||||||||
3322 | void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) | - | ||||||||||||||||||||||||||||||||||||
3323 | { | - | ||||||||||||||||||||||||||||||||||||
3324 | ctx->default_passwd_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
3325 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3326 | - | |||||||||||||||||||||||||||||||||||||
3327 | void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u) | - | ||||||||||||||||||||||||||||||||||||
3328 | { | - | ||||||||||||||||||||||||||||||||||||
3329 | ctx->default_passwd_callback_userdata = u; | - | ||||||||||||||||||||||||||||||||||||
3330 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3331 | - | |||||||||||||||||||||||||||||||||||||
3332 | pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
3333 | { | - | ||||||||||||||||||||||||||||||||||||
3334 | return never executed: ctx->default_passwd_callback;return ctx->default_passwd_callback; never executed: return ctx->default_passwd_callback; | 0 | ||||||||||||||||||||||||||||||||||||
3335 | } | - | ||||||||||||||||||||||||||||||||||||
3336 | - | |||||||||||||||||||||||||||||||||||||
3337 | void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
3338 | { | - | ||||||||||||||||||||||||||||||||||||
3339 | return never executed: ctx->default_passwd_callback_userdata;return ctx->default_passwd_callback_userdata; never executed: return ctx->default_passwd_callback_userdata; | 0 | ||||||||||||||||||||||||||||||||||||
3340 | } | - | ||||||||||||||||||||||||||||||||||||
3341 | - | |||||||||||||||||||||||||||||||||||||
3342 | void SSL_set_default_passwd_cb(SSL *s, pem_password_cb *cb) | - | ||||||||||||||||||||||||||||||||||||
3343 | { | - | ||||||||||||||||||||||||||||||||||||
3344 | s->default_passwd_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
3345 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3346 | - | |||||||||||||||||||||||||||||||||||||
3347 | void SSL_set_default_passwd_cb_userdata(SSL *s, void *u) | - | ||||||||||||||||||||||||||||||||||||
3348 | { | - | ||||||||||||||||||||||||||||||||||||
3349 | s->default_passwd_callback_userdata = u; | - | ||||||||||||||||||||||||||||||||||||
3350 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3351 | - | |||||||||||||||||||||||||||||||||||||
3352 | pem_password_cb *SSL_get_default_passwd_cb(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3353 | { | - | ||||||||||||||||||||||||||||||||||||
3354 | return never executed: s->default_passwd_callback;return s->default_passwd_callback; never executed: return s->default_passwd_callback; | 0 | ||||||||||||||||||||||||||||||||||||
3355 | } | - | ||||||||||||||||||||||||||||||||||||
3356 | - | |||||||||||||||||||||||||||||||||||||
3357 | void *SSL_get_default_passwd_cb_userdata(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3358 | { | - | ||||||||||||||||||||||||||||||||||||
3359 | return never executed: s->default_passwd_callback_userdata;return s->default_passwd_callback_userdata; never executed: return s->default_passwd_callback_userdata; | 0 | ||||||||||||||||||||||||||||||||||||
3360 | } | - | ||||||||||||||||||||||||||||||||||||
3361 | - | |||||||||||||||||||||||||||||||||||||
3362 | void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
3363 | int (*cb) (X509_STORE_CTX *, void *), | - | ||||||||||||||||||||||||||||||||||||
3364 | void *arg) | - | ||||||||||||||||||||||||||||||||||||
3365 | { | - | ||||||||||||||||||||||||||||||||||||
3366 | ctx->app_verify_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
3367 | ctx->app_verify_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
3368 | } executed 15 times by 1 test: end of block Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
3369 | - | |||||||||||||||||||||||||||||||||||||
3370 | void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, | - | ||||||||||||||||||||||||||||||||||||
3371 | int (*cb) (int, X509_STORE_CTX *)) | - | ||||||||||||||||||||||||||||||||||||
3372 | { | - | ||||||||||||||||||||||||||||||||||||
3373 | ctx->verify_mode = mode; | - | ||||||||||||||||||||||||||||||||||||
3374 | ctx->default_verify_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
3375 | } executed 382 times by 1 test: end of block Executed by:
| 382 | ||||||||||||||||||||||||||||||||||||
3376 | - | |||||||||||||||||||||||||||||||||||||
3377 | void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth) | - | ||||||||||||||||||||||||||||||||||||
3378 | { | - | ||||||||||||||||||||||||||||||||||||
3379 | X509_VERIFY_PARAM_set_depth(ctx->param, depth); | - | ||||||||||||||||||||||||||||||||||||
3380 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3381 | - | |||||||||||||||||||||||||||||||||||||
3382 | void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg), void *arg) | - | ||||||||||||||||||||||||||||||||||||
3383 | { | - | ||||||||||||||||||||||||||||||||||||
3384 | ssl_cert_set_cert_cb(c->cert, cb, arg); | - | ||||||||||||||||||||||||||||||||||||
3385 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
3386 | - | |||||||||||||||||||||||||||||||||||||
3387 | void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg) | - | ||||||||||||||||||||||||||||||||||||
3388 | { | - | ||||||||||||||||||||||||||||||||||||
3389 | ssl_cert_set_cert_cb(s->cert, cb, arg); | - | ||||||||||||||||||||||||||||||||||||
3390 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3391 | - | |||||||||||||||||||||||||||||||||||||
3392 | void ssl_set_masks(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3393 | { | - | ||||||||||||||||||||||||||||||||||||
3394 | CERT *c = s->cert; | - | ||||||||||||||||||||||||||||||||||||
3395 | uint32_t *pvalid = s->s3->tmp.valid_flags; | - | ||||||||||||||||||||||||||||||||||||
3396 | int rsa_enc, rsa_sign, dh_tmp, dsa_sign; | - | ||||||||||||||||||||||||||||||||||||
3397 | unsigned long mask_k, mask_a; | - | ||||||||||||||||||||||||||||||||||||
3398 | - | |||||||||||||||||||||||||||||||||||||
3399 | int have_ecc_cert, ecdsa_ok; | - | ||||||||||||||||||||||||||||||||||||
3400 | - | |||||||||||||||||||||||||||||||||||||
3401 | if (c ==
| 0-1622 | ||||||||||||||||||||||||||||||||||||
3402 | ((void *)0)
| 0-1622 | ||||||||||||||||||||||||||||||||||||
3403 | ) | - | ||||||||||||||||||||||||||||||||||||
3404 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
3405 | - | |||||||||||||||||||||||||||||||||||||
3406 | - | |||||||||||||||||||||||||||||||||||||
3407 | dh_tmp = (c->dh_tmp !=
| 123-1499 | ||||||||||||||||||||||||||||||||||||
3408 | ((void *)0)
| 123-1499 | ||||||||||||||||||||||||||||||||||||
3409 | || c->dh_tmp_cb !=
| 0-1499 | ||||||||||||||||||||||||||||||||||||
3410 | ((void *)0)
| 0-1499 | ||||||||||||||||||||||||||||||||||||
3411 | || c->dh_tmp_auto
| 194-1305 | ||||||||||||||||||||||||||||||||||||
3412 | - | |||||||||||||||||||||||||||||||||||||
3413 | - | |||||||||||||||||||||||||||||||||||||
3414 | - | |||||||||||||||||||||||||||||||||||||
3415 | - | |||||||||||||||||||||||||||||||||||||
3416 | rsa_enc = pvalid[0] & 0x1; | - | ||||||||||||||||||||||||||||||||||||
3417 | rsa_sign = pvalid[0] & 0x1; | - | ||||||||||||||||||||||||||||||||||||
3418 | dsa_sign = pvalid[2] & 0x1; | - | ||||||||||||||||||||||||||||||||||||
3419 | - | |||||||||||||||||||||||||||||||||||||
3420 | have_ecc_cert = pvalid[3] & 0x1; | - | ||||||||||||||||||||||||||||||||||||
3421 | - | |||||||||||||||||||||||||||||||||||||
3422 | mask_k = 0; | - | ||||||||||||||||||||||||||||||||||||
3423 | mask_a = 0; | - | ||||||||||||||||||||||||||||||||||||
3424 | - | |||||||||||||||||||||||||||||||||||||
3425 | - | |||||||||||||||||||||||||||||||||||||
3426 | - | |||||||||||||||||||||||||||||||||||||
3427 | - | |||||||||||||||||||||||||||||||||||||
3428 | - | |||||||||||||||||||||||||||||||||||||
3429 | - | |||||||||||||||||||||||||||||||||||||
3430 | - | |||||||||||||||||||||||||||||||||||||
3431 | if (ssl_has_cert(s, 6)
| 0-1622 | ||||||||||||||||||||||||||||||||||||
3432 | mask_k |= 0x00000010U; | - | ||||||||||||||||||||||||||||||||||||
3433 | mask_a |= 0x00000080U; | - | ||||||||||||||||||||||||||||||||||||
3434 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3435 | if (ssl_has_cert(s, 5)
| 0-1622 | ||||||||||||||||||||||||||||||||||||
3436 | mask_k |= 0x00000010U; | - | ||||||||||||||||||||||||||||||||||||
3437 | mask_a |= 0x00000080U; | - | ||||||||||||||||||||||||||||||||||||
3438 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3439 | if (ssl_has_cert(s, 4)
| 0-1622 | ||||||||||||||||||||||||||||||||||||
3440 | mask_k |= 0x00000010U; | - | ||||||||||||||||||||||||||||||||||||
3441 | mask_a |= 0x00000020U; | - | ||||||||||||||||||||||||||||||||||||
3442 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3443 | - | |||||||||||||||||||||||||||||||||||||
3444 | - | |||||||||||||||||||||||||||||||||||||
3445 | if (rsa_enc
| 32-1590 | ||||||||||||||||||||||||||||||||||||
3446 | mask_k |= 0x00000001U; executed 1590 times by 1 test: mask_k |= 0x00000001U; Executed by:
| 1590 | ||||||||||||||||||||||||||||||||||||
3447 | - | |||||||||||||||||||||||||||||||||||||
3448 | if (dh_tmp
| 317-1305 | ||||||||||||||||||||||||||||||||||||
3449 | mask_k |= 0x00000002U; executed 317 times by 1 test: mask_k |= 0x00000002U; Executed by:
| 317 | ||||||||||||||||||||||||||||||||||||
3450 | - | |||||||||||||||||||||||||||||||||||||
3451 | - | |||||||||||||||||||||||||||||||||||||
3452 | - | |||||||||||||||||||||||||||||||||||||
3453 | - | |||||||||||||||||||||||||||||||||||||
3454 | - | |||||||||||||||||||||||||||||||||||||
3455 | - | |||||||||||||||||||||||||||||||||||||
3456 | if (rsa_enc
| 0-1590 | ||||||||||||||||||||||||||||||||||||
3457 | && pvalid[1] & 0x100
| 0-2 | ||||||||||||||||||||||||||||||||||||
3458 | && ((
| 0-2 | ||||||||||||||||||||||||||||||||||||
3459 | mask_a |= 0x00000001U; executed 1591 times by 1 test: mask_a |= 0x00000001U; Executed by:
| 1591 | ||||||||||||||||||||||||||||||||||||
3460 | - | |||||||||||||||||||||||||||||||||||||
3461 | if (dsa_sign
| 668-954 | ||||||||||||||||||||||||||||||||||||
3462 | mask_a |= 0x00000002U; | - | ||||||||||||||||||||||||||||||||||||
3463 | } executed 668 times by 1 test: end of block Executed by:
| 668 | ||||||||||||||||||||||||||||||||||||
3464 | - | |||||||||||||||||||||||||||||||||||||
3465 | mask_a |= 0x00000004U; | - | ||||||||||||||||||||||||||||||||||||
3466 | - | |||||||||||||||||||||||||||||||||||||
3467 | - | |||||||||||||||||||||||||||||||||||||
3468 | - | |||||||||||||||||||||||||||||||||||||
3469 | - | |||||||||||||||||||||||||||||||||||||
3470 | - | |||||||||||||||||||||||||||||||||||||
3471 | - | |||||||||||||||||||||||||||||||||||||
3472 | if (have_ecc_cert
| 525-1097 | ||||||||||||||||||||||||||||||||||||
3473 | uint32_t ex_kusage; | - | ||||||||||||||||||||||||||||||||||||
3474 | ex_kusage = X509_get_key_usage(c->pkeys[3].x509); | - | ||||||||||||||||||||||||||||||||||||
3475 | ecdsa_ok = ex_kusage & 0x0080; | - | ||||||||||||||||||||||||||||||||||||
3476 | if (!(pvalid[3] & 0x2)
| 33-492 | ||||||||||||||||||||||||||||||||||||
3477 | ecdsa_ok = 0; executed 33 times by 1 test: ecdsa_ok = 0; Executed by:
| 33 | ||||||||||||||||||||||||||||||||||||
3478 | if (ecdsa_ok
| 33-492 | ||||||||||||||||||||||||||||||||||||
3479 | mask_a |= 0x00000008U; executed 492 times by 1 test: mask_a |= 0x00000008U; Executed by:
| 492 | ||||||||||||||||||||||||||||||||||||
3480 | } executed 525 times by 1 test: end of block Executed by:
| 525 | ||||||||||||||||||||||||||||||||||||
3481 | - | |||||||||||||||||||||||||||||||||||||
3482 | if (!(mask_a & 0x00000008U)
| 6-1130 | ||||||||||||||||||||||||||||||||||||
3483 | && pvalid[7] & 0x100
| 1-5 | ||||||||||||||||||||||||||||||||||||
3484 | && ((
| 0-1 | ||||||||||||||||||||||||||||||||||||
3485 | mask_a |= 0x00000008U; executed 1 time by 1 test: mask_a |= 0x00000008U; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
3486 | - | |||||||||||||||||||||||||||||||||||||
3487 | - | |||||||||||||||||||||||||||||||||||||
3488 | if (!(mask_a & 0x00000008U)
| 5-1129 | ||||||||||||||||||||||||||||||||||||
3489 | && pvalid[8] & 0x100
| 1-4 | ||||||||||||||||||||||||||||||||||||
3490 | && ((
| 0-1 | ||||||||||||||||||||||||||||||||||||
3491 | mask_a |= 0x00000008U; executed 1 time by 1 test: mask_a |= 0x00000008U; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
3492 | - | |||||||||||||||||||||||||||||||||||||
3493 | - | |||||||||||||||||||||||||||||||||||||
3494 | - | |||||||||||||||||||||||||||||||||||||
3495 | mask_k |= 0x00000004U; | - | ||||||||||||||||||||||||||||||||||||
3496 | - | |||||||||||||||||||||||||||||||||||||
3497 | - | |||||||||||||||||||||||||||||||||||||
3498 | - | |||||||||||||||||||||||||||||||||||||
3499 | mask_k |= 0x00000008U; | - | ||||||||||||||||||||||||||||||||||||
3500 | mask_a |= 0x00000010U; | - | ||||||||||||||||||||||||||||||||||||
3501 | if (mask_k & 0x00000001U
| 32-1590 | ||||||||||||||||||||||||||||||||||||
3502 | mask_k |= 0x00000040U; executed 1590 times by 1 test: mask_k |= 0x00000040U; Executed by:
| 1590 | ||||||||||||||||||||||||||||||||||||
3503 | if (mask_k & 0x00000002U
| 317-1305 | ||||||||||||||||||||||||||||||||||||
3504 | mask_k |= 0x00000100U; executed 317 times by 1 test: mask_k |= 0x00000100U; Executed by:
| 317 | ||||||||||||||||||||||||||||||||||||
3505 | if (mask_k & 0x00000004U
| 0-1622 | ||||||||||||||||||||||||||||||||||||
3506 | mask_k |= 0x00000080U; executed 1622 times by 1 test: mask_k |= 0x00000080U; Executed by:
| 1622 | ||||||||||||||||||||||||||||||||||||
3507 | - | |||||||||||||||||||||||||||||||||||||
3508 | - | |||||||||||||||||||||||||||||||||||||
3509 | s->s3->tmp.mask_k = mask_k; | - | ||||||||||||||||||||||||||||||||||||
3510 | s->s3->tmp.mask_a = mask_a; | - | ||||||||||||||||||||||||||||||||||||
3511 | } executed 1622 times by 1 test: end of block Executed by:
| 1622 | ||||||||||||||||||||||||||||||||||||
3512 | - | |||||||||||||||||||||||||||||||||||||
3513 | - | |||||||||||||||||||||||||||||||||||||
3514 | - | |||||||||||||||||||||||||||||||||||||
3515 | int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3516 | { | - | ||||||||||||||||||||||||||||||||||||
3517 | if (s->s3->tmp.new_cipher->algorithm_auth & 0x00000008U
| 0-31 | ||||||||||||||||||||||||||||||||||||
3518 | - | |||||||||||||||||||||||||||||||||||||
3519 | if (!(X509_get_key_usage(x) & 0x0080)
| 0-31 | ||||||||||||||||||||||||||||||||||||
3520 | ERR_put_error(20,(279),(318),__FILE__,3332) | - | ||||||||||||||||||||||||||||||||||||
3521 | ; | - | ||||||||||||||||||||||||||||||||||||
3522 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
3523 | } | - | ||||||||||||||||||||||||||||||||||||
3524 | } executed 31 times by 1 test: end of block Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||
3525 | return executed 31 times by 1 test: 1;return 1; Executed by:
executed 31 times by 1 test: return 1; Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||
3526 | } | - | ||||||||||||||||||||||||||||||||||||
3527 | - | |||||||||||||||||||||||||||||||||||||
3528 | - | |||||||||||||||||||||||||||||||||||||
3529 | - | |||||||||||||||||||||||||||||||||||||
3530 | int ssl_get_server_cert_serverinfo(SSL *s, const unsigned char **serverinfo, | - | ||||||||||||||||||||||||||||||||||||
3531 | size_t *serverinfo_length) | - | ||||||||||||||||||||||||||||||||||||
3532 | { | - | ||||||||||||||||||||||||||||||||||||
3533 | CERT_PKEY *cpk = s->s3->tmp.cert; | - | ||||||||||||||||||||||||||||||||||||
3534 | *serverinfo_length = 0; | - | ||||||||||||||||||||||||||||||||||||
3535 | - | |||||||||||||||||||||||||||||||||||||
3536 | if (cpk ==
| 0-8 | ||||||||||||||||||||||||||||||||||||
3537 | ((void *)0)
| 0-8 | ||||||||||||||||||||||||||||||||||||
3538 | || cpk->serverinfo ==
| 0-8 | ||||||||||||||||||||||||||||||||||||
3539 | ((void *)0)
| 0-8 | ||||||||||||||||||||||||||||||||||||
3540 | ) | - | ||||||||||||||||||||||||||||||||||||
3541 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
3542 | - | |||||||||||||||||||||||||||||||||||||
3543 | *serverinfo = cpk->serverinfo; | - | ||||||||||||||||||||||||||||||||||||
3544 | *serverinfo_length = cpk->serverinfo_length; | - | ||||||||||||||||||||||||||||||||||||
3545 | return executed 8 times by 1 test: 1;return 1; Executed by:
executed 8 times by 1 test: return 1; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
3546 | } | - | ||||||||||||||||||||||||||||||||||||
3547 | - | |||||||||||||||||||||||||||||||||||||
3548 | void ssl_update_cache(SSL *s, int mode) | - | ||||||||||||||||||||||||||||||||||||
3549 | { | - | ||||||||||||||||||||||||||||||||||||
3550 | int i; | - | ||||||||||||||||||||||||||||||||||||
3551 | - | |||||||||||||||||||||||||||||||||||||
3552 | - | |||||||||||||||||||||||||||||||||||||
3553 | - | |||||||||||||||||||||||||||||||||||||
3554 | - | |||||||||||||||||||||||||||||||||||||
3555 | - | |||||||||||||||||||||||||||||||||||||
3556 | if (s->session->session_id_length == 0
| 895-3177 | ||||||||||||||||||||||||||||||||||||
3557 | return; executed 895 times by 1 test: return; Executed by:
| 895 | ||||||||||||||||||||||||||||||||||||
3558 | if (s->server
| 190-1990 | ||||||||||||||||||||||||||||||||||||
3559 | && (
| 48-949 | ||||||||||||||||||||||||||||||||||||
3560 | return; executed 48 times by 1 test: return; Executed by:
| 48 | ||||||||||||||||||||||||||||||||||||
3561 | - | |||||||||||||||||||||||||||||||||||||
3562 | i = s->session_ctx->session_cache_mode; | - | ||||||||||||||||||||||||||||||||||||
3563 | if ((
| 1299-1830 | ||||||||||||||||||||||||||||||||||||
3564 | && (!s->hit
| 0-1093 | ||||||||||||||||||||||||||||||||||||
3565 | if ((
| 258-974 | ||||||||||||||||||||||||||||||||||||
3566 | && (!(!(s->method->ssl3_enc->enc_flags & 0x8)
| 0-957 | ||||||||||||||||||||||||||||||||||||
3567 | || !s->server
| 10-880 | ||||||||||||||||||||||||||||||||||||
3568 | || (s->max_early_data > 0
| 147-733 | ||||||||||||||||||||||||||||||||||||
3569 | && (
| 32-115 | ||||||||||||||||||||||||||||||||||||
3570 | || s->session_ctx->remove_session_cb !=
| 3-762 | ||||||||||||||||||||||||||||||||||||
3571 | ((void *)0)
| 3-762 | ||||||||||||||||||||||||||||||||||||
3572 | - | |||||||||||||||||||||||||||||||||||||
3573 | || (
| 61-701 | ||||||||||||||||||||||||||||||||||||
3574 | SSL_CTX_add_session(s->session_ctx, s->session); executed 273 times by 1 test: SSL_CTX_add_session(s->session_ctx, s->session); Executed by:
| 273 | ||||||||||||||||||||||||||||||||||||
3575 | - | |||||||||||||||||||||||||||||||||||||
3576 | - | |||||||||||||||||||||||||||||||||||||
3577 | - | |||||||||||||||||||||||||||||||||||||
3578 | - | |||||||||||||||||||||||||||||||||||||
3579 | - | |||||||||||||||||||||||||||||||||||||
3580 | - | |||||||||||||||||||||||||||||||||||||
3581 | if (s->session_ctx->new_session_cb !=
| 269-963 | ||||||||||||||||||||||||||||||||||||
3582 | ((void *)0)
| 269-963 | ||||||||||||||||||||||||||||||||||||
3583 | ) { | - | ||||||||||||||||||||||||||||||||||||
3584 | SSL_SESSION_up_ref(s->session); | - | ||||||||||||||||||||||||||||||||||||
3585 | if (!s->session_ctx->new_session_cb(s, s->session)
| 85-184 | ||||||||||||||||||||||||||||||||||||
3586 | SSL_SESSION_free(s->session); executed 184 times by 1 test: SSL_SESSION_free(s->session); Executed by:
| 184 | ||||||||||||||||||||||||||||||||||||
3587 | } executed 269 times by 1 test: end of block Executed by:
| 269 | ||||||||||||||||||||||||||||||||||||
3588 | } executed 1232 times by 1 test: end of block Executed by:
| 1232 | ||||||||||||||||||||||||||||||||||||
3589 | - | |||||||||||||||||||||||||||||||||||||
3590 | - | |||||||||||||||||||||||||||||||||||||
3591 | if ((
| 0-3129 | ||||||||||||||||||||||||||||||||||||
3592 | _Atomic int *stat; | - | ||||||||||||||||||||||||||||||||||||
3593 | if (mode & 0x0001
| 180-1119 | ||||||||||||||||||||||||||||||||||||
3594 | stat = &s->session_ctx->stats.sess_connect_good; executed 180 times by 1 test: stat = &s->session_ctx->stats.sess_connect_good; Executed by:
| 180 | ||||||||||||||||||||||||||||||||||||
3595 | else | - | ||||||||||||||||||||||||||||||||||||
3596 | stat = &s->session_ctx->stats.sess_accept_good; executed 1119 times by 1 test: stat = &s->session_ctx->stats.sess_accept_good; Executed by:
| 1119 | ||||||||||||||||||||||||||||||||||||
3597 | if ((
| 0-1299 | ||||||||||||||||||||||||||||||||||||
3598 | __extension__ ({ __auto_type __atomic_load_ptr = (
| 0-1299 | ||||||||||||||||||||||||||||||||||||
3599 | (stat)
| 0-1299 | ||||||||||||||||||||||||||||||||||||
3600 | ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (
| 0-1299 | ||||||||||||||||||||||||||||||||||||
3601 | memory_order_relaxed
| 0-1299 | ||||||||||||||||||||||||||||||||||||
3602 | )); __atomic_load_tmp; })
| 0-1299 | ||||||||||||||||||||||||||||||||||||
3603 | & 0xff) == 0xff
| 0-1299 | ||||||||||||||||||||||||||||||||||||
3604 | SSL_CTX_flush_sessions(s->session_ctx, (unsigned long)time( never executed: SSL_CTX_flush_sessions(s->session_ctx, (unsigned long)time( ((void *)0) )); | 0 | ||||||||||||||||||||||||||||||||||||
3605 | ((void *)0) never executed: SSL_CTX_flush_sessions(s->session_ctx, (unsigned long)time( ((void *)0) )); | 0 | ||||||||||||||||||||||||||||||||||||
3606 | )); never executed: SSL_CTX_flush_sessions(s->session_ctx, (unsigned long)time( ((void *)0) )); | 0 | ||||||||||||||||||||||||||||||||||||
3607 | } executed 1299 times by 1 test: end of block Executed by:
| 1299 | ||||||||||||||||||||||||||||||||||||
3608 | } executed 3129 times by 1 test: end of block Executed by:
| 3129 | ||||||||||||||||||||||||||||||||||||
3609 | - | |||||||||||||||||||||||||||||||||||||
3610 | const SSL_METHOD *SSL_CTX_get_ssl_method(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
3611 | { | - | ||||||||||||||||||||||||||||||||||||
3612 | return never executed: ctx->method;return ctx->method; never executed: return ctx->method; | 0 | ||||||||||||||||||||||||||||||||||||
3613 | } | - | ||||||||||||||||||||||||||||||||||||
3614 | - | |||||||||||||||||||||||||||||||||||||
3615 | const SSL_METHOD *SSL_get_ssl_method(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3616 | { | - | ||||||||||||||||||||||||||||||||||||
3617 | return never executed: s->method;return s->method; never executed: return s->method; | 0 | ||||||||||||||||||||||||||||||||||||
3618 | } | - | ||||||||||||||||||||||||||||||||||||
3619 | - | |||||||||||||||||||||||||||||||||||||
3620 | int SSL_set_ssl_method(SSL *s, const SSL_METHOD *meth) | - | ||||||||||||||||||||||||||||||||||||
3621 | { | - | ||||||||||||||||||||||||||||||||||||
3622 | int ret = 1; | - | ||||||||||||||||||||||||||||||||||||
3623 | - | |||||||||||||||||||||||||||||||||||||
3624 | if (s->method != meth
| 0-33 | ||||||||||||||||||||||||||||||||||||
3625 | const SSL_METHOD *sm = s->method; | - | ||||||||||||||||||||||||||||||||||||
3626 | int (*hf) (SSL *) = s->handshake_func; | - | ||||||||||||||||||||||||||||||||||||
3627 | - | |||||||||||||||||||||||||||||||||||||
3628 | if (sm->version == meth->version
| 0-33 | ||||||||||||||||||||||||||||||||||||
3629 | s->method = meth; never executed: s->method = meth; | 0 | ||||||||||||||||||||||||||||||||||||
3630 | else { | - | ||||||||||||||||||||||||||||||||||||
3631 | sm->ssl_free(s); | - | ||||||||||||||||||||||||||||||||||||
3632 | s->method = meth; | - | ||||||||||||||||||||||||||||||||||||
3633 | ret = s->method->ssl_new(s); | - | ||||||||||||||||||||||||||||||||||||
3634 | } executed 33 times by 1 test: end of block Executed by:
| 33 | ||||||||||||||||||||||||||||||||||||
3635 | - | |||||||||||||||||||||||||||||||||||||
3636 | if (hf == sm->ssl_connect
| 0-33 | ||||||||||||||||||||||||||||||||||||
3637 | s->handshake_func = meth->ssl_connect; executed 33 times by 1 test: s->handshake_func = meth->ssl_connect; Executed by:
| 33 | ||||||||||||||||||||||||||||||||||||
3638 | else if (hf == sm->ssl_accept
| 0 | ||||||||||||||||||||||||||||||||||||
3639 | s->handshake_func = meth->ssl_accept; never executed: s->handshake_func = meth->ssl_accept; | 0 | ||||||||||||||||||||||||||||||||||||
3640 | } executed 33 times by 1 test: end of block Executed by:
| 33 | ||||||||||||||||||||||||||||||||||||
3641 | return executed 33 times by 1 test: ret;return ret; Executed by:
executed 33 times by 1 test: return ret; Executed by:
| 33 | ||||||||||||||||||||||||||||||||||||
3642 | } | - | ||||||||||||||||||||||||||||||||||||
3643 | - | |||||||||||||||||||||||||||||||||||||
3644 | int SSL_get_error(const SSL *s, int i) | - | ||||||||||||||||||||||||||||||||||||
3645 | { | - | ||||||||||||||||||||||||||||||||||||
3646 | int reason; | - | ||||||||||||||||||||||||||||||||||||
3647 | unsigned long l; | - | ||||||||||||||||||||||||||||||||||||
3648 | BIO *bio; | - | ||||||||||||||||||||||||||||||||||||
3649 | - | |||||||||||||||||||||||||||||||||||||
3650 | if (i > 0
| 1036-31153 | ||||||||||||||||||||||||||||||||||||
3651 | return executed 1036 times by 1 test: 0;return 0; Executed by:
executed 1036 times by 1 test: return 0; Executed by:
| 1036 | ||||||||||||||||||||||||||||||||||||
3652 | - | |||||||||||||||||||||||||||||||||||||
3653 | - | |||||||||||||||||||||||||||||||||||||
3654 | - | |||||||||||||||||||||||||||||||||||||
3655 | - | |||||||||||||||||||||||||||||||||||||
3656 | - | |||||||||||||||||||||||||||||||||||||
3657 | if ((
| 760-30393 | ||||||||||||||||||||||||||||||||||||
3658 | if ((
| 0-760 | ||||||||||||||||||||||||||||||||||||
3659 | return never executed: 5;return 5; never executed: return 5; | 0 | ||||||||||||||||||||||||||||||||||||
3660 | else | - | ||||||||||||||||||||||||||||||||||||
3661 | return executed 760 times by 1 test: 1;return 1; Executed by:
executed 760 times by 1 test: return 1; Executed by:
| 760 | ||||||||||||||||||||||||||||||||||||
3662 | } | - | ||||||||||||||||||||||||||||||||||||
3663 | - | |||||||||||||||||||||||||||||||||||||
3664 | if ((
| 1476-28917 | ||||||||||||||||||||||||||||||||||||
3665 | bio = SSL_get_rbio(s); | - | ||||||||||||||||||||||||||||||||||||
3666 | if (BIO_test_flags(bio, 0x01)
| 9-28908 | ||||||||||||||||||||||||||||||||||||
3667 | return executed 28908 times by 1 test: 2;return 2; Executed by:
executed 28908 times by 1 test: return 2; Executed by:
| 28908 | ||||||||||||||||||||||||||||||||||||
3668 | else if (BIO_test_flags(bio, 0x02)
| 0-9 | ||||||||||||||||||||||||||||||||||||
3669 | return never executed: 3;return 3; never executed: return 3; | 0 | ||||||||||||||||||||||||||||||||||||
3670 | else if (BIO_test_flags(bio, 0x04)
| 0-9 | ||||||||||||||||||||||||||||||||||||
3671 | reason = BIO_get_retry_reason(bio); | - | ||||||||||||||||||||||||||||||||||||
3672 | if (reason == 0x02
| 0 | ||||||||||||||||||||||||||||||||||||
3673 | return never executed: 7;return 7; never executed: return 7; | 0 | ||||||||||||||||||||||||||||||||||||
3674 | else if (reason == 0x03
| 0 | ||||||||||||||||||||||||||||||||||||
3675 | return never executed: 8;return 8; never executed: return 8; | 0 | ||||||||||||||||||||||||||||||||||||
3676 | else | - | ||||||||||||||||||||||||||||||||||||
3677 | return never executed: 5;return 5; never executed: return 5; | 0 | ||||||||||||||||||||||||||||||||||||
3678 | } | - | ||||||||||||||||||||||||||||||||||||
3679 | } executed 9 times by 1 test: end of block Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
3680 | - | |||||||||||||||||||||||||||||||||||||
3681 | if ((
| 358-1127 | ||||||||||||||||||||||||||||||||||||
3682 | - | |||||||||||||||||||||||||||||||||||||
3683 | bio = s->wbio; | - | ||||||||||||||||||||||||||||||||||||
3684 | if (BIO_test_flags(bio, 0x02)
| 0-1127 | ||||||||||||||||||||||||||||||||||||
3685 | return executed 1127 times by 1 test: 3;return 3; Executed by:
executed 1127 times by 1 test: return 3; Executed by:
| 1127 | ||||||||||||||||||||||||||||||||||||
3686 | else if (BIO_test_flags(bio, 0x01)
| 0 | ||||||||||||||||||||||||||||||||||||
3687 | - | |||||||||||||||||||||||||||||||||||||
3688 | - | |||||||||||||||||||||||||||||||||||||
3689 | - | |||||||||||||||||||||||||||||||||||||
3690 | return never executed: 2;return 2; never executed: return 2; | 0 | ||||||||||||||||||||||||||||||||||||
3691 | else if (BIO_test_flags(bio, 0x04)
| 0 | ||||||||||||||||||||||||||||||||||||
3692 | reason = BIO_get_retry_reason(bio); | - | ||||||||||||||||||||||||||||||||||||
3693 | if (reason == 0x02
| 0 | ||||||||||||||||||||||||||||||||||||
3694 | return never executed: 7;return 7; never executed: return 7; | 0 | ||||||||||||||||||||||||||||||||||||
3695 | else if (reason == 0x03
| 0 | ||||||||||||||||||||||||||||||||||||
3696 | return never executed: 8;return 8; never executed: return 8; | 0 | ||||||||||||||||||||||||||||||||||||
3697 | else | - | ||||||||||||||||||||||||||||||||||||
3698 | return never executed: 5;return 5; never executed: return 5; | 0 | ||||||||||||||||||||||||||||||||||||
3699 | } | - | ||||||||||||||||||||||||||||||||||||
3700 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3701 | if ((
| 2-356 | ||||||||||||||||||||||||||||||||||||
3702 | return executed 2 times by 1 test: 4;return 4; Executed by:
executed 2 times by 1 test: return 4; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
3703 | if ((
| 0-356 | ||||||||||||||||||||||||||||||||||||
3704 | return never executed: 9;return 9; never executed: return 9; | 0 | ||||||||||||||||||||||||||||||||||||
3705 | if ((
| 0-356 | ||||||||||||||||||||||||||||||||||||
3706 | return never executed: 10;return 10; never executed: return 10; | 0 | ||||||||||||||||||||||||||||||||||||
3707 | if ((
| 2-354 | ||||||||||||||||||||||||||||||||||||
3708 | return executed 2 times by 1 test: 11;return 11; Executed by:
executed 2 times by 1 test: return 11; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
3709 | - | |||||||||||||||||||||||||||||||||||||
3710 | if ((
| 131-223 | ||||||||||||||||||||||||||||||||||||
3711 | (
| 0-223 | ||||||||||||||||||||||||||||||||||||
3712 | return executed 223 times by 1 test: 6;return 6; Executed by:
executed 223 times by 1 test: return 6; Executed by:
| 223 | ||||||||||||||||||||||||||||||||||||
3713 | - | |||||||||||||||||||||||||||||||||||||
3714 | return executed 131 times by 1 test: 5;return 5; Executed by:
executed 131 times by 1 test: return 5; Executed by:
| 131 | ||||||||||||||||||||||||||||||||||||
3715 | } | - | ||||||||||||||||||||||||||||||||||||
3716 | - | |||||||||||||||||||||||||||||||||||||
3717 | static int ssl_do_handshake_intern(void *vargs) | - | ||||||||||||||||||||||||||||||||||||
3718 | { | - | ||||||||||||||||||||||||||||||||||||
3719 | struct ssl_async_args *args; | - | ||||||||||||||||||||||||||||||||||||
3720 | SSL *s; | - | ||||||||||||||||||||||||||||||||||||
3721 | - | |||||||||||||||||||||||||||||||||||||
3722 | args = (struct ssl_async_args *)vargs; | - | ||||||||||||||||||||||||||||||||||||
3723 | s = args->s; | - | ||||||||||||||||||||||||||||||||||||
3724 | - | |||||||||||||||||||||||||||||||||||||
3725 | return never executed: s->handshake_func(s);return s->handshake_func(s); never executed: return s->handshake_func(s); | 0 | ||||||||||||||||||||||||||||||||||||
3726 | } | - | ||||||||||||||||||||||||||||||||||||
3727 | - | |||||||||||||||||||||||||||||||||||||
3728 | int SSL_do_handshake(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3729 | { | - | ||||||||||||||||||||||||||||||||||||
3730 | int ret = 1; | - | ||||||||||||||||||||||||||||||||||||
3731 | - | |||||||||||||||||||||||||||||||||||||
3732 | if (s->handshake_func ==
| 0-24091 | ||||||||||||||||||||||||||||||||||||
3733 | ((void *)0)
| 0-24091 | ||||||||||||||||||||||||||||||||||||
3734 | ) { | - | ||||||||||||||||||||||||||||||||||||
3735 | ERR_put_error(20,(180),(144),__FILE__,3558); | - | ||||||||||||||||||||||||||||||||||||
3736 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
3737 | } | - | ||||||||||||||||||||||||||||||||||||
3738 | - | |||||||||||||||||||||||||||||||||||||
3739 | ossl_statem_check_finish_init(s, -1); | - | ||||||||||||||||||||||||||||||||||||
3740 | - | |||||||||||||||||||||||||||||||||||||
3741 | s->method->ssl_renegotiate_check(s, 0); | - | ||||||||||||||||||||||||||||||||||||
3742 | - | |||||||||||||||||||||||||||||||||||||
3743 | if (SSL_in_init(s)
| 0-24032 | ||||||||||||||||||||||||||||||||||||
3744 | if ((
| 0-24032 | ||||||||||||||||||||||||||||||||||||
3745 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3746 | ) { | - | ||||||||||||||||||||||||||||||||||||
3747 | struct ssl_async_args args; | - | ||||||||||||||||||||||||||||||||||||
3748 | - | |||||||||||||||||||||||||||||||||||||
3749 | args.s = s; | - | ||||||||||||||||||||||||||||||||||||
3750 | - | |||||||||||||||||||||||||||||||||||||
3751 | ret = ssl_start_async_job(s, &args, ssl_do_handshake_intern); | - | ||||||||||||||||||||||||||||||||||||
3752 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
3753 | ret = s->handshake_func(s); | - | ||||||||||||||||||||||||||||||||||||
3754 | } executed 24032 times by 1 test: end of block Executed by:
| 24032 | ||||||||||||||||||||||||||||||||||||
3755 | } | - | ||||||||||||||||||||||||||||||||||||
3756 | return executed 24091 times by 1 test: ret;return ret; Executed by:
executed 24091 times by 1 test: return ret; Executed by:
| 24091 | ||||||||||||||||||||||||||||||||||||
3757 | } | - | ||||||||||||||||||||||||||||||||||||
3758 | - | |||||||||||||||||||||||||||||||||||||
3759 | void SSL_set_accept_state(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3760 | { | - | ||||||||||||||||||||||||||||||||||||
3761 | s->server = 1; | - | ||||||||||||||||||||||||||||||||||||
3762 | s->shutdown = 0; | - | ||||||||||||||||||||||||||||||||||||
3763 | ossl_statem_clear(s); | - | ||||||||||||||||||||||||||||||||||||
3764 | s->handshake_func = s->method->ssl_accept; | - | ||||||||||||||||||||||||||||||||||||
3765 | clear_ciphers(s); | - | ||||||||||||||||||||||||||||||||||||
3766 | } executed 3771 times by 1 test: end of block Executed by:
| 3771 | ||||||||||||||||||||||||||||||||||||
3767 | - | |||||||||||||||||||||||||||||||||||||
3768 | void SSL_set_connect_state(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3769 | { | - | ||||||||||||||||||||||||||||||||||||
3770 | s->server = 0; | - | ||||||||||||||||||||||||||||||||||||
3771 | s->shutdown = 0; | - | ||||||||||||||||||||||||||||||||||||
3772 | ossl_statem_clear(s); | - | ||||||||||||||||||||||||||||||||||||
3773 | s->handshake_func = s->method->ssl_connect; | - | ||||||||||||||||||||||||||||||||||||
3774 | clear_ciphers(s); | - | ||||||||||||||||||||||||||||||||||||
3775 | } executed 4336 times by 1 test: end of block Executed by:
| 4336 | ||||||||||||||||||||||||||||||||||||
3776 | - | |||||||||||||||||||||||||||||||||||||
3777 | int ssl_undefined_function(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3778 | { | - | ||||||||||||||||||||||||||||||||||||
3779 | ERR_put_error(20,(197),((2|64)),__FILE__,3600); | - | ||||||||||||||||||||||||||||||||||||
3780 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
3781 | } | - | ||||||||||||||||||||||||||||||||||||
3782 | - | |||||||||||||||||||||||||||||||||||||
3783 | int ssl_undefined_void_function(void) | - | ||||||||||||||||||||||||||||||||||||
3784 | { | - | ||||||||||||||||||||||||||||||||||||
3785 | ERR_put_error(20,(244),((2|64)),__FILE__,3607) | - | ||||||||||||||||||||||||||||||||||||
3786 | ; | - | ||||||||||||||||||||||||||||||||||||
3787 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
3788 | } | - | ||||||||||||||||||||||||||||||||||||
3789 | - | |||||||||||||||||||||||||||||||||||||
3790 | int ssl_undefined_const_function(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3791 | { | - | ||||||||||||||||||||||||||||||||||||
3792 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
3793 | } | - | ||||||||||||||||||||||||||||||||||||
3794 | - | |||||||||||||||||||||||||||||||||||||
3795 | const SSL_METHOD *ssl_bad_method(int ver) | - | ||||||||||||||||||||||||||||||||||||
3796 | { | - | ||||||||||||||||||||||||||||||||||||
3797 | ERR_put_error(20,(160),((2|64)),__FILE__,3618); | - | ||||||||||||||||||||||||||||||||||||
3798 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3799 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3800 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3801 | } | - | ||||||||||||||||||||||||||||||||||||
3802 | - | |||||||||||||||||||||||||||||||||||||
3803 | const char *ssl_protocol_to_string(int version) | - | ||||||||||||||||||||||||||||||||||||
3804 | { | - | ||||||||||||||||||||||||||||||||||||
3805 | switch(version) | - | ||||||||||||||||||||||||||||||||||||
3806 | { | - | ||||||||||||||||||||||||||||||||||||
3807 | case executed 156 times by 1 test: 0x0304:case 0x0304: Executed by:
executed 156 times by 1 test: case 0x0304: Executed by:
| 156 | ||||||||||||||||||||||||||||||||||||
3808 | return executed 156 times by 1 test: "TLSv1.3";return "TLSv1.3"; Executed by:
executed 156 times by 1 test: return "TLSv1.3"; Executed by:
| 156 | ||||||||||||||||||||||||||||||||||||
3809 | - | |||||||||||||||||||||||||||||||||||||
3810 | case executed 290 times by 1 test: 0x0303:case 0x0303: Executed by:
executed 290 times by 1 test: case 0x0303: Executed by:
| 290 | ||||||||||||||||||||||||||||||||||||
3811 | return executed 290 times by 1 test: "TLSv1.2";return "TLSv1.2"; Executed by:
executed 290 times by 1 test: return "TLSv1.2"; Executed by:
| 290 | ||||||||||||||||||||||||||||||||||||
3812 | - | |||||||||||||||||||||||||||||||||||||
3813 | case executed 8 times by 1 test: 0x0302:case 0x0302: Executed by:
executed 8 times by 1 test: case 0x0302: Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
3814 | return executed 8 times by 1 test: "TLSv1.1";return "TLSv1.1"; Executed by:
executed 8 times by 1 test: return "TLSv1.1"; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
3815 | - | |||||||||||||||||||||||||||||||||||||
3816 | case executed 61 times by 1 test: 0x0301:case 0x0301: Executed by:
executed 61 times by 1 test: case 0x0301: Executed by:
| 61 | ||||||||||||||||||||||||||||||||||||
3817 | return executed 61 times by 1 test: "TLSv1";return "TLSv1"; Executed by:
executed 61 times by 1 test: return "TLSv1"; Executed by:
| 61 | ||||||||||||||||||||||||||||||||||||
3818 | - | |||||||||||||||||||||||||||||||||||||
3819 | case executed 115 times by 1 test: 0x0300:case 0x0300: Executed by:
executed 115 times by 1 test: case 0x0300: Executed by:
| 115 | ||||||||||||||||||||||||||||||||||||
3820 | return executed 115 times by 1 test: "SSLv3";return "SSLv3"; Executed by:
executed 115 times by 1 test: return "SSLv3"; Executed by:
| 115 | ||||||||||||||||||||||||||||||||||||
3821 | - | |||||||||||||||||||||||||||||||||||||
3822 | case never executed: 0x0100:case 0x0100: never executed: case 0x0100: | 0 | ||||||||||||||||||||||||||||||||||||
3823 | return never executed: "DTLSv0.9";return "DTLSv0.9"; never executed: return "DTLSv0.9"; | 0 | ||||||||||||||||||||||||||||||||||||
3824 | - | |||||||||||||||||||||||||||||||||||||
3825 | case never executed: 0xFEFF:case 0xFEFF: never executed: case 0xFEFF: | 0 | ||||||||||||||||||||||||||||||||||||
3826 | return never executed: "DTLSv1";return "DTLSv1"; never executed: return "DTLSv1"; | 0 | ||||||||||||||||||||||||||||||||||||
3827 | - | |||||||||||||||||||||||||||||||||||||
3828 | case never executed: 0xFEFD:case 0xFEFD: never executed: case 0xFEFD: | 0 | ||||||||||||||||||||||||||||||||||||
3829 | return never executed: "DTLSv1.2";return "DTLSv1.2"; never executed: return "DTLSv1.2"; | 0 | ||||||||||||||||||||||||||||||||||||
3830 | - | |||||||||||||||||||||||||||||||||||||
3831 | default executed 25 times by 1 test: :default: Executed by:
executed 25 times by 1 test: default: Executed by:
| 25 | ||||||||||||||||||||||||||||||||||||
3832 | return executed 25 times by 1 test: "unknown";return "unknown"; Executed by:
executed 25 times by 1 test: return "unknown"; Executed by:
| 25 | ||||||||||||||||||||||||||||||||||||
3833 | } | - | ||||||||||||||||||||||||||||||||||||
3834 | } | - | ||||||||||||||||||||||||||||||||||||
3835 | - | |||||||||||||||||||||||||||||||||||||
3836 | const char *SSL_get_version(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3837 | { | - | ||||||||||||||||||||||||||||||||||||
3838 | return executed 266 times by 1 test: ssl_protocol_to_string(s->version);return ssl_protocol_to_string(s->version); Executed by:
executed 266 times by 1 test: return ssl_protocol_to_string(s->version); Executed by:
| 266 | ||||||||||||||||||||||||||||||||||||
3839 | } | - | ||||||||||||||||||||||||||||||||||||
3840 | - | |||||||||||||||||||||||||||||||||||||
3841 | SSL *SSL_dup(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
3842 | { | - | ||||||||||||||||||||||||||||||||||||
3843 | struct stack_st_X509_NAME *sk; | - | ||||||||||||||||||||||||||||||||||||
3844 | X509_NAME *xn; | - | ||||||||||||||||||||||||||||||||||||
3845 | SSL *ret; | - | ||||||||||||||||||||||||||||||||||||
3846 | int i; | - | ||||||||||||||||||||||||||||||||||||
3847 | - | |||||||||||||||||||||||||||||||||||||
3848 | - | |||||||||||||||||||||||||||||||||||||
3849 | if (!SSL_in_init(s)
| 0 | ||||||||||||||||||||||||||||||||||||
3850 | CRYPTO_UP_REF(&s->references, &i, s->lock); | - | ||||||||||||||||||||||||||||||||||||
3851 | return never executed: s;return s; never executed: return s; | 0 | ||||||||||||||||||||||||||||||||||||
3852 | } | - | ||||||||||||||||||||||||||||||||||||
3853 | - | |||||||||||||||||||||||||||||||||||||
3854 | - | |||||||||||||||||||||||||||||||||||||
3855 | - | |||||||||||||||||||||||||||||||||||||
3856 | - | |||||||||||||||||||||||||||||||||||||
3857 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
3858 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3859 | ) | - | ||||||||||||||||||||||||||||||||||||
3860 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3861 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3862 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3863 | - | |||||||||||||||||||||||||||||||||||||
3864 | if (s->session !=
| 0 | ||||||||||||||||||||||||||||||||||||
3865 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3866 | ) { | - | ||||||||||||||||||||||||||||||||||||
3867 | - | |||||||||||||||||||||||||||||||||||||
3868 | - | |||||||||||||||||||||||||||||||||||||
3869 | - | |||||||||||||||||||||||||||||||||||||
3870 | - | |||||||||||||||||||||||||||||||||||||
3871 | if (!SSL_copy_session_id(ret, s)
| 0 | ||||||||||||||||||||||||||||||||||||
3872 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3873 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
3874 | - | |||||||||||||||||||||||||||||||||||||
3875 | - | |||||||||||||||||||||||||||||||||||||
3876 | - | |||||||||||||||||||||||||||||||||||||
3877 | - | |||||||||||||||||||||||||||||||||||||
3878 | - | |||||||||||||||||||||||||||||||||||||
3879 | - | |||||||||||||||||||||||||||||||||||||
3880 | if (!SSL_set_ssl_method(ret, s->method)
| 0 | ||||||||||||||||||||||||||||||||||||
3881 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3882 | - | |||||||||||||||||||||||||||||||||||||
3883 | if (s->cert !=
| 0 | ||||||||||||||||||||||||||||||||||||
3884 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3885 | ) { | - | ||||||||||||||||||||||||||||||||||||
3886 | ssl_cert_free(ret->cert); | - | ||||||||||||||||||||||||||||||||||||
3887 | ret->cert = ssl_cert_dup(s->cert); | - | ||||||||||||||||||||||||||||||||||||
3888 | if (ret->cert ==
| 0 | ||||||||||||||||||||||||||||||||||||
3889 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3890 | ) | - | ||||||||||||||||||||||||||||||||||||
3891 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3892 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3893 | - | |||||||||||||||||||||||||||||||||||||
3894 | if (!SSL_set_session_id_context(ret, s->sid_ctx,
| 0 | ||||||||||||||||||||||||||||||||||||
3895 | (int)s->sid_ctx_length)
| 0 | ||||||||||||||||||||||||||||||||||||
3896 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3897 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3898 | - | |||||||||||||||||||||||||||||||||||||
3899 | if (!ssl_dane_dup(ret, s)
| 0 | ||||||||||||||||||||||||||||||||||||
3900 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3901 | ret->version = s->version; | - | ||||||||||||||||||||||||||||||||||||
3902 | ret->options = s->options; | - | ||||||||||||||||||||||||||||||||||||
3903 | ret->mode = s->mode; | - | ||||||||||||||||||||||||||||||||||||
3904 | SSL_ctrl(ret,51,SSL_ctrl(s,50,0, | - | ||||||||||||||||||||||||||||||||||||
3905 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
3906 | ), | - | ||||||||||||||||||||||||||||||||||||
3907 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
3908 | ); | - | ||||||||||||||||||||||||||||||||||||
3909 | SSL_set_read_ahead(ret, SSL_get_read_ahead(s)); | - | ||||||||||||||||||||||||||||||||||||
3910 | ret->msg_callback = s->msg_callback; | - | ||||||||||||||||||||||||||||||||||||
3911 | ret->msg_callback_arg = s->msg_callback_arg; | - | ||||||||||||||||||||||||||||||||||||
3912 | SSL_set_verify(ret, SSL_get_verify_mode(s), SSL_get_verify_callback(s)); | - | ||||||||||||||||||||||||||||||||||||
3913 | SSL_set_verify_depth(ret, SSL_get_verify_depth(s)); | - | ||||||||||||||||||||||||||||||||||||
3914 | ret->generate_session_id = s->generate_session_id; | - | ||||||||||||||||||||||||||||||||||||
3915 | - | |||||||||||||||||||||||||||||||||||||
3916 | SSL_set_info_callback(ret, SSL_get_info_callback(s)); | - | ||||||||||||||||||||||||||||||||||||
3917 | - | |||||||||||||||||||||||||||||||||||||
3918 | - | |||||||||||||||||||||||||||||||||||||
3919 | if (!CRYPTO_dup_ex_data(0, &ret->ex_data, &s->ex_data)
| 0 | ||||||||||||||||||||||||||||||||||||
3920 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3921 | - | |||||||||||||||||||||||||||||||||||||
3922 | - | |||||||||||||||||||||||||||||||||||||
3923 | if (s->rbio !=
| 0 | ||||||||||||||||||||||||||||||||||||
3924 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3925 | ) { | - | ||||||||||||||||||||||||||||||||||||
3926 | if (!BIO_ctrl(s->rbio,12,0,(char *)((char *)&ret->rbio))
| 0 | ||||||||||||||||||||||||||||||||||||
3927 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3928 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3929 | if (s->wbio !=
| 0 | ||||||||||||||||||||||||||||||||||||
3930 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3931 | ) { | - | ||||||||||||||||||||||||||||||||||||
3932 | if (s->wbio != s->rbio
| 0 | ||||||||||||||||||||||||||||||||||||
3933 | if (!BIO_ctrl(s->wbio,12,0,(char *)((char *)&ret->wbio))
| 0 | ||||||||||||||||||||||||||||||||||||
3934 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3935 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
3936 | BIO_up_ref(ret->rbio); | - | ||||||||||||||||||||||||||||||||||||
3937 | ret->wbio = ret->rbio; | - | ||||||||||||||||||||||||||||||||||||
3938 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3939 | } | - | ||||||||||||||||||||||||||||||||||||
3940 | - | |||||||||||||||||||||||||||||||||||||
3941 | ret->server = s->server; | - | ||||||||||||||||||||||||||||||||||||
3942 | if (s->handshake_func
| 0 | ||||||||||||||||||||||||||||||||||||
3943 | if (s->server
| 0 | ||||||||||||||||||||||||||||||||||||
3944 | SSL_set_accept_state(ret); never executed: SSL_set_accept_state(ret); | 0 | ||||||||||||||||||||||||||||||||||||
3945 | else | - | ||||||||||||||||||||||||||||||||||||
3946 | SSL_set_connect_state(ret); never executed: SSL_set_connect_state(ret); | 0 | ||||||||||||||||||||||||||||||||||||
3947 | } | - | ||||||||||||||||||||||||||||||||||||
3948 | ret->shutdown = s->shutdown; | - | ||||||||||||||||||||||||||||||||||||
3949 | ret->hit = s->hit; | - | ||||||||||||||||||||||||||||||||||||
3950 | - | |||||||||||||||||||||||||||||||||||||
3951 | ret->default_passwd_callback = s->default_passwd_callback; | - | ||||||||||||||||||||||||||||||||||||
3952 | ret->default_passwd_callback_userdata = s->default_passwd_callback_userdata; | - | ||||||||||||||||||||||||||||||||||||
3953 | - | |||||||||||||||||||||||||||||||||||||
3954 | X509_VERIFY_PARAM_inherit(ret->param, s->param); | - | ||||||||||||||||||||||||||||||||||||
3955 | - | |||||||||||||||||||||||||||||||||||||
3956 | - | |||||||||||||||||||||||||||||||||||||
3957 | if (s->cipher_list !=
| 0 | ||||||||||||||||||||||||||||||||||||
3958 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3959 | ) { | - | ||||||||||||||||||||||||||||||||||||
3960 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
3961 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3962 | ) | - | ||||||||||||||||||||||||||||||||||||
3963 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3964 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3965 | if (s->cipher_list_by_id !=
| 0 | ||||||||||||||||||||||||||||||||||||
3966 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3967 | ) | - | ||||||||||||||||||||||||||||||||||||
3968 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
3969 | ==
| 0 | ||||||||||||||||||||||||||||||||||||
3970 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3971 | ) | - | ||||||||||||||||||||||||||||||||||||
3972 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3973 | - | |||||||||||||||||||||||||||||||||||||
3974 | - | |||||||||||||||||||||||||||||||||||||
3975 | if (s->ca_names !=
| 0 | ||||||||||||||||||||||||||||||||||||
3976 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3977 | ) { | - | ||||||||||||||||||||||||||||||||||||
3978 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
3979 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3980 | ) | - | ||||||||||||||||||||||||||||||||||||
3981 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3982 | ret->ca_names = sk; | - | ||||||||||||||||||||||||||||||||||||
3983 | for (i = 0; i < sk_X509_NAME_num(sk)
| 0 | ||||||||||||||||||||||||||||||||||||
3984 | xn = sk_X509_NAME_value(sk, i); | - | ||||||||||||||||||||||||||||||||||||
3985 | if (sk_X509_NAME_set(sk, i, X509_NAME_dup(xn)) ==
| 0 | ||||||||||||||||||||||||||||||||||||
3986 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
3987 | ) { | - | ||||||||||||||||||||||||||||||||||||
3988 | X509_NAME_free(xn); | - | ||||||||||||||||||||||||||||||||||||
3989 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
3990 | } | - | ||||||||||||||||||||||||||||||||||||
3991 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3992 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
3993 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
3994 | - | |||||||||||||||||||||||||||||||||||||
3995 | err: | - | ||||||||||||||||||||||||||||||||||||
3996 | SSL_free(ret); | - | ||||||||||||||||||||||||||||||||||||
3997 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3998 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
3999 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4000 | } | - | ||||||||||||||||||||||||||||||||||||
4001 | - | |||||||||||||||||||||||||||||||||||||
4002 | void ssl_clear_cipher_ctx(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4003 | { | - | ||||||||||||||||||||||||||||||||||||
4004 | if (s->enc_read_ctx !=
| 3897-28733 | ||||||||||||||||||||||||||||||||||||
4005 | ((void *)0)
| 3897-28733 | ||||||||||||||||||||||||||||||||||||
4006 | ) { | - | ||||||||||||||||||||||||||||||||||||
4007 | EVP_CIPHER_CTX_free(s->enc_read_ctx); | - | ||||||||||||||||||||||||||||||||||||
4008 | s->enc_read_ctx = | - | ||||||||||||||||||||||||||||||||||||
4009 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4010 | ; | - | ||||||||||||||||||||||||||||||||||||
4011 | } executed 3897 times by 2 tests: end of block Executed by:
| 3897 | ||||||||||||||||||||||||||||||||||||
4012 | if (s->enc_write_ctx !=
| 3913-28717 | ||||||||||||||||||||||||||||||||||||
4013 | ((void *)0)
| 3913-28717 | ||||||||||||||||||||||||||||||||||||
4014 | ) { | - | ||||||||||||||||||||||||||||||||||||
4015 | EVP_CIPHER_CTX_free(s->enc_write_ctx); | - | ||||||||||||||||||||||||||||||||||||
4016 | s->enc_write_ctx = | - | ||||||||||||||||||||||||||||||||||||
4017 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4018 | ; | - | ||||||||||||||||||||||||||||||||||||
4019 | } executed 3913 times by 2 tests: end of block Executed by:
| 3913 | ||||||||||||||||||||||||||||||||||||
4020 | - | |||||||||||||||||||||||||||||||||||||
4021 | COMP_CTX_free(s->expand); | - | ||||||||||||||||||||||||||||||||||||
4022 | s->expand = | - | ||||||||||||||||||||||||||||||||||||
4023 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4024 | ; | - | ||||||||||||||||||||||||||||||||||||
4025 | COMP_CTX_free(s->compress); | - | ||||||||||||||||||||||||||||||||||||
4026 | s->compress = | - | ||||||||||||||||||||||||||||||||||||
4027 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4028 | ; | - | ||||||||||||||||||||||||||||||||||||
4029 | - | |||||||||||||||||||||||||||||||||||||
4030 | } executed 32630 times by 2 tests: end of block Executed by:
| 32630 | ||||||||||||||||||||||||||||||||||||
4031 | - | |||||||||||||||||||||||||||||||||||||
4032 | X509 *SSL_get_certificate(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4033 | { | - | ||||||||||||||||||||||||||||||||||||
4034 | if (s->cert !=
| 0 | ||||||||||||||||||||||||||||||||||||
4035 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4036 | ) | - | ||||||||||||||||||||||||||||||||||||
4037 | return never executed: s->cert->key->x509;return s->cert->key->x509; never executed: return s->cert->key->x509; | 0 | ||||||||||||||||||||||||||||||||||||
4038 | else | - | ||||||||||||||||||||||||||||||||||||
4039 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4040 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4041 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4042 | } | - | ||||||||||||||||||||||||||||||||||||
4043 | - | |||||||||||||||||||||||||||||||||||||
4044 | EVP_PKEY *SSL_get_privatekey(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4045 | { | - | ||||||||||||||||||||||||||||||||||||
4046 | if (s->cert !=
| 0 | ||||||||||||||||||||||||||||||||||||
4047 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4048 | ) | - | ||||||||||||||||||||||||||||||||||||
4049 | return never executed: s->cert->key->privatekey;return s->cert->key->privatekey; never executed: return s->cert->key->privatekey; | 0 | ||||||||||||||||||||||||||||||||||||
4050 | else | - | ||||||||||||||||||||||||||||||||||||
4051 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4052 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4053 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4054 | } | - | ||||||||||||||||||||||||||||||||||||
4055 | - | |||||||||||||||||||||||||||||||||||||
4056 | X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4057 | { | - | ||||||||||||||||||||||||||||||||||||
4058 | if (ctx->cert !=
| 0 | ||||||||||||||||||||||||||||||||||||
4059 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4060 | ) | - | ||||||||||||||||||||||||||||||||||||
4061 | return never executed: ctx->cert->key->x509;return ctx->cert->key->x509; never executed: return ctx->cert->key->x509; | 0 | ||||||||||||||||||||||||||||||||||||
4062 | else | - | ||||||||||||||||||||||||||||||||||||
4063 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4064 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4065 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4066 | } | - | ||||||||||||||||||||||||||||||||||||
4067 | - | |||||||||||||||||||||||||||||||||||||
4068 | EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4069 | { | - | ||||||||||||||||||||||||||||||||||||
4070 | if (ctx->cert !=
| 0 | ||||||||||||||||||||||||||||||||||||
4071 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4072 | ) | - | ||||||||||||||||||||||||||||||||||||
4073 | return never executed: ctx->cert->key->privatekey;return ctx->cert->key->privatekey; never executed: return ctx->cert->key->privatekey; | 0 | ||||||||||||||||||||||||||||||||||||
4074 | else | - | ||||||||||||||||||||||||||||||||||||
4075 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4076 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4077 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4078 | } | - | ||||||||||||||||||||||||||||||||||||
4079 | - | |||||||||||||||||||||||||||||||||||||
4080 | const SSL_CIPHER *SSL_get_current_cipher(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4081 | { | - | ||||||||||||||||||||||||||||||||||||
4082 | if ((
| 52-2425 | ||||||||||||||||||||||||||||||||||||
4083 | ((void *)0)
| 52-2425 | ||||||||||||||||||||||||||||||||||||
4084 | )
| 52-2425 | ||||||||||||||||||||||||||||||||||||
4085 | ((void *)0)
| 241-2184 | ||||||||||||||||||||||||||||||||||||
4086 | )
| 241-2184 | ||||||||||||||||||||||||||||||||||||
4087 | return executed 2184 times by 1 test: s->session->cipher;return s->session->cipher; Executed by:
executed 2184 times by 1 test: return s->session->cipher; Executed by:
| 2184 | ||||||||||||||||||||||||||||||||||||
4088 | return executed 293 times by 1 test: return ((void *)0) ; Executed by:
executed 293 times by 1 test: return ((void *)0) ; Executed by:
| 293 | ||||||||||||||||||||||||||||||||||||
4089 | ((void *)0) executed 293 times by 1 test: return ((void *)0) ; Executed by:
| 293 | ||||||||||||||||||||||||||||||||||||
4090 | ; executed 293 times by 1 test: return ((void *)0) ; Executed by:
| 293 | ||||||||||||||||||||||||||||||||||||
4091 | } | - | ||||||||||||||||||||||||||||||||||||
4092 | - | |||||||||||||||||||||||||||||||||||||
4093 | const SSL_CIPHER *SSL_get_pending_cipher(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4094 | { | - | ||||||||||||||||||||||||||||||||||||
4095 | return never executed: s->s3->tmp.new_cipher;return s->s3->tmp.new_cipher; never executed: return s->s3->tmp.new_cipher; | 0 | ||||||||||||||||||||||||||||||||||||
4096 | } | - | ||||||||||||||||||||||||||||||||||||
4097 | - | |||||||||||||||||||||||||||||||||||||
4098 | const COMP_METHOD *SSL_get_current_compression(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4099 | { | - | ||||||||||||||||||||||||||||||||||||
4100 | - | |||||||||||||||||||||||||||||||||||||
4101 | return executed 1401 times by 1 test: s->compressreturn s->compress ? COMP_CTX_get_method(s->compress) : ((void *)0) ; Executed by:
executed 1401 times by 1 test: return s->compress ? COMP_CTX_get_method(s->compress) : ((void *)0) ; Executed by:
| 0-1401 | ||||||||||||||||||||||||||||||||||||
4102 | ((void *)0) executed 1401 times by 1 test: return s->compress ? COMP_CTX_get_method(s->compress) : ((void *)0) ; Executed by:
| 1401 | ||||||||||||||||||||||||||||||||||||
4103 | ; executed 1401 times by 1 test: return s->compress ? COMP_CTX_get_method(s->compress) : ((void *)0) ; Executed by:
| 1401 | ||||||||||||||||||||||||||||||||||||
4104 | - | |||||||||||||||||||||||||||||||||||||
4105 | - | |||||||||||||||||||||||||||||||||||||
4106 | - | |||||||||||||||||||||||||||||||||||||
4107 | } | - | ||||||||||||||||||||||||||||||||||||
4108 | - | |||||||||||||||||||||||||||||||||||||
4109 | const COMP_METHOD *SSL_get_current_expansion(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4110 | { | - | ||||||||||||||||||||||||||||||||||||
4111 | - | |||||||||||||||||||||||||||||||||||||
4112 | return executed 191 times by 1 test: s->expandreturn s->expand ? COMP_CTX_get_method(s->expand) : ((void *)0) ; Executed by:
executed 191 times by 1 test: return s->expand ? COMP_CTX_get_method(s->expand) : ((void *)0) ; Executed by:
| 0-191 | ||||||||||||||||||||||||||||||||||||
4113 | ((void *)0) executed 191 times by 1 test: return s->expand ? COMP_CTX_get_method(s->expand) : ((void *)0) ; Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
4114 | ; executed 191 times by 1 test: return s->expand ? COMP_CTX_get_method(s->expand) : ((void *)0) ; Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
4115 | - | |||||||||||||||||||||||||||||||||||||
4116 | - | |||||||||||||||||||||||||||||||||||||
4117 | - | |||||||||||||||||||||||||||||||||||||
4118 | } | - | ||||||||||||||||||||||||||||||||||||
4119 | - | |||||||||||||||||||||||||||||||||||||
4120 | int ssl_init_wbio_buffer(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4121 | { | - | ||||||||||||||||||||||||||||||||||||
4122 | BIO *bbio; | - | ||||||||||||||||||||||||||||||||||||
4123 | - | |||||||||||||||||||||||||||||||||||||
4124 | if (s->bbio !=
| 47-9243 | ||||||||||||||||||||||||||||||||||||
4125 | ((void *)0)
| 47-9243 | ||||||||||||||||||||||||||||||||||||
4126 | ) { | - | ||||||||||||||||||||||||||||||||||||
4127 | - | |||||||||||||||||||||||||||||||||||||
4128 | return executed 47 times by 1 test: 1;return 1; Executed by:
executed 47 times by 1 test: return 1; Executed by:
| 47 | ||||||||||||||||||||||||||||||||||||
4129 | } | - | ||||||||||||||||||||||||||||||||||||
4130 | - | |||||||||||||||||||||||||||||||||||||
4131 | bbio = BIO_new(BIO_f_buffer()); | - | ||||||||||||||||||||||||||||||||||||
4132 | if (bbio ==
| 0-9243 | ||||||||||||||||||||||||||||||||||||
4133 | ((void *)0)
| 0-9243 | ||||||||||||||||||||||||||||||||||||
4134 | || !BIO_int_ctrl(bbio,117,1,0)
| 0-9243 | ||||||||||||||||||||||||||||||||||||
4135 | BIO_free(bbio); | - | ||||||||||||||||||||||||||||||||||||
4136 | ERR_put_error(20,(184),(7),__FILE__,3879); | - | ||||||||||||||||||||||||||||||||||||
4137 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4138 | } | - | ||||||||||||||||||||||||||||||||||||
4139 | s->bbio = bbio; | - | ||||||||||||||||||||||||||||||||||||
4140 | s->wbio = BIO_push(bbio, s->wbio); | - | ||||||||||||||||||||||||||||||||||||
4141 | - | |||||||||||||||||||||||||||||||||||||
4142 | return executed 9243 times by 1 test: 1;return 1; Executed by:
executed 9243 times by 1 test: return 1; Executed by:
| 9243 | ||||||||||||||||||||||||||||||||||||
4143 | } | - | ||||||||||||||||||||||||||||||||||||
4144 | - | |||||||||||||||||||||||||||||||||||||
4145 | int ssl_free_wbio_buffer(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4146 | { | - | ||||||||||||||||||||||||||||||||||||
4147 | - | |||||||||||||||||||||||||||||||||||||
4148 | if (s->bbio ==
| 9243-36322 | ||||||||||||||||||||||||||||||||||||
4149 | ((void *)0)
| 9243-36322 | ||||||||||||||||||||||||||||||||||||
4150 | ) | - | ||||||||||||||||||||||||||||||||||||
4151 | return executed 36322 times by 2 tests: 1;return 1; Executed by:
executed 36322 times by 2 tests: return 1; Executed by:
| 36322 | ||||||||||||||||||||||||||||||||||||
4152 | - | |||||||||||||||||||||||||||||||||||||
4153 | s->wbio = BIO_pop(s->wbio); | - | ||||||||||||||||||||||||||||||||||||
4154 | BIO_free(s->bbio); | - | ||||||||||||||||||||||||||||||||||||
4155 | s->bbio = | - | ||||||||||||||||||||||||||||||||||||
4156 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4157 | ; | - | ||||||||||||||||||||||||||||||||||||
4158 | - | |||||||||||||||||||||||||||||||||||||
4159 | return executed 9243 times by 1 test: 1;return 1; Executed by:
executed 9243 times by 1 test: return 1; Executed by:
| 9243 | ||||||||||||||||||||||||||||||||||||
4160 | } | - | ||||||||||||||||||||||||||||||||||||
4161 | - | |||||||||||||||||||||||||||||||||||||
4162 | void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode) | - | ||||||||||||||||||||||||||||||||||||
4163 | { | - | ||||||||||||||||||||||||||||||||||||
4164 | ctx->quiet_shutdown = mode; | - | ||||||||||||||||||||||||||||||||||||
4165 | } executed 182 times by 1 test: end of block Executed by:
| 182 | ||||||||||||||||||||||||||||||||||||
4166 | - | |||||||||||||||||||||||||||||||||||||
4167 | int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4168 | { | - | ||||||||||||||||||||||||||||||||||||
4169 | return never executed: ctx->quiet_shutdown;return ctx->quiet_shutdown; never executed: return ctx->quiet_shutdown; | 0 | ||||||||||||||||||||||||||||||||||||
4170 | } | - | ||||||||||||||||||||||||||||||||||||
4171 | - | |||||||||||||||||||||||||||||||||||||
4172 | void SSL_set_quiet_shutdown(SSL *s, int mode) | - | ||||||||||||||||||||||||||||||||||||
4173 | { | - | ||||||||||||||||||||||||||||||||||||
4174 | s->quiet_shutdown = mode; | - | ||||||||||||||||||||||||||||||||||||
4175 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4176 | - | |||||||||||||||||||||||||||||||||||||
4177 | int SSL_get_quiet_shutdown(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4178 | { | - | ||||||||||||||||||||||||||||||||||||
4179 | return never executed: s->quiet_shutdown;return s->quiet_shutdown; never executed: return s->quiet_shutdown; | 0 | ||||||||||||||||||||||||||||||||||||
4180 | } | - | ||||||||||||||||||||||||||||||||||||
4181 | - | |||||||||||||||||||||||||||||||||||||
4182 | void SSL_set_shutdown(SSL *s, int mode) | - | ||||||||||||||||||||||||||||||||||||
4183 | { | - | ||||||||||||||||||||||||||||||||||||
4184 | s->shutdown = mode; | - | ||||||||||||||||||||||||||||||||||||
4185 | } executed 191 times by 1 test: end of block Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
4186 | - | |||||||||||||||||||||||||||||||||||||
4187 | int SSL_get_shutdown(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4188 | { | - | ||||||||||||||||||||||||||||||||||||
4189 | return executed 3 times by 1 test: s->shutdown;return s->shutdown; Executed by:
executed 3 times by 1 test: return s->shutdown; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
4190 | } | - | ||||||||||||||||||||||||||||||||||||
4191 | - | |||||||||||||||||||||||||||||||||||||
4192 | int SSL_version(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4193 | { | - | ||||||||||||||||||||||||||||||||||||
4194 | return executed 45857 times by 1 test: s->version;return s->version; Executed by:
executed 45857 times by 1 test: return s->version; Executed by:
| 45857 | ||||||||||||||||||||||||||||||||||||
4195 | } | - | ||||||||||||||||||||||||||||||||||||
4196 | - | |||||||||||||||||||||||||||||||||||||
4197 | int SSL_client_version(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4198 | { | - | ||||||||||||||||||||||||||||||||||||
4199 | return never executed: s->client_version;return s->client_version; never executed: return s->client_version; | 0 | ||||||||||||||||||||||||||||||||||||
4200 | } | - | ||||||||||||||||||||||||||||||||||||
4201 | - | |||||||||||||||||||||||||||||||||||||
4202 | SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
4203 | { | - | ||||||||||||||||||||||||||||||||||||
4204 | return executed 286 times by 1 test: ssl->ctx;return ssl->ctx; Executed by:
executed 286 times by 1 test: return ssl->ctx; Executed by:
| 286 | ||||||||||||||||||||||||||||||||||||
4205 | } | - | ||||||||||||||||||||||||||||||||||||
4206 | - | |||||||||||||||||||||||||||||||||||||
4207 | SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4208 | { | - | ||||||||||||||||||||||||||||||||||||
4209 | CERT *new_cert; | - | ||||||||||||||||||||||||||||||||||||
4210 | if (ssl->ctx == ctx
| 0-24 | ||||||||||||||||||||||||||||||||||||
4211 | return never executed: ssl->ctx;return ssl->ctx; never executed: return ssl->ctx; | 0 | ||||||||||||||||||||||||||||||||||||
4212 | if (ctx ==
| 0-24 | ||||||||||||||||||||||||||||||||||||
4213 | ((void *)0)
| 0-24 | ||||||||||||||||||||||||||||||||||||
4214 | ) | - | ||||||||||||||||||||||||||||||||||||
4215 | ctx = ssl->session_ctx; never executed: ctx = ssl->session_ctx; | 0 | ||||||||||||||||||||||||||||||||||||
4216 | new_cert = ssl_cert_dup(ctx->cert); | - | ||||||||||||||||||||||||||||||||||||
4217 | if (new_cert ==
| 0-24 | ||||||||||||||||||||||||||||||||||||
4218 | ((void *)0)
| 0-24 | ||||||||||||||||||||||||||||||||||||
4219 | ) { | - | ||||||||||||||||||||||||||||||||||||
4220 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4221 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4222 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4223 | } | - | ||||||||||||||||||||||||||||||||||||
4224 | - | |||||||||||||||||||||||||||||||||||||
4225 | if (!custom_exts_copy_flags(&new_cert->custext, &ssl->cert->custext)
| 0-24 | ||||||||||||||||||||||||||||||||||||
4226 | ssl_cert_free(new_cert); | - | ||||||||||||||||||||||||||||||||||||
4227 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4228 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4229 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4230 | } | - | ||||||||||||||||||||||||||||||||||||
4231 | - | |||||||||||||||||||||||||||||||||||||
4232 | ssl_cert_free(ssl->cert); | - | ||||||||||||||||||||||||||||||||||||
4233 | ssl->cert = new_cert; | - | ||||||||||||||||||||||||||||||||||||
4234 | - | |||||||||||||||||||||||||||||||||||||
4235 | - | |||||||||||||||||||||||||||||||||||||
4236 | - | |||||||||||||||||||||||||||||||||||||
4237 | - | |||||||||||||||||||||||||||||||||||||
4238 | - | |||||||||||||||||||||||||||||||||||||
4239 | if (!((ssl->sid_ctx_length <= sizeof(ssl->sid_ctx)) != 0)
| 0-24 | ||||||||||||||||||||||||||||||||||||
4240 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4241 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4242 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4243 | - | |||||||||||||||||||||||||||||||||||||
4244 | - | |||||||||||||||||||||||||||||||||||||
4245 | - | |||||||||||||||||||||||||||||||||||||
4246 | - | |||||||||||||||||||||||||||||||||||||
4247 | - | |||||||||||||||||||||||||||||||||||||
4248 | - | |||||||||||||||||||||||||||||||||||||
4249 | - | |||||||||||||||||||||||||||||||||||||
4250 | if ((
| 0-24 | ||||||||||||||||||||||||||||||||||||
4251 | ((void *)0)
| 0-24 | ||||||||||||||||||||||||||||||||||||
4252 | )
| 0-24 | ||||||||||||||||||||||||||||||||||||
4253 | (
| 0-24 | ||||||||||||||||||||||||||||||||||||
4254 | (
| 0-24 | ||||||||||||||||||||||||||||||||||||
4255 | ssl->sid_ctx_length = ctx->sid_ctx_length; | - | ||||||||||||||||||||||||||||||||||||
4256 | memcpy(&ssl->sid_ctx, &ctx->sid_ctx, sizeof(ssl->sid_ctx)); | - | ||||||||||||||||||||||||||||||||||||
4257 | } executed 24 times by 1 test: end of block Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
4258 | - | |||||||||||||||||||||||||||||||||||||
4259 | SSL_CTX_up_ref(ctx); | - | ||||||||||||||||||||||||||||||||||||
4260 | SSL_CTX_free(ssl->ctx); | - | ||||||||||||||||||||||||||||||||||||
4261 | ssl->ctx = ctx; | - | ||||||||||||||||||||||||||||||||||||
4262 | - | |||||||||||||||||||||||||||||||||||||
4263 | return executed 24 times by 1 test: ssl->ctx;return ssl->ctx; Executed by:
executed 24 times by 1 test: return ssl->ctx; Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
4264 | } | - | ||||||||||||||||||||||||||||||||||||
4265 | - | |||||||||||||||||||||||||||||||||||||
4266 | int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4267 | { | - | ||||||||||||||||||||||||||||||||||||
4268 | return executed 12 times by 1 test: X509_STORE_set_default_paths(ctx->cert_store);return X509_STORE_set_default_paths(ctx->cert_store); Executed by:
executed 12 times by 1 test: return X509_STORE_set_default_paths(ctx->cert_store); Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
4269 | } | - | ||||||||||||||||||||||||||||||||||||
4270 | - | |||||||||||||||||||||||||||||||||||||
4271 | int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4272 | { | - | ||||||||||||||||||||||||||||||||||||
4273 | X509_LOOKUP *lookup; | - | ||||||||||||||||||||||||||||||||||||
4274 | - | |||||||||||||||||||||||||||||||||||||
4275 | lookup = X509_STORE_add_lookup(ctx->cert_store, X509_LOOKUP_hash_dir()); | - | ||||||||||||||||||||||||||||||||||||
4276 | if (lookup ==
| 0-373 | ||||||||||||||||||||||||||||||||||||
4277 | ((void *)0)
| 0-373 | ||||||||||||||||||||||||||||||||||||
4278 | ) | - | ||||||||||||||||||||||||||||||||||||
4279 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4280 | X509_LOOKUP_ctrl((lookup),2,( | - | ||||||||||||||||||||||||||||||||||||
4281 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4282 | ),(long)(3), | - | ||||||||||||||||||||||||||||||||||||
4283 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4284 | ); | - | ||||||||||||||||||||||||||||||||||||
4285 | - | |||||||||||||||||||||||||||||||||||||
4286 | - | |||||||||||||||||||||||||||||||||||||
4287 | ERR_clear_error(); | - | ||||||||||||||||||||||||||||||||||||
4288 | - | |||||||||||||||||||||||||||||||||||||
4289 | return executed 373 times by 1 test: 1;return 1; Executed by:
executed 373 times by 1 test: return 1; Executed by:
| 373 | ||||||||||||||||||||||||||||||||||||
4290 | } | - | ||||||||||||||||||||||||||||||||||||
4291 | - | |||||||||||||||||||||||||||||||||||||
4292 | int SSL_CTX_set_default_verify_file(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4293 | { | - | ||||||||||||||||||||||||||||||||||||
4294 | X509_LOOKUP *lookup; | - | ||||||||||||||||||||||||||||||||||||
4295 | - | |||||||||||||||||||||||||||||||||||||
4296 | lookup = X509_STORE_add_lookup(ctx->cert_store, X509_LOOKUP_file()); | - | ||||||||||||||||||||||||||||||||||||
4297 | if (lookup ==
| 0-373 | ||||||||||||||||||||||||||||||||||||
4298 | ((void *)0)
| 0-373 | ||||||||||||||||||||||||||||||||||||
4299 | ) | - | ||||||||||||||||||||||||||||||||||||
4300 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4301 | - | |||||||||||||||||||||||||||||||||||||
4302 | X509_LOOKUP_ctrl((lookup),1,( | - | ||||||||||||||||||||||||||||||||||||
4303 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4304 | ),(long)(3), | - | ||||||||||||||||||||||||||||||||||||
4305 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4306 | ); | - | ||||||||||||||||||||||||||||||||||||
4307 | - | |||||||||||||||||||||||||||||||||||||
4308 | - | |||||||||||||||||||||||||||||||||||||
4309 | ERR_clear_error(); | - | ||||||||||||||||||||||||||||||||||||
4310 | - | |||||||||||||||||||||||||||||||||||||
4311 | return executed 373 times by 1 test: 1;return 1; Executed by:
executed 373 times by 1 test: return 1; Executed by:
| 373 | ||||||||||||||||||||||||||||||||||||
4312 | } | - | ||||||||||||||||||||||||||||||||||||
4313 | - | |||||||||||||||||||||||||||||||||||||
4314 | int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, | - | ||||||||||||||||||||||||||||||||||||
4315 | const char *CApath) | - | ||||||||||||||||||||||||||||||||||||
4316 | { | - | ||||||||||||||||||||||||||||||||||||
4317 | return executed 128 times by 1 test: X509_STORE_load_locations(ctx->cert_store, CAfile, CApath);return X509_STORE_load_locations(ctx->cert_store, CAfile, CApath); Executed by:
executed 128 times by 1 test: return X509_STORE_load_locations(ctx->cert_store, CAfile, CApath); Executed by:
| 128 | ||||||||||||||||||||||||||||||||||||
4318 | } | - | ||||||||||||||||||||||||||||||||||||
4319 | - | |||||||||||||||||||||||||||||||||||||
4320 | void SSL_set_info_callback(SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
4321 | void (*cb) (const SSL *ssl, int type, int val)) | - | ||||||||||||||||||||||||||||||||||||
4322 | { | - | ||||||||||||||||||||||||||||||||||||
4323 | ssl->info_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
4324 | } executed 2422 times by 1 test: end of block Executed by:
| 2422 | ||||||||||||||||||||||||||||||||||||
4325 | - | |||||||||||||||||||||||||||||||||||||
4326 | - | |||||||||||||||||||||||||||||||||||||
4327 | - | |||||||||||||||||||||||||||||||||||||
4328 | - | |||||||||||||||||||||||||||||||||||||
4329 | - | |||||||||||||||||||||||||||||||||||||
4330 | void (*SSL_get_info_callback(const SSL *ssl)) (const SSL * , | - | ||||||||||||||||||||||||||||||||||||
4331 | int , | - | ||||||||||||||||||||||||||||||||||||
4332 | int ) { | - | ||||||||||||||||||||||||||||||||||||
4333 | return never executed: ssl->info_callback;return ssl->info_callback; never executed: return ssl->info_callback; | 0 | ||||||||||||||||||||||||||||||||||||
4334 | } | - | ||||||||||||||||||||||||||||||||||||
4335 | - | |||||||||||||||||||||||||||||||||||||
4336 | void SSL_set_verify_result(SSL *ssl, long arg) | - | ||||||||||||||||||||||||||||||||||||
4337 | { | - | ||||||||||||||||||||||||||||||||||||
4338 | ssl->verify_result = arg; | - | ||||||||||||||||||||||||||||||||||||
4339 | } executed 147 times by 1 test: end of block Executed by:
| 147 | ||||||||||||||||||||||||||||||||||||
4340 | - | |||||||||||||||||||||||||||||||||||||
4341 | long SSL_get_verify_result(const SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
4342 | { | - | ||||||||||||||||||||||||||||||||||||
4343 | return executed 339 times by 1 test: ssl->verify_result;return ssl->verify_result; Executed by:
executed 339 times by 1 test: return ssl->verify_result; Executed by:
| 339 | ||||||||||||||||||||||||||||||||||||
4344 | } | - | ||||||||||||||||||||||||||||||||||||
4345 | - | |||||||||||||||||||||||||||||||||||||
4346 | size_t SSL_get_client_random(const SSL *ssl, unsigned char *out, size_t outlen) | - | ||||||||||||||||||||||||||||||||||||
4347 | { | - | ||||||||||||||||||||||||||||||||||||
4348 | if (outlen == 0
| 0-26 | ||||||||||||||||||||||||||||||||||||
4349 | return never executed: sizeof(ssl->s3->client_random);return sizeof(ssl->s3->client_random); never executed: return sizeof(ssl->s3->client_random); | 0 | ||||||||||||||||||||||||||||||||||||
4350 | if (outlen > sizeof(ssl->s3->client_random)
| 0-26 | ||||||||||||||||||||||||||||||||||||
4351 | outlen = sizeof(ssl->s3->client_random); never executed: outlen = sizeof(ssl->s3->client_random); | 0 | ||||||||||||||||||||||||||||||||||||
4352 | memcpy(out, ssl->s3->client_random, outlen); | - | ||||||||||||||||||||||||||||||||||||
4353 | return executed 26 times by 1 test: outlen;return outlen; Executed by:
executed 26 times by 1 test: return outlen; Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||
4354 | } | - | ||||||||||||||||||||||||||||||||||||
4355 | - | |||||||||||||||||||||||||||||||||||||
4356 | size_t SSL_get_server_random(const SSL *ssl, unsigned char *out, size_t outlen) | - | ||||||||||||||||||||||||||||||||||||
4357 | { | - | ||||||||||||||||||||||||||||||||||||
4358 | if (outlen == 0
| 0 | ||||||||||||||||||||||||||||||||||||
4359 | return never executed: sizeof(ssl->s3->server_random);return sizeof(ssl->s3->server_random); never executed: return sizeof(ssl->s3->server_random); | 0 | ||||||||||||||||||||||||||||||||||||
4360 | if (outlen > sizeof(ssl->s3->server_random)
| 0 | ||||||||||||||||||||||||||||||||||||
4361 | outlen = sizeof(ssl->s3->server_random); never executed: outlen = sizeof(ssl->s3->server_random); | 0 | ||||||||||||||||||||||||||||||||||||
4362 | memcpy(out, ssl->s3->server_random, outlen); | - | ||||||||||||||||||||||||||||||||||||
4363 | return never executed: outlen;return outlen; never executed: return outlen; | 0 | ||||||||||||||||||||||||||||||||||||
4364 | } | - | ||||||||||||||||||||||||||||||||||||
4365 | - | |||||||||||||||||||||||||||||||||||||
4366 | size_t SSL_SESSION_get_master_key(const SSL_SESSION *session, | - | ||||||||||||||||||||||||||||||||||||
4367 | unsigned char *out, size_t outlen) | - | ||||||||||||||||||||||||||||||||||||
4368 | { | - | ||||||||||||||||||||||||||||||||||||
4369 | if (outlen == 0
| 13-15 | ||||||||||||||||||||||||||||||||||||
4370 | return executed 13 times by 1 test: session->master_key_length;return session->master_key_length; Executed by:
executed 13 times by 1 test: return session->master_key_length; Executed by:
| 13 | ||||||||||||||||||||||||||||||||||||
4371 | if (outlen > session->master_key_length
| 2-13 | ||||||||||||||||||||||||||||||||||||
4372 | outlen = session->master_key_length; executed 13 times by 1 test: outlen = session->master_key_length; Executed by:
| 13 | ||||||||||||||||||||||||||||||||||||
4373 | memcpy(out, session->master_key, outlen); | - | ||||||||||||||||||||||||||||||||||||
4374 | return executed 15 times by 1 test: outlen;return outlen; Executed by:
executed 15 times by 1 test: return outlen; Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
4375 | } | - | ||||||||||||||||||||||||||||||||||||
4376 | - | |||||||||||||||||||||||||||||||||||||
4377 | int SSL_SESSION_set1_master_key(SSL_SESSION *sess, const unsigned char *in, | - | ||||||||||||||||||||||||||||||||||||
4378 | size_t len) | - | ||||||||||||||||||||||||||||||||||||
4379 | { | - | ||||||||||||||||||||||||||||||||||||
4380 | if (len > sizeof(sess->master_key)
| 0-35 | ||||||||||||||||||||||||||||||||||||
4381 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4382 | - | |||||||||||||||||||||||||||||||||||||
4383 | memcpy(sess->master_key, in, len); | - | ||||||||||||||||||||||||||||||||||||
4384 | sess->master_key_length = len; | - | ||||||||||||||||||||||||||||||||||||
4385 | return executed 35 times by 1 test: 1;return 1; Executed by:
executed 35 times by 1 test: return 1; Executed by:
| 35 | ||||||||||||||||||||||||||||||||||||
4386 | } | - | ||||||||||||||||||||||||||||||||||||
4387 | - | |||||||||||||||||||||||||||||||||||||
4388 | - | |||||||||||||||||||||||||||||||||||||
4389 | int SSL_set_ex_data(SSL *s, int idx, void *arg) | - | ||||||||||||||||||||||||||||||||||||
4390 | { | - | ||||||||||||||||||||||||||||||||||||
4391 | return executed 2420 times by 1 test: CRYPTO_set_ex_data(&s->ex_data, idx, arg);return CRYPTO_set_ex_data(&s->ex_data, idx, arg); Executed by:
executed 2420 times by 1 test: return CRYPTO_set_ex_data(&s->ex_data, idx, arg); Executed by:
| 2420 | ||||||||||||||||||||||||||||||||||||
4392 | } | - | ||||||||||||||||||||||||||||||||||||
4393 | - | |||||||||||||||||||||||||||||||||||||
4394 | void *SSL_get_ex_data(const SSL *s, int idx) | - | ||||||||||||||||||||||||||||||||||||
4395 | { | - | ||||||||||||||||||||||||||||||||||||
4396 | return executed 4259 times by 1 test: CRYPTO_get_ex_data(&s->ex_data, idx);return CRYPTO_get_ex_data(&s->ex_data, idx); Executed by:
executed 4259 times by 1 test: return CRYPTO_get_ex_data(&s->ex_data, idx); Executed by:
| 4259 | ||||||||||||||||||||||||||||||||||||
4397 | } | - | ||||||||||||||||||||||||||||||||||||
4398 | - | |||||||||||||||||||||||||||||||||||||
4399 | int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg) | - | ||||||||||||||||||||||||||||||||||||
4400 | { | - | ||||||||||||||||||||||||||||||||||||
4401 | return never executed: CRYPTO_set_ex_data(&s->ex_data, idx, arg);return CRYPTO_set_ex_data(&s->ex_data, idx, arg); never executed: return CRYPTO_set_ex_data(&s->ex_data, idx, arg); | 0 | ||||||||||||||||||||||||||||||||||||
4402 | } | - | ||||||||||||||||||||||||||||||||||||
4403 | - | |||||||||||||||||||||||||||||||||||||
4404 | void *SSL_CTX_get_ex_data(const SSL_CTX *s, int idx) | - | ||||||||||||||||||||||||||||||||||||
4405 | { | - | ||||||||||||||||||||||||||||||||||||
4406 | return never executed: CRYPTO_get_ex_data(&s->ex_data, idx);return CRYPTO_get_ex_data(&s->ex_data, idx); never executed: return CRYPTO_get_ex_data(&s->ex_data, idx); | 0 | ||||||||||||||||||||||||||||||||||||
4407 | } | - | ||||||||||||||||||||||||||||||||||||
4408 | - | |||||||||||||||||||||||||||||||||||||
4409 | X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4410 | { | - | ||||||||||||||||||||||||||||||||||||
4411 | return executed 422 times by 1 test: ctx->cert_store;return ctx->cert_store; Executed by:
executed 422 times by 1 test: return ctx->cert_store; Executed by:
| 422 | ||||||||||||||||||||||||||||||||||||
4412 | } | - | ||||||||||||||||||||||||||||||||||||
4413 | - | |||||||||||||||||||||||||||||||||||||
4414 | void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store) | - | ||||||||||||||||||||||||||||||||||||
4415 | { | - | ||||||||||||||||||||||||||||||||||||
4416 | X509_STORE_free(ctx->cert_store); | - | ||||||||||||||||||||||||||||||||||||
4417 | ctx->cert_store = store; | - | ||||||||||||||||||||||||||||||||||||
4418 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4419 | - | |||||||||||||||||||||||||||||||||||||
4420 | void SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *store) | - | ||||||||||||||||||||||||||||||||||||
4421 | { | - | ||||||||||||||||||||||||||||||||||||
4422 | if (store !=
| 0 | ||||||||||||||||||||||||||||||||||||
4423 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4424 | ) | - | ||||||||||||||||||||||||||||||||||||
4425 | X509_STORE_up_ref(store); never executed: X509_STORE_up_ref(store); | 0 | ||||||||||||||||||||||||||||||||||||
4426 | SSL_CTX_set_cert_store(ctx, store); | - | ||||||||||||||||||||||||||||||||||||
4427 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4428 | - | |||||||||||||||||||||||||||||||||||||
4429 | int SSL_want(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4430 | { | - | ||||||||||||||||||||||||||||||||||||
4431 | return executed 33304 times by 1 test: s->rwstate;return s->rwstate; Executed by:
executed 33304 times by 1 test: return s->rwstate; Executed by:
| 33304 | ||||||||||||||||||||||||||||||||||||
4432 | } | - | ||||||||||||||||||||||||||||||||||||
4433 | void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4434 | DH *(*dh) (SSL *ssl, int is_export, | - | ||||||||||||||||||||||||||||||||||||
4435 | int keylength)) | - | ||||||||||||||||||||||||||||||||||||
4436 | { | - | ||||||||||||||||||||||||||||||||||||
4437 | SSL_CTX_callback_ctrl(ctx, 6, (void (*)(void))dh); | - | ||||||||||||||||||||||||||||||||||||
4438 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4439 | - | |||||||||||||||||||||||||||||||||||||
4440 | void SSL_set_tmp_dh_callback(SSL *ssl, DH *(*dh) (SSL *ssl, int is_export, | - | ||||||||||||||||||||||||||||||||||||
4441 | int keylength)) | - | ||||||||||||||||||||||||||||||||||||
4442 | { | - | ||||||||||||||||||||||||||||||||||||
4443 | SSL_callback_ctrl(ssl, 6, (void (*)(void))dh); | - | ||||||||||||||||||||||||||||||||||||
4444 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4445 | - | |||||||||||||||||||||||||||||||||||||
4446 | - | |||||||||||||||||||||||||||||||||||||
4447 | - | |||||||||||||||||||||||||||||||||||||
4448 | int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint) | - | ||||||||||||||||||||||||||||||||||||
4449 | { | - | ||||||||||||||||||||||||||||||||||||
4450 | if (identity_hint !=
| 4-176 | ||||||||||||||||||||||||||||||||||||
4451 | ((void *)0)
| 4-176 | ||||||||||||||||||||||||||||||||||||
4452 | && strlen(identity_hint) > 128
| 0-4 | ||||||||||||||||||||||||||||||||||||
4453 | ERR_put_error(20,(272),(146),__FILE__,4172); | - | ||||||||||||||||||||||||||||||||||||
4454 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4455 | } | - | ||||||||||||||||||||||||||||||||||||
4456 | CRYPTO_free(ctx->cert->psk_identity_hint, __FILE__, 4175); | - | ||||||||||||||||||||||||||||||||||||
4457 | if (identity_hint !=
| 4-176 | ||||||||||||||||||||||||||||||||||||
4458 | ((void *)0)
| 4-176 | ||||||||||||||||||||||||||||||||||||
4459 | ) { | - | ||||||||||||||||||||||||||||||||||||
4460 | ctx->cert->psk_identity_hint = CRYPTO_strdup(identity_hint, __FILE__, 4177); | - | ||||||||||||||||||||||||||||||||||||
4461 | if (ctx->cert->psk_identity_hint ==
| 0-4 | ||||||||||||||||||||||||||||||||||||
4462 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||||||||||||||
4463 | ) | - | ||||||||||||||||||||||||||||||||||||
4464 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4465 | } executed 4 times by 1 test: elseend of block Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
4466 | ctx->cert->psk_identity_hint = executed 176 times by 1 test: ctx->cert->psk_identity_hint = ((void *)0) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
4467 | ((void *)0) executed 176 times by 1 test: ctx->cert->psk_identity_hint = ((void *)0) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
4468 | ; executed 176 times by 1 test: ctx->cert->psk_identity_hint = ((void *)0) ; Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||
4469 | return executed 180 times by 1 test: 1;return 1; Executed by:
executed 180 times by 1 test: return 1; Executed by:
| 180 | ||||||||||||||||||||||||||||||||||||
4470 | } | - | ||||||||||||||||||||||||||||||||||||
4471 | - | |||||||||||||||||||||||||||||||||||||
4472 | int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint) | - | ||||||||||||||||||||||||||||||||||||
4473 | { | - | ||||||||||||||||||||||||||||||||||||
4474 | if (s ==
| 0 | ||||||||||||||||||||||||||||||||||||
4475 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4476 | ) | - | ||||||||||||||||||||||||||||||||||||
4477 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4478 | - | |||||||||||||||||||||||||||||||||||||
4479 | if (identity_hint !=
| 0 | ||||||||||||||||||||||||||||||||||||
4480 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4481 | && strlen(identity_hint) > 128
| 0 | ||||||||||||||||||||||||||||||||||||
4482 | ERR_put_error(20,(273),(146),__FILE__,4191); | - | ||||||||||||||||||||||||||||||||||||
4483 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4484 | } | - | ||||||||||||||||||||||||||||||||||||
4485 | CRYPTO_free(s->cert->psk_identity_hint, __FILE__, 4194); | - | ||||||||||||||||||||||||||||||||||||
4486 | if (identity_hint !=
| 0 | ||||||||||||||||||||||||||||||||||||
4487 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4488 | ) { | - | ||||||||||||||||||||||||||||||||||||
4489 | s->cert->psk_identity_hint = CRYPTO_strdup(identity_hint, __FILE__, 4196); | - | ||||||||||||||||||||||||||||||||||||
4490 | if (s->cert->psk_identity_hint ==
| 0 | ||||||||||||||||||||||||||||||||||||
4491 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4492 | ) | - | ||||||||||||||||||||||||||||||||||||
4493 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4494 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||
4495 | s->cert->psk_identity_hint = never executed: s->cert->psk_identity_hint = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4496 | ((void *)0) never executed: s->cert->psk_identity_hint = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4497 | ; never executed: s->cert->psk_identity_hint = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4498 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
4499 | } | - | ||||||||||||||||||||||||||||||||||||
4500 | - | |||||||||||||||||||||||||||||||||||||
4501 | const char *SSL_get_psk_identity_hint(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4502 | { | - | ||||||||||||||||||||||||||||||||||||
4503 | if (s ==
| 0 | ||||||||||||||||||||||||||||||||||||
4504 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4505 | || s->session ==
| 0 | ||||||||||||||||||||||||||||||||||||
4506 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4507 | ) | - | ||||||||||||||||||||||||||||||||||||
4508 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4509 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4510 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4511 | return never executed: s->session->psk_identity_hint;return s->session->psk_identity_hint; never executed: return s->session->psk_identity_hint; | 0 | ||||||||||||||||||||||||||||||||||||
4512 | } | - | ||||||||||||||||||||||||||||||||||||
4513 | - | |||||||||||||||||||||||||||||||||||||
4514 | const char *SSL_get_psk_identity(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4515 | { | - | ||||||||||||||||||||||||||||||||||||
4516 | if (s ==
| 0 | ||||||||||||||||||||||||||||||||||||
4517 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4518 | || s->session ==
| 0 | ||||||||||||||||||||||||||||||||||||
4519 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4520 | ) | - | ||||||||||||||||||||||||||||||||||||
4521 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4522 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4523 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4524 | return never executed: s->session->psk_identity;return s->session->psk_identity; never executed: return s->session->psk_identity; | 0 | ||||||||||||||||||||||||||||||||||||
4525 | } | - | ||||||||||||||||||||||||||||||||||||
4526 | - | |||||||||||||||||||||||||||||||||||||
4527 | void SSL_set_psk_client_callback(SSL *s, SSL_psk_client_cb_func cb) | - | ||||||||||||||||||||||||||||||||||||
4528 | { | - | ||||||||||||||||||||||||||||||||||||
4529 | s->psk_client_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
4530 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4531 | - | |||||||||||||||||||||||||||||||||||||
4532 | void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, SSL_psk_client_cb_func cb) | - | ||||||||||||||||||||||||||||||||||||
4533 | { | - | ||||||||||||||||||||||||||||||||||||
4534 | ctx->psk_client_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
4535 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
4536 | - | |||||||||||||||||||||||||||||||||||||
4537 | void SSL_set_psk_server_callback(SSL *s, SSL_psk_server_cb_func cb) | - | ||||||||||||||||||||||||||||||||||||
4538 | { | - | ||||||||||||||||||||||||||||||||||||
4539 | s->psk_server_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
4540 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4541 | - | |||||||||||||||||||||||||||||||||||||
4542 | void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, SSL_psk_server_cb_func cb) | - | ||||||||||||||||||||||||||||||||||||
4543 | { | - | ||||||||||||||||||||||||||||||||||||
4544 | ctx->psk_server_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
4545 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
4546 | - | |||||||||||||||||||||||||||||||||||||
4547 | - | |||||||||||||||||||||||||||||||||||||
4548 | void SSL_set_psk_find_session_callback(SSL *s, SSL_psk_find_session_cb_func cb) | - | ||||||||||||||||||||||||||||||||||||
4549 | { | - | ||||||||||||||||||||||||||||||||||||
4550 | s->psk_find_session_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
4551 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4552 | - | |||||||||||||||||||||||||||||||||||||
4553 | void SSL_CTX_set_psk_find_session_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4554 | SSL_psk_find_session_cb_func cb) | - | ||||||||||||||||||||||||||||||||||||
4555 | { | - | ||||||||||||||||||||||||||||||||||||
4556 | ctx->psk_find_session_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
4557 | } executed 20 times by 1 test: end of block Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
4558 | - | |||||||||||||||||||||||||||||||||||||
4559 | void SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb) | - | ||||||||||||||||||||||||||||||||||||
4560 | { | - | ||||||||||||||||||||||||||||||||||||
4561 | s->psk_use_session_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
4562 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4563 | - | |||||||||||||||||||||||||||||||||||||
4564 | void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4565 | SSL_psk_use_session_cb_func cb) | - | ||||||||||||||||||||||||||||||||||||
4566 | { | - | ||||||||||||||||||||||||||||||||||||
4567 | ctx->psk_use_session_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
4568 | } executed 20 times by 1 test: end of block Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
4569 | - | |||||||||||||||||||||||||||||||||||||
4570 | void SSL_CTX_set_msg_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4571 | void (*cb) (int write_p, int version, | - | ||||||||||||||||||||||||||||||||||||
4572 | int content_type, const void *buf, | - | ||||||||||||||||||||||||||||||||||||
4573 | size_t len, SSL *ssl, void *arg)) | - | ||||||||||||||||||||||||||||||||||||
4574 | { | - | ||||||||||||||||||||||||||||||||||||
4575 | SSL_CTX_callback_ctrl(ctx, 15, (void (*)(void))cb); | - | ||||||||||||||||||||||||||||||||||||
4576 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4577 | - | |||||||||||||||||||||||||||||||||||||
4578 | void SSL_set_msg_callback(SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
4579 | void (*cb) (int write_p, int version, | - | ||||||||||||||||||||||||||||||||||||
4580 | int content_type, const void *buf, | - | ||||||||||||||||||||||||||||||||||||
4581 | size_t len, SSL *ssl, void *arg)) | - | ||||||||||||||||||||||||||||||||||||
4582 | { | - | ||||||||||||||||||||||||||||||||||||
4583 | SSL_callback_ctrl(ssl, 15, (void (*)(void))cb); | - | ||||||||||||||||||||||||||||||||||||
4584 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4585 | - | |||||||||||||||||||||||||||||||||||||
4586 | void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4587 | int (*cb) (SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
4588 | int | - | ||||||||||||||||||||||||||||||||||||
4589 | is_forward_secure)) | - | ||||||||||||||||||||||||||||||||||||
4590 | { | - | ||||||||||||||||||||||||||||||||||||
4591 | SSL_CTX_callback_ctrl(ctx, 79, | - | ||||||||||||||||||||||||||||||||||||
4592 | (void (*)(void))cb); | - | ||||||||||||||||||||||||||||||||||||
4593 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4594 | - | |||||||||||||||||||||||||||||||||||||
4595 | void SSL_set_not_resumable_session_callback(SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
4596 | int (*cb) (SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
4597 | int is_forward_secure)) | - | ||||||||||||||||||||||||||||||||||||
4598 | { | - | ||||||||||||||||||||||||||||||||||||
4599 | SSL_callback_ctrl(ssl, 79, | - | ||||||||||||||||||||||||||||||||||||
4600 | (void (*)(void))cb); | - | ||||||||||||||||||||||||||||||||||||
4601 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4602 | - | |||||||||||||||||||||||||||||||||||||
4603 | void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4604 | size_t (*cb) (SSL *ssl, int type, | - | ||||||||||||||||||||||||||||||||||||
4605 | size_t len, void *arg)) | - | ||||||||||||||||||||||||||||||||||||
4606 | { | - | ||||||||||||||||||||||||||||||||||||
4607 | ctx->record_padding_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
4608 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4609 | - | |||||||||||||||||||||||||||||||||||||
4610 | void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg) | - | ||||||||||||||||||||||||||||||||||||
4611 | { | - | ||||||||||||||||||||||||||||||||||||
4612 | ctx->record_padding_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
4613 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4614 | - | |||||||||||||||||||||||||||||||||||||
4615 | void *SSL_CTX_get_record_padding_callback_arg(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4616 | { | - | ||||||||||||||||||||||||||||||||||||
4617 | return never executed: ctx->record_padding_arg;return ctx->record_padding_arg; never executed: return ctx->record_padding_arg; | 0 | ||||||||||||||||||||||||||||||||||||
4618 | } | - | ||||||||||||||||||||||||||||||||||||
4619 | - | |||||||||||||||||||||||||||||||||||||
4620 | int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size) | - | ||||||||||||||||||||||||||||||||||||
4621 | { | - | ||||||||||||||||||||||||||||||||||||
4622 | - | |||||||||||||||||||||||||||||||||||||
4623 | if (block_size == 1
| 0-2 | ||||||||||||||||||||||||||||||||||||
4624 | ctx->block_padding = 0; never executed: ctx->block_padding = 0; | 0 | ||||||||||||||||||||||||||||||||||||
4625 | else if (block_size <= 16384
| 0-2 | ||||||||||||||||||||||||||||||||||||
4626 | ctx->block_padding = block_size; executed 2 times by 1 test: ctx->block_padding = block_size; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
4627 | else | - | ||||||||||||||||||||||||||||||||||||
4628 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4629 | return executed 2 times by 1 test: 1;return 1; Executed by:
executed 2 times by 1 test: return 1; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
4630 | } | - | ||||||||||||||||||||||||||||||||||||
4631 | - | |||||||||||||||||||||||||||||||||||||
4632 | void SSL_set_record_padding_callback(SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
4633 | size_t (*cb) (SSL *ssl, int type, | - | ||||||||||||||||||||||||||||||||||||
4634 | size_t len, void *arg)) | - | ||||||||||||||||||||||||||||||||||||
4635 | { | - | ||||||||||||||||||||||||||||||||||||
4636 | ssl->record_padding_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
4637 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4638 | - | |||||||||||||||||||||||||||||||||||||
4639 | void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg) | - | ||||||||||||||||||||||||||||||||||||
4640 | { | - | ||||||||||||||||||||||||||||||||||||
4641 | ssl->record_padding_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
4642 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4643 | - | |||||||||||||||||||||||||||||||||||||
4644 | void *SSL_get_record_padding_callback_arg(SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
4645 | { | - | ||||||||||||||||||||||||||||||||||||
4646 | return never executed: ssl->record_padding_arg;return ssl->record_padding_arg; never executed: return ssl->record_padding_arg; | 0 | ||||||||||||||||||||||||||||||||||||
4647 | } | - | ||||||||||||||||||||||||||||||||||||
4648 | - | |||||||||||||||||||||||||||||||||||||
4649 | int SSL_set_block_padding(SSL *ssl, size_t block_size) | - | ||||||||||||||||||||||||||||||||||||
4650 | { | - | ||||||||||||||||||||||||||||||||||||
4651 | - | |||||||||||||||||||||||||||||||||||||
4652 | if (block_size == 1
| 0 | ||||||||||||||||||||||||||||||||||||
4653 | ssl->block_padding = 0; never executed: ssl->block_padding = 0; | 0 | ||||||||||||||||||||||||||||||||||||
4654 | else if (block_size <= 16384
| 0 | ||||||||||||||||||||||||||||||||||||
4655 | ssl->block_padding = block_size; never executed: ssl->block_padding = block_size; | 0 | ||||||||||||||||||||||||||||||||||||
4656 | else | - | ||||||||||||||||||||||||||||||||||||
4657 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
4658 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
4659 | } | - | ||||||||||||||||||||||||||||||||||||
4660 | - | |||||||||||||||||||||||||||||||||||||
4661 | int SSL_set_num_tickets(SSL *s, size_t num_tickets) | - | ||||||||||||||||||||||||||||||||||||
4662 | { | - | ||||||||||||||||||||||||||||||||||||
4663 | s->num_tickets = num_tickets; | - | ||||||||||||||||||||||||||||||||||||
4664 | - | |||||||||||||||||||||||||||||||||||||
4665 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
4666 | } | - | ||||||||||||||||||||||||||||||||||||
4667 | - | |||||||||||||||||||||||||||||||||||||
4668 | size_t SSL_get_num_tickets(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4669 | { | - | ||||||||||||||||||||||||||||||||||||
4670 | return never executed: s->num_tickets;return s->num_tickets; never executed: return s->num_tickets; | 0 | ||||||||||||||||||||||||||||||||||||
4671 | } | - | ||||||||||||||||||||||||||||||||||||
4672 | - | |||||||||||||||||||||||||||||||||||||
4673 | int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets) | - | ||||||||||||||||||||||||||||||||||||
4674 | { | - | ||||||||||||||||||||||||||||||||||||
4675 | ctx->num_tickets = num_tickets; | - | ||||||||||||||||||||||||||||||||||||
4676 | - | |||||||||||||||||||||||||||||||||||||
4677 | return executed 18 times by 1 test: 1;return 1; Executed by:
executed 18 times by 1 test: return 1; Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
4678 | } | - | ||||||||||||||||||||||||||||||||||||
4679 | - | |||||||||||||||||||||||||||||||||||||
4680 | size_t SSL_CTX_get_num_tickets(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4681 | { | - | ||||||||||||||||||||||||||||||||||||
4682 | return never executed: ctx->num_tickets;return ctx->num_tickets; never executed: return ctx->num_tickets; | 0 | ||||||||||||||||||||||||||||||||||||
4683 | } | - | ||||||||||||||||||||||||||||||||||||
4684 | EVP_MD_CTX *ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md) | - | ||||||||||||||||||||||||||||||||||||
4685 | { | - | ||||||||||||||||||||||||||||||||||||
4686 | ssl_clear_hash_ctx(hash); | - | ||||||||||||||||||||||||||||||||||||
4687 | *hash = EVP_MD_CTX_new(); | - | ||||||||||||||||||||||||||||||||||||
4688 | if (*
| 0-4632 | ||||||||||||||||||||||||||||||||||||
4689 | ((void *)0)
| 0-4632 | ||||||||||||||||||||||||||||||||||||
4690 | || (md
| 0-4632 | ||||||||||||||||||||||||||||||||||||
4691 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4692 | ) <= 0
| 0 | ||||||||||||||||||||||||||||||||||||
4693 | EVP_MD_CTX_free(*hash); | - | ||||||||||||||||||||||||||||||||||||
4694 | *hash = | - | ||||||||||||||||||||||||||||||||||||
4695 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4696 | ; | - | ||||||||||||||||||||||||||||||||||||
4697 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4698 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4699 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
4700 | } | - | ||||||||||||||||||||||||||||||||||||
4701 | return executed 4632 times by 1 test: *hash;return *hash; Executed by:
executed 4632 times by 1 test: return *hash; Executed by:
| 4632 | ||||||||||||||||||||||||||||||||||||
4702 | } | - | ||||||||||||||||||||||||||||||||||||
4703 | - | |||||||||||||||||||||||||||||||||||||
4704 | void ssl_clear_hash_ctx(EVP_MD_CTX **hash) | - | ||||||||||||||||||||||||||||||||||||
4705 | { | - | ||||||||||||||||||||||||||||||||||||
4706 | - | |||||||||||||||||||||||||||||||||||||
4707 | EVP_MD_CTX_free(*hash); | - | ||||||||||||||||||||||||||||||||||||
4708 | *hash = | - | ||||||||||||||||||||||||||||||||||||
4709 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4710 | ; | - | ||||||||||||||||||||||||||||||||||||
4711 | } executed 69892 times by 2 tests: end of block Executed by:
| 69892 | ||||||||||||||||||||||||||||||||||||
4712 | - | |||||||||||||||||||||||||||||||||||||
4713 | - | |||||||||||||||||||||||||||||||||||||
4714 | int ssl_handshake_hash(SSL *s, unsigned char *out, size_t outlen, | - | ||||||||||||||||||||||||||||||||||||
4715 | size_t *hashlen) | - | ||||||||||||||||||||||||||||||||||||
4716 | { | - | ||||||||||||||||||||||||||||||||||||
4717 | EVP_MD_CTX *ctx = | - | ||||||||||||||||||||||||||||||||||||
4718 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4719 | ; | - | ||||||||||||||||||||||||||||||||||||
4720 | EVP_MD_CTX *hdgst = s->s3->handshake_dgst; | - | ||||||||||||||||||||||||||||||||||||
4721 | int hashleni = EVP_MD_size(EVP_MD_CTX_md(hdgst)); | - | ||||||||||||||||||||||||||||||||||||
4722 | int ret = 0; | - | ||||||||||||||||||||||||||||||||||||
4723 | - | |||||||||||||||||||||||||||||||||||||
4724 | if (hashleni < 0
| 0-16947 | ||||||||||||||||||||||||||||||||||||
4725 | ossl_statem_fatal((s), (80), (560), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||
4726 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
4727 | , | - | ||||||||||||||||||||||||||||||||||||
4728 | 4413 | - | ||||||||||||||||||||||||||||||||||||
4729 | ) | - | ||||||||||||||||||||||||||||||||||||
4730 | ; | - | ||||||||||||||||||||||||||||||||||||
4731 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
4732 | } | - | ||||||||||||||||||||||||||||||||||||
4733 | - | |||||||||||||||||||||||||||||||||||||
4734 | ctx = EVP_MD_CTX_new(); | - | ||||||||||||||||||||||||||||||||||||
4735 | if (ctx ==
| 0-16947 | ||||||||||||||||||||||||||||||||||||
4736 | ((void *)0)
| 0-16947 | ||||||||||||||||||||||||||||||||||||
4737 | ) | - | ||||||||||||||||||||||||||||||||||||
4738 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
4739 | - | |||||||||||||||||||||||||||||||||||||
4740 | if (!EVP_MD_CTX_copy_ex(ctx, hdgst)
| 0-16947 | ||||||||||||||||||||||||||||||||||||
4741 | || EVP_DigestFinal_ex(ctx, out,
| 0-16947 | ||||||||||||||||||||||||||||||||||||
4742 | ((void *)0)
| 0-16947 | ||||||||||||||||||||||||||||||||||||
4743 | ) <= 0
| 0-16947 | ||||||||||||||||||||||||||||||||||||
4744 | ossl_statem_fatal((s), (80), (560), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||
4745 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
4746 | , | - | ||||||||||||||||||||||||||||||||||||
4747 | 4424 | - | ||||||||||||||||||||||||||||||||||||
4748 | ) | - | ||||||||||||||||||||||||||||||||||||
4749 | ; | - | ||||||||||||||||||||||||||||||||||||
4750 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
4751 | } | - | ||||||||||||||||||||||||||||||||||||
4752 | - | |||||||||||||||||||||||||||||||||||||
4753 | *hashlen = hashleni; | - | ||||||||||||||||||||||||||||||||||||
4754 | - | |||||||||||||||||||||||||||||||||||||
4755 | ret = 1; | - | ||||||||||||||||||||||||||||||||||||
4756 | err: code before this statement executed 16947 times by 1 test: err: Executed by:
| 16947 | ||||||||||||||||||||||||||||||||||||
4757 | EVP_MD_CTX_free(ctx); | - | ||||||||||||||||||||||||||||||||||||
4758 | return executed 16947 times by 1 test: ret;return ret; Executed by:
executed 16947 times by 1 test: return ret; Executed by:
| 16947 | ||||||||||||||||||||||||||||||||||||
4759 | } | - | ||||||||||||||||||||||||||||||||||||
4760 | - | |||||||||||||||||||||||||||||||||||||
4761 | int SSL_session_reused(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4762 | { | - | ||||||||||||||||||||||||||||||||||||
4763 | return executed 3001 times by 1 test: s->hit;return s->hit; Executed by:
executed 3001 times by 1 test: return s->hit; Executed by:
| 3001 | ||||||||||||||||||||||||||||||||||||
4764 | } | - | ||||||||||||||||||||||||||||||||||||
4765 | - | |||||||||||||||||||||||||||||||||||||
4766 | int SSL_is_server(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4767 | { | - | ||||||||||||||||||||||||||||||||||||
4768 | return executed 1759 times by 1 test: s->server;return s->server; Executed by:
executed 1759 times by 1 test: return s->server; Executed by:
| 1759 | ||||||||||||||||||||||||||||||||||||
4769 | } | - | ||||||||||||||||||||||||||||||||||||
4770 | - | |||||||||||||||||||||||||||||||||||||
4771 | - | |||||||||||||||||||||||||||||||||||||
4772 | void SSL_set_debug(SSL *s, int debug) | - | ||||||||||||||||||||||||||||||||||||
4773 | { | - | ||||||||||||||||||||||||||||||||||||
4774 | - | |||||||||||||||||||||||||||||||||||||
4775 | (void)s; | - | ||||||||||||||||||||||||||||||||||||
4776 | (void)debug; | - | ||||||||||||||||||||||||||||||||||||
4777 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4778 | - | |||||||||||||||||||||||||||||||||||||
4779 | - | |||||||||||||||||||||||||||||||||||||
4780 | void SSL_set_security_level(SSL *s, int level) | - | ||||||||||||||||||||||||||||||||||||
4781 | { | - | ||||||||||||||||||||||||||||||||||||
4782 | s->cert->sec_level = level; | - | ||||||||||||||||||||||||||||||||||||
4783 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4784 | - | |||||||||||||||||||||||||||||||||||||
4785 | int SSL_get_security_level(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4786 | { | - | ||||||||||||||||||||||||||||||||||||
4787 | return executed 675070 times by 1 test: s->cert->sec_level;return s->cert->sec_level; Executed by:
executed 675070 times by 1 test: return s->cert->sec_level; Executed by:
| 675070 | ||||||||||||||||||||||||||||||||||||
4788 | } | - | ||||||||||||||||||||||||||||||||||||
4789 | - | |||||||||||||||||||||||||||||||||||||
4790 | void SSL_set_security_callback(SSL *s, | - | ||||||||||||||||||||||||||||||||||||
4791 | int (*cb) (const SSL *s, const SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4792 | int op, int bits, int nid, | - | ||||||||||||||||||||||||||||||||||||
4793 | void *other, void *ex)) | - | ||||||||||||||||||||||||||||||||||||
4794 | { | - | ||||||||||||||||||||||||||||||||||||
4795 | s->cert->sec_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
4796 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4797 | - | |||||||||||||||||||||||||||||||||||||
4798 | int (*SSL_get_security_callback(const SSL *s)) (const SSL *s, | - | ||||||||||||||||||||||||||||||||||||
4799 | const SSL_CTX *ctx, int op, | - | ||||||||||||||||||||||||||||||||||||
4800 | int bits, int nid, void *other, | - | ||||||||||||||||||||||||||||||||||||
4801 | void *ex) { | - | ||||||||||||||||||||||||||||||||||||
4802 | return never executed: s->cert->sec_cb;return s->cert->sec_cb; never executed: return s->cert->sec_cb; | 0 | ||||||||||||||||||||||||||||||||||||
4803 | } | - | ||||||||||||||||||||||||||||||||||||
4804 | - | |||||||||||||||||||||||||||||||||||||
4805 | void SSL_set0_security_ex_data(SSL *s, void *ex) | - | ||||||||||||||||||||||||||||||||||||
4806 | { | - | ||||||||||||||||||||||||||||||||||||
4807 | s->cert->sec_ex = ex; | - | ||||||||||||||||||||||||||||||||||||
4808 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4809 | - | |||||||||||||||||||||||||||||||||||||
4810 | void *SSL_get0_security_ex_data(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4811 | { | - | ||||||||||||||||||||||||||||||||||||
4812 | return never executed: s->cert->sec_ex;return s->cert->sec_ex; never executed: return s->cert->sec_ex; | 0 | ||||||||||||||||||||||||||||||||||||
4813 | } | - | ||||||||||||||||||||||||||||||||||||
4814 | - | |||||||||||||||||||||||||||||||||||||
4815 | void SSL_CTX_set_security_level(SSL_CTX *ctx, int level) | - | ||||||||||||||||||||||||||||||||||||
4816 | { | - | ||||||||||||||||||||||||||||||||||||
4817 | ctx->cert->sec_level = level; | - | ||||||||||||||||||||||||||||||||||||
4818 | } executed 358 times by 1 test: end of block Executed by:
| 358 | ||||||||||||||||||||||||||||||||||||
4819 | - | |||||||||||||||||||||||||||||||||||||
4820 | int SSL_CTX_get_security_level(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4821 | { | - | ||||||||||||||||||||||||||||||||||||
4822 | return executed 16365 times by 1 test: ctx->cert->sec_level;return ctx->cert->sec_level; Executed by:
executed 16365 times by 1 test: return ctx->cert->sec_level; Executed by:
| 16365 | ||||||||||||||||||||||||||||||||||||
4823 | } | - | ||||||||||||||||||||||||||||||||||||
4824 | - | |||||||||||||||||||||||||||||||||||||
4825 | void SSL_CTX_set_security_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4826 | int (*cb) (const SSL *s, const SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4827 | int op, int bits, int nid, | - | ||||||||||||||||||||||||||||||||||||
4828 | void *other, void *ex)) | - | ||||||||||||||||||||||||||||||||||||
4829 | { | - | ||||||||||||||||||||||||||||||||||||
4830 | ctx->cert->sec_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
4831 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4832 | - | |||||||||||||||||||||||||||||||||||||
4833 | int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (const SSL *s, | - | ||||||||||||||||||||||||||||||||||||
4834 | const SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
4835 | int op, int bits, | - | ||||||||||||||||||||||||||||||||||||
4836 | int nid, | - | ||||||||||||||||||||||||||||||||||||
4837 | void *other, | - | ||||||||||||||||||||||||||||||||||||
4838 | void *ex) { | - | ||||||||||||||||||||||||||||||||||||
4839 | return never executed: ctx->cert->sec_cb;return ctx->cert->sec_cb; never executed: return ctx->cert->sec_cb; | 0 | ||||||||||||||||||||||||||||||||||||
4840 | } | - | ||||||||||||||||||||||||||||||||||||
4841 | - | |||||||||||||||||||||||||||||||||||||
4842 | void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex) | - | ||||||||||||||||||||||||||||||||||||
4843 | { | - | ||||||||||||||||||||||||||||||||||||
4844 | ctx->cert->sec_ex = ex; | - | ||||||||||||||||||||||||||||||||||||
4845 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
4846 | - | |||||||||||||||||||||||||||||||||||||
4847 | void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4848 | { | - | ||||||||||||||||||||||||||||||||||||
4849 | return never executed: ctx->cert->sec_ex;return ctx->cert->sec_ex; never executed: return ctx->cert->sec_ex; | 0 | ||||||||||||||||||||||||||||||||||||
4850 | } | - | ||||||||||||||||||||||||||||||||||||
4851 | - | |||||||||||||||||||||||||||||||||||||
4852 | - | |||||||||||||||||||||||||||||||||||||
4853 | - | |||||||||||||||||||||||||||||||||||||
4854 | - | |||||||||||||||||||||||||||||||||||||
4855 | - | |||||||||||||||||||||||||||||||||||||
4856 | - | |||||||||||||||||||||||||||||||||||||
4857 | unsigned long SSL_CTX_get_options(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
4858 | { | - | ||||||||||||||||||||||||||||||||||||
4859 | return executed 17 times by 1 test: ctx->options;return ctx->options; Executed by:
executed 17 times by 1 test: return ctx->options; Executed by:
| 17 | ||||||||||||||||||||||||||||||||||||
4860 | } | - | ||||||||||||||||||||||||||||||||||||
4861 | - | |||||||||||||||||||||||||||||||||||||
4862 | unsigned long SSL_get_options(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4863 | { | - | ||||||||||||||||||||||||||||||||||||
4864 | return executed 8252 times by 1 test: s->options;return s->options; Executed by:
executed 8252 times by 1 test: return s->options; Executed by:
| 8252 | ||||||||||||||||||||||||||||||||||||
4865 | } | - | ||||||||||||||||||||||||||||||||||||
4866 | - | |||||||||||||||||||||||||||||||||||||
4867 | unsigned long SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op) | - | ||||||||||||||||||||||||||||||||||||
4868 | { | - | ||||||||||||||||||||||||||||||||||||
4869 | return executed 28 times by 1 test: ctx->options |= op;return ctx->options |= op; Executed by:
executed 28 times by 1 test: return ctx->options |= op; Executed by:
| 28 | ||||||||||||||||||||||||||||||||||||
4870 | } | - | ||||||||||||||||||||||||||||||||||||
4871 | - | |||||||||||||||||||||||||||||||||||||
4872 | unsigned long SSL_set_options(SSL *s, unsigned long op) | - | ||||||||||||||||||||||||||||||||||||
4873 | { | - | ||||||||||||||||||||||||||||||||||||
4874 | return executed 28 times by 1 test: s->options |= op;return s->options |= op; Executed by:
executed 28 times by 1 test: return s->options |= op; Executed by:
| 28 | ||||||||||||||||||||||||||||||||||||
4875 | } | - | ||||||||||||||||||||||||||||||||||||
4876 | - | |||||||||||||||||||||||||||||||||||||
4877 | unsigned long SSL_CTX_clear_options(SSL_CTX *ctx, unsigned long op) | - | ||||||||||||||||||||||||||||||||||||
4878 | { | - | ||||||||||||||||||||||||||||||||||||
4879 | return executed 12 times by 1 test: ctx->options &= ~op;return ctx->options &= ~op; Executed by:
executed 12 times by 1 test: return ctx->options &= ~op; Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
4880 | } | - | ||||||||||||||||||||||||||||||||||||
4881 | - | |||||||||||||||||||||||||||||||||||||
4882 | unsigned long SSL_clear_options(SSL *s, unsigned long op) | - | ||||||||||||||||||||||||||||||||||||
4883 | { | - | ||||||||||||||||||||||||||||||||||||
4884 | return executed 17 times by 1 test: s->options &= ~op;return s->options &= ~op; Executed by:
executed 17 times by 1 test: return s->options &= ~op; Executed by:
| 17 | ||||||||||||||||||||||||||||||||||||
4885 | } | - | ||||||||||||||||||||||||||||||||||||
4886 | - | |||||||||||||||||||||||||||||||||||||
4887 | struct stack_st_X509 *SSL_get0_verified_chain(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4888 | { | - | ||||||||||||||||||||||||||||||||||||
4889 | return never executed: s->verified_chain;return s->verified_chain; never executed: return s->verified_chain; | 0 | ||||||||||||||||||||||||||||||||||||
4890 | } | - | ||||||||||||||||||||||||||||||||||||
4891 | - | |||||||||||||||||||||||||||||||||||||
4892 | static int ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) { SSL_CIPHER const *a = a_; SSL_CIPHER const *b = b_; return executed 772058 times by 2 tests: ssl_cipher_id_cmp(a,b);return ssl_cipher_id_cmp(a,b); Executed by:
executed 772058 times by 2 tests: } SSL_CIPHER *OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base, int num) { returnreturn ssl_cipher_id_cmp(a,b); Executed by:
executed 185106 times by 2 tests: (SSL_CIPHER *)OBJ_bsearch_(key, base, num, sizeof(SSL_CIPHER), ssl_cipher_id_cmp_BSEARCH_CMP_FN);return (SSL_CIPHER *)OBJ_bsearch_(key, base, num, sizeof(SSL_CIPHER), ssl_cipher_id_cmp_BSEARCH_CMP_FN); Executed by:
executed 185106 times by 2 tests: } extern void dummy_prototype(void);return (SSL_CIPHER *)OBJ_bsearch_(key, base, num, sizeof(SSL_CIPHER), ssl_cipher_id_cmp_BSEARCH_CMP_FN); Executed by:
| 185106-772058 | ||||||||||||||||||||||||||||||||||||
4893 | static int ct_move_scts(struct stack_st_SCT **dst, struct stack_st_SCT *src, | - | ||||||||||||||||||||||||||||||||||||
4894 | sct_source_t origin) | - | ||||||||||||||||||||||||||||||||||||
4895 | { | - | ||||||||||||||||||||||||||||||||||||
4896 | int scts_moved = 0; | - | ||||||||||||||||||||||||||||||||||||
4897 | SCT *sct = | - | ||||||||||||||||||||||||||||||||||||
4898 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4899 | ; | - | ||||||||||||||||||||||||||||||||||||
4900 | - | |||||||||||||||||||||||||||||||||||||
4901 | if (*
| 5-9 | ||||||||||||||||||||||||||||||||||||
4902 | ((void *)0)
| 5-9 | ||||||||||||||||||||||||||||||||||||
4903 | ) { | - | ||||||||||||||||||||||||||||||||||||
4904 | *dst = sk_SCT_new_null(); | - | ||||||||||||||||||||||||||||||||||||
4905 | if (*
| 0-9 | ||||||||||||||||||||||||||||||||||||
4906 | ((void *)0)
| 0-9 | ||||||||||||||||||||||||||||||||||||
4907 | ) { | - | ||||||||||||||||||||||||||||||||||||
4908 | ERR_put_error(20,(345),((1|64)),__FILE__,4587); | - | ||||||||||||||||||||||||||||||||||||
4909 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
4910 | } | - | ||||||||||||||||||||||||||||||||||||
4911 | } executed 9 times by 1 test: end of block Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
4912 | - | |||||||||||||||||||||||||||||||||||||
4913 | while ((
| 6-14 | ||||||||||||||||||||||||||||||||||||
4914 | ((void *)0)
| 6-14 | ||||||||||||||||||||||||||||||||||||
4915 | ) { | - | ||||||||||||||||||||||||||||||||||||
4916 | if (SCT_set_source(sct, origin) != 1
| 0-6 | ||||||||||||||||||||||||||||||||||||
4917 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
4918 | - | |||||||||||||||||||||||||||||||||||||
4919 | if (sk_SCT_push(*dst, sct) <= 0
| 0-6 | ||||||||||||||||||||||||||||||||||||
4920 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
4921 | scts_moved += 1; | - | ||||||||||||||||||||||||||||||||||||
4922 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
4923 | - | |||||||||||||||||||||||||||||||||||||
4924 | return executed 14 times by 1 test: scts_moved;return scts_moved; Executed by:
executed 14 times by 1 test: return scts_moved; Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||
4925 | err: | - | ||||||||||||||||||||||||||||||||||||
4926 | if (sct !=
| 0 | ||||||||||||||||||||||||||||||||||||
4927 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
4928 | ) | - | ||||||||||||||||||||||||||||||||||||
4929 | sk_SCT_push(src, sct); never executed: sk_SCT_push(src, sct); | 0 | ||||||||||||||||||||||||||||||||||||
4930 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
4931 | } | - | ||||||||||||||||||||||||||||||||||||
4932 | - | |||||||||||||||||||||||||||||||||||||
4933 | - | |||||||||||||||||||||||||||||||||||||
4934 | - | |||||||||||||||||||||||||||||||||||||
4935 | - | |||||||||||||||||||||||||||||||||||||
4936 | - | |||||||||||||||||||||||||||||||||||||
4937 | static int ct_extract_tls_extension_scts(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4938 | { | - | ||||||||||||||||||||||||||||||||||||
4939 | int scts_extracted = 0; | - | ||||||||||||||||||||||||||||||||||||
4940 | - | |||||||||||||||||||||||||||||||||||||
4941 | if (s->ext.scts !=
| 2-7 | ||||||||||||||||||||||||||||||||||||
4942 | ((void *)0)
| 2-7 | ||||||||||||||||||||||||||||||||||||
4943 | ) { | - | ||||||||||||||||||||||||||||||||||||
4944 | const unsigned char *p = s->ext.scts; | - | ||||||||||||||||||||||||||||||||||||
4945 | struct stack_st_SCT *scts = o2i_SCT_LIST( | - | ||||||||||||||||||||||||||||||||||||
4946 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4947 | , &p, s->ext.scts_len); | - | ||||||||||||||||||||||||||||||||||||
4948 | - | |||||||||||||||||||||||||||||||||||||
4949 | scts_extracted = ct_move_scts(&s->scts, scts, SCT_SOURCE_TLS_EXTENSION); | - | ||||||||||||||||||||||||||||||||||||
4950 | - | |||||||||||||||||||||||||||||||||||||
4951 | SCT_LIST_free(scts); | - | ||||||||||||||||||||||||||||||||||||
4952 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
4953 | - | |||||||||||||||||||||||||||||||||||||
4954 | return executed 9 times by 1 test: scts_extracted;return scts_extracted; Executed by:
executed 9 times by 1 test: return scts_extracted; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
4955 | } | - | ||||||||||||||||||||||||||||||||||||
4956 | static int ct_extract_ocsp_response_scts(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
4957 | { | - | ||||||||||||||||||||||||||||||||||||
4958 | - | |||||||||||||||||||||||||||||||||||||
4959 | int scts_extracted = 0; | - | ||||||||||||||||||||||||||||||||||||
4960 | const unsigned char *p; | - | ||||||||||||||||||||||||||||||||||||
4961 | OCSP_BASICRESP *br = | - | ||||||||||||||||||||||||||||||||||||
4962 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4963 | ; | - | ||||||||||||||||||||||||||||||||||||
4964 | OCSP_RESPONSE *rsp = | - | ||||||||||||||||||||||||||||||||||||
4965 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4966 | ; | - | ||||||||||||||||||||||||||||||||||||
4967 | struct stack_st_SCT *scts = | - | ||||||||||||||||||||||||||||||||||||
4968 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4969 | ; | - | ||||||||||||||||||||||||||||||||||||
4970 | int i; | - | ||||||||||||||||||||||||||||||||||||
4971 | - | |||||||||||||||||||||||||||||||||||||
4972 | if (s->ext.ocsp.resp ==
| 3-6 | ||||||||||||||||||||||||||||||||||||
4973 | ((void *)0)
| 3-6 | ||||||||||||||||||||||||||||||||||||
4974 | || s->ext.ocsp.resp_len == 0
| 0-3 | ||||||||||||||||||||||||||||||||||||
4975 | goto executed 6 times by 1 test: err;goto err; Executed by:
executed 6 times by 1 test: goto err; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
4976 | - | |||||||||||||||||||||||||||||||||||||
4977 | p = s->ext.ocsp.resp; | - | ||||||||||||||||||||||||||||||||||||
4978 | rsp = d2i_OCSP_RESPONSE( | - | ||||||||||||||||||||||||||||||||||||
4979 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
4980 | , &p, (int)s->ext.ocsp.resp_len); | - | ||||||||||||||||||||||||||||||||||||
4981 | if (rsp ==
| 0-3 | ||||||||||||||||||||||||||||||||||||
4982 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
4983 | ) | - | ||||||||||||||||||||||||||||||||||||
4984 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
4985 | - | |||||||||||||||||||||||||||||||||||||
4986 | br = OCSP_response_get1_basic(rsp); | - | ||||||||||||||||||||||||||||||||||||
4987 | if (br ==
| 0-3 | ||||||||||||||||||||||||||||||||||||
4988 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
4989 | ) | - | ||||||||||||||||||||||||||||||||||||
4990 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
4991 | - | |||||||||||||||||||||||||||||||||||||
4992 | for (i = 0; i < OCSP_resp_count(br)
| 3 | ||||||||||||||||||||||||||||||||||||
4993 | OCSP_SINGLERESP *single = OCSP_resp_get0(br, i); | - | ||||||||||||||||||||||||||||||||||||
4994 | - | |||||||||||||||||||||||||||||||||||||
4995 | if (single ==
| 0-3 | ||||||||||||||||||||||||||||||||||||
4996 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
4997 | ) | - | ||||||||||||||||||||||||||||||||||||
4998 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
4999 | - | |||||||||||||||||||||||||||||||||||||
5000 | scts = | - | ||||||||||||||||||||||||||||||||||||
5001 | OCSP_SINGLERESP_get1_ext_d2i(single, 954, | - | ||||||||||||||||||||||||||||||||||||
5002 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5003 | , | - | ||||||||||||||||||||||||||||||||||||
5004 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5005 | ); | - | ||||||||||||||||||||||||||||||||||||
5006 | scts_extracted = | - | ||||||||||||||||||||||||||||||||||||
5007 | ct_move_scts(&s->scts, scts, SCT_SOURCE_OCSP_STAPLED_RESPONSE); | - | ||||||||||||||||||||||||||||||||||||
5008 | if (scts_extracted < 0
| 0-3 | ||||||||||||||||||||||||||||||||||||
5009 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
5010 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
5011 | err: code before this statement executed 3 times by 1 test: err: Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
5012 | SCT_LIST_free(scts); | - | ||||||||||||||||||||||||||||||||||||
5013 | OCSP_BASICRESP_free(br); | - | ||||||||||||||||||||||||||||||||||||
5014 | OCSP_RESPONSE_free(rsp); | - | ||||||||||||||||||||||||||||||||||||
5015 | return executed 9 times by 1 test: scts_extracted;return scts_extracted; Executed by:
executed 9 times by 1 test: return scts_extracted; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
5016 | - | |||||||||||||||||||||||||||||||||||||
5017 | - | |||||||||||||||||||||||||||||||||||||
5018 | - | |||||||||||||||||||||||||||||||||||||
5019 | - | |||||||||||||||||||||||||||||||||||||
5020 | } | - | ||||||||||||||||||||||||||||||||||||
5021 | - | |||||||||||||||||||||||||||||||||||||
5022 | - | |||||||||||||||||||||||||||||||||||||
5023 | - | |||||||||||||||||||||||||||||||||||||
5024 | - | |||||||||||||||||||||||||||||||||||||
5025 | - | |||||||||||||||||||||||||||||||||||||
5026 | - | |||||||||||||||||||||||||||||||||||||
5027 | static int ct_extract_x509v3_extension_scts(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
5028 | { | - | ||||||||||||||||||||||||||||||||||||
5029 | int scts_extracted = 0; | - | ||||||||||||||||||||||||||||||||||||
5030 | X509 *cert = s->session !=
| 0-9 | ||||||||||||||||||||||||||||||||||||
5031 | ((void *)0)
| 0-9 | ||||||||||||||||||||||||||||||||||||
5032 | ? s->session->peer : | - | ||||||||||||||||||||||||||||||||||||
5033 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5034 | ; | - | ||||||||||||||||||||||||||||||||||||
5035 | - | |||||||||||||||||||||||||||||||||||||
5036 | if (cert !=
| 0-9 | ||||||||||||||||||||||||||||||||||||
5037 | ((void *)0)
| 0-9 | ||||||||||||||||||||||||||||||||||||
5038 | ) { | - | ||||||||||||||||||||||||||||||||||||
5039 | struct stack_st_SCT *scts = | - | ||||||||||||||||||||||||||||||||||||
5040 | X509_get_ext_d2i(cert, 951, | - | ||||||||||||||||||||||||||||||||||||
5041 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5042 | , | - | ||||||||||||||||||||||||||||||||||||
5043 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5044 | ); | - | ||||||||||||||||||||||||||||||||||||
5045 | - | |||||||||||||||||||||||||||||||||||||
5046 | scts_extracted = | - | ||||||||||||||||||||||||||||||||||||
5047 | ct_move_scts(&s->scts, scts, SCT_SOURCE_X509V3_EXTENSION); | - | ||||||||||||||||||||||||||||||||||||
5048 | - | |||||||||||||||||||||||||||||||||||||
5049 | SCT_LIST_free(scts); | - | ||||||||||||||||||||||||||||||||||||
5050 | } executed 9 times by 1 test: end of block Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
5051 | - | |||||||||||||||||||||||||||||||||||||
5052 | return executed 9 times by 1 test: scts_extracted;return scts_extracted; Executed by:
executed 9 times by 1 test: return scts_extracted; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
5053 | } | - | ||||||||||||||||||||||||||||||||||||
5054 | - | |||||||||||||||||||||||||||||||||||||
5055 | - | |||||||||||||||||||||||||||||||||||||
5056 | - | |||||||||||||||||||||||||||||||||||||
5057 | - | |||||||||||||||||||||||||||||||||||||
5058 | - | |||||||||||||||||||||||||||||||||||||
5059 | - | |||||||||||||||||||||||||||||||||||||
5060 | const struct stack_st_SCT *SSL_get0_peer_scts(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
5061 | { | - | ||||||||||||||||||||||||||||||||||||
5062 | if (!s->scts_parsed
| 0-9 | ||||||||||||||||||||||||||||||||||||
5063 | if (ct_extract_tls_extension_scts(s) < 0
| 0-9 | ||||||||||||||||||||||||||||||||||||
5064 | ct_extract_ocsp_response_scts(s) < 0
| 0-9 | ||||||||||||||||||||||||||||||||||||
5065 | ct_extract_x509v3_extension_scts(s) < 0
| 0-9 | ||||||||||||||||||||||||||||||||||||
5066 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
5067 | - | |||||||||||||||||||||||||||||||||||||
5068 | s->scts_parsed = 1; | - | ||||||||||||||||||||||||||||||||||||
5069 | } executed 9 times by 1 test: end of block Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
5070 | return executed 9 times by 1 test: s->scts;return s->scts; Executed by:
executed 9 times by 1 test: return s->scts; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
5071 | err: | - | ||||||||||||||||||||||||||||||||||||
5072 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
5073 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
5074 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
5075 | } | - | ||||||||||||||||||||||||||||||||||||
5076 | - | |||||||||||||||||||||||||||||||||||||
5077 | static int ct_permissive(const CT_POLICY_EVAL_CTX * ctx, | - | ||||||||||||||||||||||||||||||||||||
5078 | const struct stack_st_SCT *scts, void *unused_arg) | - | ||||||||||||||||||||||||||||||||||||
5079 | { | - | ||||||||||||||||||||||||||||||||||||
5080 | return executed 3 times by 1 test: 1;return 1; Executed by:
executed 3 times by 1 test: return 1; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
5081 | } | - | ||||||||||||||||||||||||||||||||||||
5082 | - | |||||||||||||||||||||||||||||||||||||
5083 | static int ct_strict(const CT_POLICY_EVAL_CTX * ctx, | - | ||||||||||||||||||||||||||||||||||||
5084 | const struct stack_st_SCT *scts, void *unused_arg) | - | ||||||||||||||||||||||||||||||||||||
5085 | { | - | ||||||||||||||||||||||||||||||||||||
5086 | int count = scts !=
| 0-3 | ||||||||||||||||||||||||||||||||||||
5087 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
5088 | ? sk_SCT_num(scts) : 0; | - | ||||||||||||||||||||||||||||||||||||
5089 | int i; | - | ||||||||||||||||||||||||||||||||||||
5090 | - | |||||||||||||||||||||||||||||||||||||
5091 | for (i = 0; i < count
| 1-2 | ||||||||||||||||||||||||||||||||||||
5092 | SCT *sct = sk_SCT_value(scts, i); | - | ||||||||||||||||||||||||||||||||||||
5093 | int status = SCT_get_validation_status(sct); | - | ||||||||||||||||||||||||||||||||||||
5094 | - | |||||||||||||||||||||||||||||||||||||
5095 | if (status == SCT_VALIDATION_STATUS_VALID
| 0-2 | ||||||||||||||||||||||||||||||||||||
5096 | return executed 2 times by 1 test: 1;return 1; Executed by:
executed 2 times by 1 test: return 1; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
5097 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5098 | ERR_put_error(20,(349),(216),__FILE__,4744); | - | ||||||||||||||||||||||||||||||||||||
5099 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5100 | } | - | ||||||||||||||||||||||||||||||||||||
5101 | - | |||||||||||||||||||||||||||||||||||||
5102 | int SSL_set_ct_validation_callback(SSL *s, ssl_ct_validation_cb callback, | - | ||||||||||||||||||||||||||||||||||||
5103 | void *arg) | - | ||||||||||||||||||||||||||||||||||||
5104 | { | - | ||||||||||||||||||||||||||||||||||||
5105 | - | |||||||||||||||||||||||||||||||||||||
5106 | - | |||||||||||||||||||||||||||||||||||||
5107 | - | |||||||||||||||||||||||||||||||||||||
5108 | - | |||||||||||||||||||||||||||||||||||||
5109 | if (callback !=
| 11-8243 | ||||||||||||||||||||||||||||||||||||
5110 | ((void *)0)
| 11-8243 | ||||||||||||||||||||||||||||||||||||
5111 | && SSL_CTX_has_client_custom_ext(s->ctx,
| 0-11 | ||||||||||||||||||||||||||||||||||||
5112 | 18)
| 0-11 | ||||||||||||||||||||||||||||||||||||
5113 | { | - | ||||||||||||||||||||||||||||||||||||
5114 | ERR_put_error(20,(399),(206),__FILE__,4759) | - | ||||||||||||||||||||||||||||||||||||
5115 | ; | - | ||||||||||||||||||||||||||||||||||||
5116 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5117 | } | - | ||||||||||||||||||||||||||||||||||||
5118 | - | |||||||||||||||||||||||||||||||||||||
5119 | if (callback !=
| 11-8243 | ||||||||||||||||||||||||||||||||||||
5120 | ((void *)0)
| 11-8243 | ||||||||||||||||||||||||||||||||||||
5121 | ) { | - | ||||||||||||||||||||||||||||||||||||
5122 | - | |||||||||||||||||||||||||||||||||||||
5123 | - | |||||||||||||||||||||||||||||||||||||
5124 | - | |||||||||||||||||||||||||||||||||||||
5125 | if (!SSL_ctrl(s,65,1,
| 0-11 | ||||||||||||||||||||||||||||||||||||
5126 | ((void *)0)
| 0-11 | ||||||||||||||||||||||||||||||||||||
5127 | )
| 0-11 | ||||||||||||||||||||||||||||||||||||
5128 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5129 | } executed 11 times by 1 test: end of block Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||
5130 | - | |||||||||||||||||||||||||||||||||||||
5131 | s->ct_validation_callback = callback; | - | ||||||||||||||||||||||||||||||||||||
5132 | s->ct_validation_callback_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
5133 | - | |||||||||||||||||||||||||||||||||||||
5134 | return executed 8254 times by 2 tests: 1;return 1; Executed by:
executed 8254 times by 2 tests: return 1; Executed by:
| 8254 | ||||||||||||||||||||||||||||||||||||
5135 | } | - | ||||||||||||||||||||||||||||||||||||
5136 | - | |||||||||||||||||||||||||||||||||||||
5137 | int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
5138 | ssl_ct_validation_cb callback, void *arg) | - | ||||||||||||||||||||||||||||||||||||
5139 | { | - | ||||||||||||||||||||||||||||||||||||
5140 | - | |||||||||||||||||||||||||||||||||||||
5141 | - | |||||||||||||||||||||||||||||||||||||
5142 | - | |||||||||||||||||||||||||||||||||||||
5143 | - | |||||||||||||||||||||||||||||||||||||
5144 | if (callback !=
| 0-11 | ||||||||||||||||||||||||||||||||||||
5145 | ((void *)0)
| 0-11 | ||||||||||||||||||||||||||||||||||||
5146 | && SSL_CTX_has_client_custom_ext(ctx,
| 0-11 | ||||||||||||||||||||||||||||||||||||
5147 | 18)
| 0-11 | ||||||||||||||||||||||||||||||||||||
5148 | { | - | ||||||||||||||||||||||||||||||||||||
5149 | ERR_put_error(20,(396),(206),__FILE__,4788) | - | ||||||||||||||||||||||||||||||||||||
5150 | ; | - | ||||||||||||||||||||||||||||||||||||
5151 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5152 | } | - | ||||||||||||||||||||||||||||||||||||
5153 | - | |||||||||||||||||||||||||||||||||||||
5154 | ctx->ct_validation_callback = callback; | - | ||||||||||||||||||||||||||||||||||||
5155 | ctx->ct_validation_callback_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
5156 | return executed 11 times by 1 test: 1;return 1; Executed by:
executed 11 times by 1 test: return 1; Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||
5157 | } | - | ||||||||||||||||||||||||||||||||||||
5158 | - | |||||||||||||||||||||||||||||||||||||
5159 | int SSL_ct_is_enabled(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
5160 | { | - | ||||||||||||||||||||||||||||||||||||
5161 | return executed 120 times by 1 test: s->ct_validation_callback != return s->ct_validation_callback != ((void *)0) ; Executed by:
executed 120 times by 1 test: return s->ct_validation_callback != ((void *)0) ; Executed by:
| 120 | ||||||||||||||||||||||||||||||||||||
5162 | ((void *)0) executed 120 times by 1 test: return s->ct_validation_callback != ((void *)0) ; Executed by:
| 120 | ||||||||||||||||||||||||||||||||||||
5163 | ; executed 120 times by 1 test: return s->ct_validation_callback != ((void *)0) ; Executed by:
| 120 | ||||||||||||||||||||||||||||||||||||
5164 | } | - | ||||||||||||||||||||||||||||||||||||
5165 | - | |||||||||||||||||||||||||||||||||||||
5166 | int SSL_CTX_ct_is_enabled(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
5167 | { | - | ||||||||||||||||||||||||||||||||||||
5168 | return executed 15 times by 1 test: ctx->ct_validation_callback != return ctx->ct_validation_callback != ((void *)0) ; Executed by:
executed 15 times by 1 test: return ctx->ct_validation_callback != ((void *)0) ; Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
5169 | ((void *)0) executed 15 times by 1 test: return ctx->ct_validation_callback != ((void *)0) ; Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
5170 | ; executed 15 times by 1 test: return ctx->ct_validation_callback != ((void *)0) ; Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
5171 | } | - | ||||||||||||||||||||||||||||||||||||
5172 | - | |||||||||||||||||||||||||||||||||||||
5173 | int ssl_validate_ct(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
5174 | { | - | ||||||||||||||||||||||||||||||||||||
5175 | int ret = 0; | - | ||||||||||||||||||||||||||||||||||||
5176 | X509 *cert = s->session !=
| 0-11 | ||||||||||||||||||||||||||||||||||||
5177 | ((void *)0)
| 0-11 | ||||||||||||||||||||||||||||||||||||
5178 | ? s->session->peer : | - | ||||||||||||||||||||||||||||||||||||
5179 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5180 | ; | - | ||||||||||||||||||||||||||||||||||||
5181 | X509 *issuer; | - | ||||||||||||||||||||||||||||||||||||
5182 | SSL_DANE *dane = &s->dane; | - | ||||||||||||||||||||||||||||||||||||
5183 | CT_POLICY_EVAL_CTX *ctx = | - | ||||||||||||||||||||||||||||||||||||
5184 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5185 | ; | - | ||||||||||||||||||||||||||||||||||||
5186 | const struct stack_st_SCT *scts; | - | ||||||||||||||||||||||||||||||||||||
5187 | if (s->ct_validation_callback ==
| 0-11 | ||||||||||||||||||||||||||||||||||||
5188 | ((void *)0)
| 0-11 | ||||||||||||||||||||||||||||||||||||
5189 | || cert ==
| 0-11 | ||||||||||||||||||||||||||||||||||||
5190 | ((void *)0)
| 0-11 | ||||||||||||||||||||||||||||||||||||
5191 | || | - | ||||||||||||||||||||||||||||||||||||
5192 | s->verify_result != 0
| 3-8 | ||||||||||||||||||||||||||||||||||||
5193 | s->verified_chain ==
| 2-6 | ||||||||||||||||||||||||||||||||||||
5194 | ((void *)0)
| 2-6 | ||||||||||||||||||||||||||||||||||||
5195 | || sk_X509_num(s->verified_chain) <= 1
| 0-6 | ||||||||||||||||||||||||||||||||||||
5196 | return executed 5 times by 1 test: 1;return 1; Executed by:
executed 5 times by 1 test: return 1; Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
5197 | - | |||||||||||||||||||||||||||||||||||||
5198 | - | |||||||||||||||||||||||||||||||||||||
5199 | - | |||||||||||||||||||||||||||||||||||||
5200 | - | |||||||||||||||||||||||||||||||||||||
5201 | - | |||||||||||||||||||||||||||||||||||||
5202 | if (((
| 0-6 | ||||||||||||||||||||||||||||||||||||
5203 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||||||||||||||
5204 | && sk_danetls_record_num((dane)->trecs) > 0
| 0-6 | ||||||||||||||||||||||||||||||||||||
5205 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
5206 | ) { | - | ||||||||||||||||||||||||||||||||||||
5207 | switch (dane->mtlsa->usage) { | - | ||||||||||||||||||||||||||||||||||||
5208 | case never executed: 2:case 2: never executed: case 2: | 0 | ||||||||||||||||||||||||||||||||||||
5209 | case never executed: 3:case 3: never executed: case 3: | 0 | ||||||||||||||||||||||||||||||||||||
5210 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
5211 | } | - | ||||||||||||||||||||||||||||||||||||
5212 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5213 | - | |||||||||||||||||||||||||||||||||||||
5214 | ctx = CT_POLICY_EVAL_CTX_new(); | - | ||||||||||||||||||||||||||||||||||||
5215 | if (ctx ==
| 0-6 | ||||||||||||||||||||||||||||||||||||
5216 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||||||||||||||
5217 | ) { | - | ||||||||||||||||||||||||||||||||||||
5218 | ossl_statem_fatal((s), (80), (400), ((1|64)), | - | ||||||||||||||||||||||||||||||||||||
5219 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
5220 | , | - | ||||||||||||||||||||||||||||||||||||
5221 | 4847 | - | ||||||||||||||||||||||||||||||||||||
5222 | ) | - | ||||||||||||||||||||||||||||||||||||
5223 | ; | - | ||||||||||||||||||||||||||||||||||||
5224 | goto never executed: end;goto end; never executed: goto end; | 0 | ||||||||||||||||||||||||||||||||||||
5225 | } | - | ||||||||||||||||||||||||||||||||||||
5226 | - | |||||||||||||||||||||||||||||||||||||
5227 | issuer = sk_X509_value(s->verified_chain, 1); | - | ||||||||||||||||||||||||||||||||||||
5228 | CT_POLICY_EVAL_CTX_set1_cert(ctx, cert); | - | ||||||||||||||||||||||||||||||||||||
5229 | CT_POLICY_EVAL_CTX_set1_issuer(ctx, issuer); | - | ||||||||||||||||||||||||||||||||||||
5230 | CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(ctx, s->ctx->ctlog_store); | - | ||||||||||||||||||||||||||||||||||||
5231 | CT_POLICY_EVAL_CTX_set_time( | - | ||||||||||||||||||||||||||||||||||||
5232 | ctx, (uint64_t)SSL_SESSION_get_time(SSL_get_session(s)) * 1000); | - | ||||||||||||||||||||||||||||||||||||
5233 | - | |||||||||||||||||||||||||||||||||||||
5234 | scts = SSL_get0_peer_scts(s); | - | ||||||||||||||||||||||||||||||||||||
5235 | if (SCT_LIST_validate(scts, ctx) < 0
| 0-6 | ||||||||||||||||||||||||||||||||||||
5236 | ossl_statem_fatal((s), (40), (400), (208), | - | ||||||||||||||||||||||||||||||||||||
5237 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
5238 | , | - | ||||||||||||||||||||||||||||||||||||
5239 | 4876 | - | ||||||||||||||||||||||||||||||||||||
5240 | ) | - | ||||||||||||||||||||||||||||||||||||
5241 | ; | - | ||||||||||||||||||||||||||||||||||||
5242 | goto never executed: end;goto end; never executed: goto end; | 0 | ||||||||||||||||||||||||||||||||||||
5243 | } | - | ||||||||||||||||||||||||||||||||||||
5244 | - | |||||||||||||||||||||||||||||||||||||
5245 | ret = s->ct_validation_callback(ctx, scts, s->ct_validation_callback_arg); | - | ||||||||||||||||||||||||||||||||||||
5246 | if (ret < 0
| 0-6 | ||||||||||||||||||||||||||||||||||||
5247 | ret = 0; never executed: ret = 0; | 0 | ||||||||||||||||||||||||||||||||||||
5248 | if (!ret
| 1-5 | ||||||||||||||||||||||||||||||||||||
5249 | ossl_statem_fatal((s), (40), (400), (234), executed 1 time by 1 test: ossl_statem_fatal((s), (40), (400), (234), __FILE__ , 4885 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5250 | __FILE__ executed 1 time by 1 test: ossl_statem_fatal((s), (40), (400), (234), __FILE__ , 4885 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5251 | , executed 1 time by 1 test: ossl_statem_fatal((s), (40), (400), (234), __FILE__ , 4885 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5252 | 4885 executed 1 time by 1 test: ossl_statem_fatal((s), (40), (400), (234), __FILE__ , 4885 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5253 | ) executed 1 time by 1 test: ossl_statem_fatal((s), (40), (400), (234), __FILE__ , 4885 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5254 | ; executed 1 time by 1 test: ossl_statem_fatal((s), (40), (400), (234), __FILE__ , 4885 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5255 | - | |||||||||||||||||||||||||||||||||||||
5256 | end: code before this statement executed 6 times by 1 test: end: Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
5257 | CT_POLICY_EVAL_CTX_free(ctx); | - | ||||||||||||||||||||||||||||||||||||
5258 | if (ret <= 0
| 1-5 | ||||||||||||||||||||||||||||||||||||
5259 | s->verify_result = 71; executed 1 time by 1 test: s->verify_result = 71; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5260 | return executed 6 times by 1 test: ret;return ret; Executed by:
executed 6 times by 1 test: return ret; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
5261 | } | - | ||||||||||||||||||||||||||||||||||||
5262 | - | |||||||||||||||||||||||||||||||||||||
5263 | int SSL_CTX_enable_ct(SSL_CTX *ctx, int validation_mode) | - | ||||||||||||||||||||||||||||||||||||
5264 | { | - | ||||||||||||||||||||||||||||||||||||
5265 | switch (validation_mode) { | - | ||||||||||||||||||||||||||||||||||||
5266 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
5267 | ERR_put_error(20,(398),(212),__FILE__,4913); | - | ||||||||||||||||||||||||||||||||||||
5268 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5269 | case executed 7 times by 1 test: SSL_CT_VALIDATION_PERMISSIVE:case SSL_CT_VALIDATION_PERMISSIVE: Executed by:
executed 7 times by 1 test: case SSL_CT_VALIDATION_PERMISSIVE: Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||
5270 | return executed 7 times by 1 test: SSL_CTX_set_ct_validation_callback(ctx, ct_permissive, return SSL_CTX_set_ct_validation_callback(ctx, ct_permissive, ((void *)0) ); Executed by:
executed 7 times by 1 test: return SSL_CTX_set_ct_validation_callback(ctx, ct_permissive, ((void *)0) ); Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||
5271 | ((void *)0) executed 7 times by 1 test: return SSL_CTX_set_ct_validation_callback(ctx, ct_permissive, ((void *)0) ); Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||
5272 | ); executed 7 times by 1 test: return SSL_CTX_set_ct_validation_callback(ctx, ct_permissive, ((void *)0) ); Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||
5273 | case executed 4 times by 1 test: SSL_CT_VALIDATION_STRICT:case SSL_CT_VALIDATION_STRICT: Executed by:
executed 4 times by 1 test: case SSL_CT_VALIDATION_STRICT: Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
5274 | return executed 4 times by 1 test: SSL_CTX_set_ct_validation_callback(ctx, ct_strict, return SSL_CTX_set_ct_validation_callback(ctx, ct_strict, ((void *)0) ); Executed by:
executed 4 times by 1 test: return SSL_CTX_set_ct_validation_callback(ctx, ct_strict, ((void *)0) ); Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
5275 | ((void *)0) executed 4 times by 1 test: return SSL_CTX_set_ct_validation_callback(ctx, ct_strict, ((void *)0) ); Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
5276 | ); executed 4 times by 1 test: return SSL_CTX_set_ct_validation_callback(ctx, ct_strict, ((void *)0) ); Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
5277 | } | - | ||||||||||||||||||||||||||||||||||||
5278 | } | - | ||||||||||||||||||||||||||||||||||||
5279 | - | |||||||||||||||||||||||||||||||||||||
5280 | int SSL_enable_ct(SSL *s, int validation_mode) | - | ||||||||||||||||||||||||||||||||||||
5281 | { | - | ||||||||||||||||||||||||||||||||||||
5282 | switch (validation_mode) { | - | ||||||||||||||||||||||||||||||||||||
5283 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
5284 | ERR_put_error(20,(402),(212),__FILE__,4926); | - | ||||||||||||||||||||||||||||||||||||
5285 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5286 | case never executed: SSL_CT_VALIDATION_PERMISSIVE:case SSL_CT_VALIDATION_PERMISSIVE: never executed: case SSL_CT_VALIDATION_PERMISSIVE: | 0 | ||||||||||||||||||||||||||||||||||||
5287 | return never executed: SSL_set_ct_validation_callback(s, ct_permissive, return SSL_set_ct_validation_callback(s, ct_permissive, ((void *)0) ); never executed: return SSL_set_ct_validation_callback(s, ct_permissive, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
5288 | ((void *)0) never executed: return SSL_set_ct_validation_callback(s, ct_permissive, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
5289 | ); never executed: return SSL_set_ct_validation_callback(s, ct_permissive, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
5290 | case never executed: SSL_CT_VALIDATION_STRICT:case SSL_CT_VALIDATION_STRICT: never executed: case SSL_CT_VALIDATION_STRICT: | 0 | ||||||||||||||||||||||||||||||||||||
5291 | return never executed: SSL_set_ct_validation_callback(s, ct_strict, return SSL_set_ct_validation_callback(s, ct_strict, ((void *)0) ); never executed: return SSL_set_ct_validation_callback(s, ct_strict, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
5292 | ((void *)0) never executed: return SSL_set_ct_validation_callback(s, ct_strict, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
5293 | ); never executed: return SSL_set_ct_validation_callback(s, ct_strict, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
5294 | } | - | ||||||||||||||||||||||||||||||||||||
5295 | } | - | ||||||||||||||||||||||||||||||||||||
5296 | - | |||||||||||||||||||||||||||||||||||||
5297 | int SSL_CTX_set_default_ctlog_list_file(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
5298 | { | - | ||||||||||||||||||||||||||||||||||||
5299 | return executed 1758 times by 1 test: CTLOG_STORE_load_default_file(ctx->ctlog_store);return CTLOG_STORE_load_default_file(ctx->ctlog_store); Executed by:
executed 1758 times by 1 test: return CTLOG_STORE_load_default_file(ctx->ctlog_store); Executed by:
| 1758 | ||||||||||||||||||||||||||||||||||||
5300 | } | - | ||||||||||||||||||||||||||||||||||||
5301 | - | |||||||||||||||||||||||||||||||||||||
5302 | int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path) | - | ||||||||||||||||||||||||||||||||||||
5303 | { | - | ||||||||||||||||||||||||||||||||||||
5304 | return never executed: CTLOG_STORE_load_file(ctx->ctlog_store, path);return CTLOG_STORE_load_file(ctx->ctlog_store, path); never executed: return CTLOG_STORE_load_file(ctx->ctlog_store, path); | 0 | ||||||||||||||||||||||||||||||||||||
5305 | } | - | ||||||||||||||||||||||||||||||||||||
5306 | - | |||||||||||||||||||||||||||||||||||||
5307 | void SSL_CTX_set0_ctlog_store(SSL_CTX *ctx, CTLOG_STORE * logs) | - | ||||||||||||||||||||||||||||||||||||
5308 | { | - | ||||||||||||||||||||||||||||||||||||
5309 | CTLOG_STORE_free(ctx->ctlog_store); | - | ||||||||||||||||||||||||||||||||||||
5310 | ctx->ctlog_store = logs; | - | ||||||||||||||||||||||||||||||||||||
5311 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
5312 | - | |||||||||||||||||||||||||||||||||||||
5313 | const CTLOG_STORE *SSL_CTX_get0_ctlog_store(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
5314 | { | - | ||||||||||||||||||||||||||||||||||||
5315 | return executed 1 time by 1 test: ctx->ctlog_store;return ctx->ctlog_store; Executed by:
executed 1 time by 1 test: return ctx->ctlog_store; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5316 | } | - | ||||||||||||||||||||||||||||||||||||
5317 | - | |||||||||||||||||||||||||||||||||||||
5318 | - | |||||||||||||||||||||||||||||||||||||
5319 | - | |||||||||||||||||||||||||||||||||||||
5320 | void SSL_CTX_set_client_hello_cb(SSL_CTX *c, SSL_client_hello_cb_fn cb, | - | ||||||||||||||||||||||||||||||||||||
5321 | void *arg) | - | ||||||||||||||||||||||||||||||||||||
5322 | { | - | ||||||||||||||||||||||||||||||||||||
5323 | c->client_hello_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
5324 | c->client_hello_cb_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
5325 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
5326 | - | |||||||||||||||||||||||||||||||||||||
5327 | int SSL_client_hello_isv2(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
5328 | { | - | ||||||||||||||||||||||||||||||||||||
5329 | if (s->clienthello ==
| 0 | ||||||||||||||||||||||||||||||||||||
5330 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
5331 | ) | - | ||||||||||||||||||||||||||||||||||||
5332 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5333 | return never executed: s->clienthello->isv2;return s->clienthello->isv2; never executed: return s->clienthello->isv2; | 0 | ||||||||||||||||||||||||||||||||||||
5334 | } | - | ||||||||||||||||||||||||||||||||||||
5335 | - | |||||||||||||||||||||||||||||||||||||
5336 | unsigned int SSL_client_hello_get0_legacy_version(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
5337 | { | - | ||||||||||||||||||||||||||||||||||||
5338 | if (s->clienthello ==
| 0-1 | ||||||||||||||||||||||||||||||||||||
5339 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
5340 | ) | - | ||||||||||||||||||||||||||||||||||||
5341 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5342 | return executed 1 time by 1 test: s->clienthello->legacy_version;return s->clienthello->legacy_version; Executed by:
executed 1 time by 1 test: return s->clienthello->legacy_version; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5343 | } | - | ||||||||||||||||||||||||||||||||||||
5344 | - | |||||||||||||||||||||||||||||||||||||
5345 | size_t SSL_client_hello_get0_random(SSL *s, const unsigned char **out) | - | ||||||||||||||||||||||||||||||||||||
5346 | { | - | ||||||||||||||||||||||||||||||||||||
5347 | if (s->clienthello ==
| 0-1 | ||||||||||||||||||||||||||||||||||||
5348 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
5349 | ) | - | ||||||||||||||||||||||||||||||||||||
5350 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5351 | if (out !=
| 0-1 | ||||||||||||||||||||||||||||||||||||
5352 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
5353 | ) | - | ||||||||||||||||||||||||||||||||||||
5354 | * executed 1 time by 1 test: out = s->clienthello->random;*out = s->clienthello->random; Executed by:
executed 1 time by 1 test: *out = s->clienthello->random; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5355 | return executed 1 time by 1 test: 32;return 32; Executed by:
executed 1 time by 1 test: return 32; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5356 | } | - | ||||||||||||||||||||||||||||||||||||
5357 | - | |||||||||||||||||||||||||||||||||||||
5358 | size_t SSL_client_hello_get0_session_id(SSL *s, const unsigned char **out) | - | ||||||||||||||||||||||||||||||||||||
5359 | { | - | ||||||||||||||||||||||||||||||||||||
5360 | if (s->clienthello ==
| 0-1 | ||||||||||||||||||||||||||||||||||||
5361 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
5362 | ) | - | ||||||||||||||||||||||||||||||||||||
5363 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5364 | if (out !=
| 0-1 | ||||||||||||||||||||||||||||||||||||
5365 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
5366 | ) | - | ||||||||||||||||||||||||||||||||||||
5367 | * executed 1 time by 1 test: out = s->clienthello->session_id;*out = s->clienthello->session_id; Executed by:
executed 1 time by 1 test: *out = s->clienthello->session_id; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5368 | return executed 1 time by 1 test: s->clienthello->session_id_len;return s->clienthello->session_id_len; Executed by:
executed 1 time by 1 test: return s->clienthello->session_id_len; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5369 | } | - | ||||||||||||||||||||||||||||||||||||
5370 | - | |||||||||||||||||||||||||||||||||||||
5371 | size_t SSL_client_hello_get0_ciphers(SSL *s, const unsigned char **out) | - | ||||||||||||||||||||||||||||||||||||
5372 | { | - | ||||||||||||||||||||||||||||||||||||
5373 | if (s->clienthello ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
5374 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
5375 | ) | - | ||||||||||||||||||||||||||||||||||||
5376 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5377 | if (out !=
| 0-2 | ||||||||||||||||||||||||||||||||||||
5378 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
5379 | ) | - | ||||||||||||||||||||||||||||||||||||
5380 | * executed 2 times by 1 test: out = PACKET_data(&s->clienthello->ciphersuites);*out = PACKET_data(&s->clienthello->ciphersuites); Executed by:
executed 2 times by 1 test: *out = PACKET_data(&s->clienthello->ciphersuites); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
5381 | return executed 2 times by 1 test: PACKET_remaining(&s->clienthello->ciphersuites);return PACKET_remaining(&s->clienthello->ciphersuites); Executed by:
executed 2 times by 1 test: return PACKET_remaining(&s->clienthello->ciphersuites); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
5382 | } | - | ||||||||||||||||||||||||||||||||||||
5383 | - | |||||||||||||||||||||||||||||||||||||
5384 | size_t SSL_client_hello_get0_compression_methods(SSL *s, const unsigned char **out) | - | ||||||||||||||||||||||||||||||||||||
5385 | { | - | ||||||||||||||||||||||||||||||||||||
5386 | if (s->clienthello ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
5387 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
5388 | ) | - | ||||||||||||||||||||||||||||||||||||
5389 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5390 | if (out !=
| 0-2 | ||||||||||||||||||||||||||||||||||||
5391 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
5392 | ) | - | ||||||||||||||||||||||||||||||||||||
5393 | * executed 2 times by 1 test: out = s->clienthello->compressions;*out = s->clienthello->compressions; Executed by:
executed 2 times by 1 test: *out = s->clienthello->compressions; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
5394 | return executed 2 times by 1 test: s->clienthello->compressions_len;return s->clienthello->compressions_len; Executed by:
executed 2 times by 1 test: return s->clienthello->compressions_len; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
5395 | } | - | ||||||||||||||||||||||||||||||||||||
5396 | - | |||||||||||||||||||||||||||||||||||||
5397 | int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen) | - | ||||||||||||||||||||||||||||||||||||
5398 | { | - | ||||||||||||||||||||||||||||||||||||
5399 | RAW_EXTENSION *ext; | - | ||||||||||||||||||||||||||||||||||||
5400 | int *present; | - | ||||||||||||||||||||||||||||||||||||
5401 | size_t num = 0, i; | - | ||||||||||||||||||||||||||||||||||||
5402 | - | |||||||||||||||||||||||||||||||||||||
5403 | if (s->clienthello ==
| 0-1 | ||||||||||||||||||||||||||||||||||||
5404 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
5405 | || out ==
| 0-1 | ||||||||||||||||||||||||||||||||||||
5406 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
5407 | || outlen ==
| 0-1 | ||||||||||||||||||||||||||||||||||||
5408 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
5409 | ) | - | ||||||||||||||||||||||||||||||||||||
5410 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5411 | for (i = 0; i < s->clienthello->pre_proc_exts_len
| 1-26 | ||||||||||||||||||||||||||||||||||||
5412 | ext = s->clienthello->pre_proc_exts + i; | - | ||||||||||||||||||||||||||||||||||||
5413 | if (ext->present
| 6-20 | ||||||||||||||||||||||||||||||||||||
5414 | num++; executed 6 times by 1 test: num++; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
5415 | } executed 26 times by 1 test: end of block Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||
5416 | if ((
| 0-1 | ||||||||||||||||||||||||||||||||||||
5417 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
5418 | ) { | - | ||||||||||||||||||||||||||||||||||||
5419 | ERR_put_error(20,(627),((1|64)),__FILE__,5030) | - | ||||||||||||||||||||||||||||||||||||
5420 | ; | - | ||||||||||||||||||||||||||||||||||||
5421 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5422 | } | - | ||||||||||||||||||||||||||||||||||||
5423 | for (i = 0; i < s->clienthello->pre_proc_exts_len
| 1-26 | ||||||||||||||||||||||||||||||||||||
5424 | ext = s->clienthello->pre_proc_exts + i; | - | ||||||||||||||||||||||||||||||||||||
5425 | if (ext->present
| 6-20 | ||||||||||||||||||||||||||||||||||||
5426 | if (ext->received_order >= num
| 0-6 | ||||||||||||||||||||||||||||||||||||
5427 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
5428 | present[ext->received_order] = ext->type; | - | ||||||||||||||||||||||||||||||||||||
5429 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
5430 | } executed 26 times by 1 test: end of block Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||
5431 | *out = present; | - | ||||||||||||||||||||||||||||||||||||
5432 | *outlen = num; | - | ||||||||||||||||||||||||||||||||||||
5433 | return executed 1 time by 1 test: 1;return 1; Executed by:
executed 1 time by 1 test: return 1; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5434 | err: | - | ||||||||||||||||||||||||||||||||||||
5435 | CRYPTO_free(present, __FILE__, 5045); | - | ||||||||||||||||||||||||||||||||||||
5436 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5437 | } | - | ||||||||||||||||||||||||||||||||||||
5438 | - | |||||||||||||||||||||||||||||||||||||
5439 | int SSL_client_hello_get0_ext(SSL *s, unsigned int type, const unsigned char **out, | - | ||||||||||||||||||||||||||||||||||||
5440 | size_t *outlen) | - | ||||||||||||||||||||||||||||||||||||
5441 | { | - | ||||||||||||||||||||||||||||||||||||
5442 | size_t i; | - | ||||||||||||||||||||||||||||||||||||
5443 | RAW_EXTENSION *r; | - | ||||||||||||||||||||||||||||||||||||
5444 | - | |||||||||||||||||||||||||||||||||||||
5445 | if (s->clienthello ==
| 0-3 | ||||||||||||||||||||||||||||||||||||
5446 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
5447 | ) | - | ||||||||||||||||||||||||||||||||||||
5448 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5449 | for (i = 0; i < s->clienthello->pre_proc_exts_len
| 0-6 | ||||||||||||||||||||||||||||||||||||
5450 | r = s->clienthello->pre_proc_exts + i; | - | ||||||||||||||||||||||||||||||||||||
5451 | if (r->present
| 0-3 | ||||||||||||||||||||||||||||||||||||
5452 | if (out !=
| 0-3 | ||||||||||||||||||||||||||||||||||||
5453 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
5454 | ) | - | ||||||||||||||||||||||||||||||||||||
5455 | * executed 3 times by 1 test: out = PACKET_data(&r->data);*out = PACKET_data(&r->data); Executed by:
executed 3 times by 1 test: *out = PACKET_data(&r->data); Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
5456 | if (outlen !=
| 0-3 | ||||||||||||||||||||||||||||||||||||
5457 | ((void *)0)
| 0-3 | ||||||||||||||||||||||||||||||||||||
5458 | ) | - | ||||||||||||||||||||||||||||||||||||
5459 | * executed 3 times by 1 test: outlen = PACKET_remaining(&r->data);*outlen = PACKET_remaining(&r->data); Executed by:
executed 3 times by 1 test: *outlen = PACKET_remaining(&r->data); Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
5460 | return executed 3 times by 1 test: 1;return 1; Executed by:
executed 3 times by 1 test: return 1; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
5461 | } | - | ||||||||||||||||||||||||||||||||||||
5462 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
5463 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5464 | } | - | ||||||||||||||||||||||||||||||||||||
5465 | - | |||||||||||||||||||||||||||||||||||||
5466 | int SSL_free_buffers(SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
5467 | { | - | ||||||||||||||||||||||||||||||||||||
5468 | RECORD_LAYER *rl = &ssl->rlayer; | - | ||||||||||||||||||||||||||||||||||||
5469 | - | |||||||||||||||||||||||||||||||||||||
5470 | if (RECORD_LAYER_read_pending(rl)
| 0-42 | ||||||||||||||||||||||||||||||||||||
5471 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5472 | - | |||||||||||||||||||||||||||||||||||||
5473 | RECORD_LAYER_release(rl); | - | ||||||||||||||||||||||||||||||||||||
5474 | return executed 42 times by 1 test: 1;return 1; Executed by:
executed 42 times by 1 test: return 1; Executed by:
| 42 | ||||||||||||||||||||||||||||||||||||
5475 | } | - | ||||||||||||||||||||||||||||||||||||
5476 | - | |||||||||||||||||||||||||||||||||||||
5477 | int SSL_alloc_buffers(SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
5478 | { | - | ||||||||||||||||||||||||||||||||||||
5479 | return executed 30 times by 1 test: ssl3_setup_buffers(ssl);return ssl3_setup_buffers(ssl); Executed by:
executed 30 times by 1 test: return ssl3_setup_buffers(ssl); Executed by:
| 30 | ||||||||||||||||||||||||||||||||||||
5480 | } | - | ||||||||||||||||||||||||||||||||||||
5481 | - | |||||||||||||||||||||||||||||||||||||
5482 | void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb) | - | ||||||||||||||||||||||||||||||||||||
5483 | { | - | ||||||||||||||||||||||||||||||||||||
5484 | ctx->keylog_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
5485 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
5486 | - | |||||||||||||||||||||||||||||||||||||
5487 | SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
5488 | { | - | ||||||||||||||||||||||||||||||||||||
5489 | return executed 8 times by 1 test: ctx->keylog_callback;return ctx->keylog_callback; Executed by:
executed 8 times by 1 test: return ctx->keylog_callback; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
5490 | } | - | ||||||||||||||||||||||||||||||||||||
5491 | - | |||||||||||||||||||||||||||||||||||||
5492 | static int nss_keylog_int(const char *prefix, | - | ||||||||||||||||||||||||||||||||||||
5493 | SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
5494 | const uint8_t *parameter_1, | - | ||||||||||||||||||||||||||||||||||||
5495 | size_t parameter_1_len, | - | ||||||||||||||||||||||||||||||||||||
5496 | const uint8_t *parameter_2, | - | ||||||||||||||||||||||||||||||||||||
5497 | size_t parameter_2_len) | - | ||||||||||||||||||||||||||||||||||||
5498 | { | - | ||||||||||||||||||||||||||||||||||||
5499 | char *out = | - | ||||||||||||||||||||||||||||||||||||
5500 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5501 | ; | - | ||||||||||||||||||||||||||||||||||||
5502 | char *cursor = | - | ||||||||||||||||||||||||||||||||||||
5503 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5504 | ; | - | ||||||||||||||||||||||||||||||||||||
5505 | size_t out_len = 0; | - | ||||||||||||||||||||||||||||||||||||
5506 | size_t i; | - | ||||||||||||||||||||||||||||||||||||
5507 | size_t prefix_len; | - | ||||||||||||||||||||||||||||||||||||
5508 | - | |||||||||||||||||||||||||||||||||||||
5509 | if (ssl->ctx->keylog_callback ==
| 27-9950 | ||||||||||||||||||||||||||||||||||||
5510 | ((void *)0)
| 27-9950 | ||||||||||||||||||||||||||||||||||||
5511 | ) return executed 9950 times by 1 test: 1;return 1; Executed by:
executed 9950 times by 1 test: return 1; Executed by:
| 9950 | ||||||||||||||||||||||||||||||||||||
5512 | prefix_len = strlen(prefix); | - | ||||||||||||||||||||||||||||||||||||
5513 | out_len = prefix_len + (2*parameter_1_len) + (2*parameter_2_len) + 3; | - | ||||||||||||||||||||||||||||||||||||
5514 | if ((
| 0-27 | ||||||||||||||||||||||||||||||||||||
5515 | ((void *)0)
| 0-27 | ||||||||||||||||||||||||||||||||||||
5516 | ) { | - | ||||||||||||||||||||||||||||||||||||
5517 | ossl_statem_fatal((ssl), (80), (500), ((1|64)), | - | ||||||||||||||||||||||||||||||||||||
5518 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
5519 | , | - | ||||||||||||||||||||||||||||||||||||
5520 | 5123 | - | ||||||||||||||||||||||||||||||||||||
5521 | ) | - | ||||||||||||||||||||||||||||||||||||
5522 | ; | - | ||||||||||||||||||||||||||||||||||||
5523 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5524 | } | - | ||||||||||||||||||||||||||||||||||||
5525 | - | |||||||||||||||||||||||||||||||||||||
5526 | strcpy(cursor, prefix); | - | ||||||||||||||||||||||||||||||||||||
5527 | cursor += prefix_len; | - | ||||||||||||||||||||||||||||||||||||
5528 | *cursor++ = ' '; | - | ||||||||||||||||||||||||||||||||||||
5529 | - | |||||||||||||||||||||||||||||||||||||
5530 | for (i = 0; i < parameter_1_len
| 27-840 | ||||||||||||||||||||||||||||||||||||
5531 | sprintf(cursor, "%02x", parameter_1[i]); | - | ||||||||||||||||||||||||||||||||||||
5532 | cursor += 2; | - | ||||||||||||||||||||||||||||||||||||
5533 | } executed 840 times by 1 test: end of block Executed by:
| 840 | ||||||||||||||||||||||||||||||||||||
5534 | *cursor++ = ' '; | - | ||||||||||||||||||||||||||||||||||||
5535 | - | |||||||||||||||||||||||||||||||||||||
5536 | for (i = 0; i < parameter_2_len
| 27-1296 | ||||||||||||||||||||||||||||||||||||
5537 | sprintf(cursor, "%02x", parameter_2[i]); | - | ||||||||||||||||||||||||||||||||||||
5538 | cursor += 2; | - | ||||||||||||||||||||||||||||||||||||
5539 | } executed 1296 times by 1 test: end of block Executed by:
| 1296 | ||||||||||||||||||||||||||||||||||||
5540 | *cursor = '\0'; | - | ||||||||||||||||||||||||||||||||||||
5541 | - | |||||||||||||||||||||||||||||||||||||
5542 | ssl->ctx->keylog_callback(ssl, (const char *)out); | - | ||||||||||||||||||||||||||||||||||||
5543 | CRYPTO_free(out, __FILE__, 5144); | - | ||||||||||||||||||||||||||||||||||||
5544 | return executed 27 times by 1 test: 1;return 1; Executed by:
executed 27 times by 1 test: return 1; Executed by:
| 27 | ||||||||||||||||||||||||||||||||||||
5545 | - | |||||||||||||||||||||||||||||||||||||
5546 | } | - | ||||||||||||||||||||||||||||||||||||
5547 | - | |||||||||||||||||||||||||||||||||||||
5548 | int ssl_log_rsa_client_key_exchange(SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
5549 | const uint8_t *encrypted_premaster, | - | ||||||||||||||||||||||||||||||||||||
5550 | size_t encrypted_premaster_len, | - | ||||||||||||||||||||||||||||||||||||
5551 | const uint8_t *premaster, | - | ||||||||||||||||||||||||||||||||||||
5552 | size_t premaster_len) | - | ||||||||||||||||||||||||||||||||||||
5553 | { | - | ||||||||||||||||||||||||||||||||||||
5554 | if (encrypted_premaster_len < 8
| 0-424 | ||||||||||||||||||||||||||||||||||||
5555 | ossl_statem_fatal((ssl), (80), (499), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||
5556 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
5557 | , | - | ||||||||||||||||||||||||||||||||||||
5558 | 5157 | - | ||||||||||||||||||||||||||||||||||||
5559 | ) | - | ||||||||||||||||||||||||||||||||||||
5560 | ; | - | ||||||||||||||||||||||||||||||||||||
5561 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5562 | } | - | ||||||||||||||||||||||||||||||||||||
5563 | - | |||||||||||||||||||||||||||||||||||||
5564 | - | |||||||||||||||||||||||||||||||||||||
5565 | return executed 424 times by 1 test: nss_keylog_int("RSA",return nss_keylog_int("RSA", ssl, encrypted_premaster, 8, premaster, premaster_len); Executed by:
executed 424 times by 1 test: return nss_keylog_int("RSA", ssl, encrypted_premaster, 8, premaster, premaster_len); Executed by:
| 424 | ||||||||||||||||||||||||||||||||||||
5566 | ssl, executed 424 times by 1 test: return nss_keylog_int("RSA", ssl, encrypted_premaster, 8, premaster, premaster_len); Executed by:
| 424 | ||||||||||||||||||||||||||||||||||||
5567 | encrypted_premaster, executed 424 times by 1 test: return nss_keylog_int("RSA", ssl, encrypted_premaster, 8, premaster, premaster_len); Executed by:
| 424 | ||||||||||||||||||||||||||||||||||||
5568 | 8, executed 424 times by 1 test: return nss_keylog_int("RSA", ssl, encrypted_premaster, 8, premaster, premaster_len); Executed by:
| 424 | ||||||||||||||||||||||||||||||||||||
5569 | premaster, executed 424 times by 1 test: return nss_keylog_int("RSA", ssl, encrypted_premaster, 8, premaster, premaster_len); Executed by:
| 424 | ||||||||||||||||||||||||||||||||||||
5570 | premaster_len); executed 424 times by 1 test: return nss_keylog_int("RSA", ssl, encrypted_premaster, 8, premaster, premaster_len); Executed by:
| 424 | ||||||||||||||||||||||||||||||||||||
5571 | } | - | ||||||||||||||||||||||||||||||||||||
5572 | - | |||||||||||||||||||||||||||||||||||||
5573 | int ssl_log_secret(SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
5574 | const char *label, | - | ||||||||||||||||||||||||||||||||||||
5575 | const uint8_t *secret, | - | ||||||||||||||||||||||||||||||||||||
5576 | size_t secret_len) | - | ||||||||||||||||||||||||||||||||||||
5577 | { | - | ||||||||||||||||||||||||||||||||||||
5578 | return executed 9553 times by 1 test: nss_keylog_int(label,return nss_keylog_int(label, ssl, ssl->s3->client_random, 32, secret, secret_len); Executed by:
executed 9553 times by 1 test: return nss_keylog_int(label, ssl, ssl->s3->client_random, 32, secret, secret_len); Executed by:
| 9553 | ||||||||||||||||||||||||||||||||||||
5579 | ssl, executed 9553 times by 1 test: return nss_keylog_int(label, ssl, ssl->s3->client_random, 32, secret, secret_len); Executed by:
| 9553 | ||||||||||||||||||||||||||||||||||||
5580 | ssl->s3->client_random, executed 9553 times by 1 test: return nss_keylog_int(label, ssl, ssl->s3->client_random, 32, secret, secret_len); Executed by:
| 9553 | ||||||||||||||||||||||||||||||||||||
5581 | 32, executed 9553 times by 1 test: return nss_keylog_int(label, ssl, ssl->s3->client_random, 32, secret, secret_len); Executed by:
| 9553 | ||||||||||||||||||||||||||||||||||||
5582 | secret, executed 9553 times by 1 test: return nss_keylog_int(label, ssl, ssl->s3->client_random, 32, secret, secret_len); Executed by:
| 9553 | ||||||||||||||||||||||||||||||||||||
5583 | secret_len); executed 9553 times by 1 test: return nss_keylog_int(label, ssl, ssl->s3->client_random, 32, secret, secret_len); Executed by:
| 9553 | ||||||||||||||||||||||||||||||||||||
5584 | } | - | ||||||||||||||||||||||||||||||||||||
5585 | - | |||||||||||||||||||||||||||||||||||||
5586 | - | |||||||||||||||||||||||||||||||||||||
5587 | - | |||||||||||||||||||||||||||||||||||||
5588 | int ssl_cache_cipherlist(SSL *s, PACKET *cipher_suites, int sslv2format) | - | ||||||||||||||||||||||||||||||||||||
5589 | { | - | ||||||||||||||||||||||||||||||||||||
5590 | int n; | - | ||||||||||||||||||||||||||||||||||||
5591 | - | |||||||||||||||||||||||||||||||||||||
5592 | n = sslv2format
| 53-3077 | ||||||||||||||||||||||||||||||||||||
5593 | - | |||||||||||||||||||||||||||||||||||||
5594 | if (PACKET_remaining(cipher_suites) == 0
| 0-3130 | ||||||||||||||||||||||||||||||||||||
5595 | ossl_statem_fatal((s), (47), (520), (183), | - | ||||||||||||||||||||||||||||||||||||
5596 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
5597 | , | - | ||||||||||||||||||||||||||||||||||||
5598 | 5193 | - | ||||||||||||||||||||||||||||||||||||
5599 | ) | - | ||||||||||||||||||||||||||||||||||||
5600 | ; | - | ||||||||||||||||||||||||||||||||||||
5601 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5602 | } | - | ||||||||||||||||||||||||||||||||||||
5603 | - | |||||||||||||||||||||||||||||||||||||
5604 | if (PACKET_remaining(cipher_suites) % n != 0
| 0-3130 | ||||||||||||||||||||||||||||||||||||
5605 | ossl_statem_fatal((s), (50), (520), (151), | - | ||||||||||||||||||||||||||||||||||||
5606 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
5607 | , | - | ||||||||||||||||||||||||||||||||||||
5608 | 5199 | - | ||||||||||||||||||||||||||||||||||||
5609 | ) | - | ||||||||||||||||||||||||||||||||||||
5610 | ; | - | ||||||||||||||||||||||||||||||||||||
5611 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5612 | } | - | ||||||||||||||||||||||||||||||||||||
5613 | - | |||||||||||||||||||||||||||||||||||||
5614 | CRYPTO_free(s->s3->tmp.ciphers_raw, __FILE__, 5203); | - | ||||||||||||||||||||||||||||||||||||
5615 | s->s3->tmp.ciphers_raw = | - | ||||||||||||||||||||||||||||||||||||
5616 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5617 | ; | - | ||||||||||||||||||||||||||||||||||||
5618 | s->s3->tmp.ciphers_rawlen = 0; | - | ||||||||||||||||||||||||||||||||||||
5619 | - | |||||||||||||||||||||||||||||||||||||
5620 | if (sslv2format
| 53-3077 | ||||||||||||||||||||||||||||||||||||
5621 | size_t numciphers = PACKET_remaining(cipher_suites) / n; | - | ||||||||||||||||||||||||||||||||||||
5622 | PACKET sslv2ciphers = *cipher_suites; | - | ||||||||||||||||||||||||||||||||||||
5623 | unsigned int leadbyte; | - | ||||||||||||||||||||||||||||||||||||
5624 | unsigned char *raw; | - | ||||||||||||||||||||||||||||||||||||
5625 | raw = CRYPTO_malloc(numciphers * 2, __FILE__, 5220); | - | ||||||||||||||||||||||||||||||||||||
5626 | s->s3->tmp.ciphers_raw = raw; | - | ||||||||||||||||||||||||||||||||||||
5627 | if (raw ==
| 0-53 | ||||||||||||||||||||||||||||||||||||
5628 | ((void *)0)
| 0-53 | ||||||||||||||||||||||||||||||||||||
5629 | ) { | - | ||||||||||||||||||||||||||||||||||||
5630 | ossl_statem_fatal((s), (80), (520), ((1|64)), | - | ||||||||||||||||||||||||||||||||||||
5631 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
5632 | , | - | ||||||||||||||||||||||||||||||||||||
5633 | 5224 | - | ||||||||||||||||||||||||||||||||||||
5634 | ) | - | ||||||||||||||||||||||||||||||||||||
5635 | ; | - | ||||||||||||||||||||||||||||||||||||
5636 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5637 | } | - | ||||||||||||||||||||||||||||||||||||
5638 | for (s->s3->tmp.ciphers_rawlen = 0; | - | ||||||||||||||||||||||||||||||||||||
5639 | PACKET_remaining(&sslv2ciphers) > 0
| 53-1173 | ||||||||||||||||||||||||||||||||||||
5640 | raw += 2) { | - | ||||||||||||||||||||||||||||||||||||
5641 | if (!PACKET_get_1(&sslv2ciphers, &leadbyte)
| 0-1173 | ||||||||||||||||||||||||||||||||||||
5642 | || (leadbyte == 0
| 425-748 | ||||||||||||||||||||||||||||||||||||
5643 | && !PACKET_copy_bytes(&sslv2ciphers, raw,
| 0-748 | ||||||||||||||||||||||||||||||||||||
5644 | 2)
| 0-748 | ||||||||||||||||||||||||||||||||||||
5645 | || (leadbyte != 0
| 425-748 | ||||||||||||||||||||||||||||||||||||
5646 | && !PACKET_forward(&sslv2ciphers, 2)
| 0-425 | ||||||||||||||||||||||||||||||||||||
5647 | ossl_statem_fatal((s), (50), (520), (240), | - | ||||||||||||||||||||||||||||||||||||
5648 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
5649 | , | - | ||||||||||||||||||||||||||||||||||||
5650 | 5237 | - | ||||||||||||||||||||||||||||||||||||
5651 | ) | - | ||||||||||||||||||||||||||||||||||||
5652 | ; | - | ||||||||||||||||||||||||||||||||||||
5653 | CRYPTO_free(s->s3->tmp.ciphers_raw, __FILE__, 5238); | - | ||||||||||||||||||||||||||||||||||||
5654 | s->s3->tmp.ciphers_raw = | - | ||||||||||||||||||||||||||||||||||||
5655 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5656 | ; | - | ||||||||||||||||||||||||||||||||||||
5657 | s->s3->tmp.ciphers_rawlen = 0; | - | ||||||||||||||||||||||||||||||||||||
5658 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5659 | } | - | ||||||||||||||||||||||||||||||||||||
5660 | if (leadbyte == 0
| 425-748 | ||||||||||||||||||||||||||||||||||||
5661 | s->s3->tmp.ciphers_rawlen += 2; executed 748 times by 1 test: s->s3->tmp.ciphers_rawlen += 2; Executed by:
| 748 | ||||||||||||||||||||||||||||||||||||
5662 | } executed 1173 times by 1 test: end of block Executed by:
| 1173 | ||||||||||||||||||||||||||||||||||||
5663 | } executed 53 times by 1 test: else if (!PACKET_memdup(cipher_suites, &s->s3->tmp.ciphers_raw,end of block Executed by:
| 0-3077 | ||||||||||||||||||||||||||||||||||||
5664 | &s->s3->tmp.ciphers_rawlen)
| 0-3077 | ||||||||||||||||||||||||||||||||||||
5665 | ossl_statem_fatal((s), (80), (520), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||
5666 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||
5667 | , | - | ||||||||||||||||||||||||||||||||||||
5668 | 5249 | - | ||||||||||||||||||||||||||||||||||||
5669 | ) | - | ||||||||||||||||||||||||||||||||||||
5670 | ; | - | ||||||||||||||||||||||||||||||||||||
5671 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5672 | } | - | ||||||||||||||||||||||||||||||||||||
5673 | return executed 3130 times by 1 test: 1;return 1; Executed by:
executed 3130 times by 1 test: return 1; Executed by:
| 3130 | ||||||||||||||||||||||||||||||||||||
5674 | } | - | ||||||||||||||||||||||||||||||||||||
5675 | - | |||||||||||||||||||||||||||||||||||||
5676 | int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len, | - | ||||||||||||||||||||||||||||||||||||
5677 | int isv2format, struct stack_st_SSL_CIPHER **sk, | - | ||||||||||||||||||||||||||||||||||||
5678 | struct stack_st_SSL_CIPHER **scsvs) | - | ||||||||||||||||||||||||||||||||||||
5679 | { | - | ||||||||||||||||||||||||||||||||||||
5680 | PACKET pkt; | - | ||||||||||||||||||||||||||||||||||||
5681 | - | |||||||||||||||||||||||||||||||||||||
5682 | if (!PACKET_buf_init(&pkt, bytes, len)
| 0-4 | ||||||||||||||||||||||||||||||||||||
5683 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5684 | return executed 4 times by 1 test: bytes_to_cipher_list(s, &pkt, sk, scsvs, isv2format, 0);return bytes_to_cipher_list(s, &pkt, sk, scsvs, isv2format, 0); Executed by:
executed 4 times by 1 test: return bytes_to_cipher_list(s, &pkt, sk, scsvs, isv2format, 0); Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
5685 | } | - | ||||||||||||||||||||||||||||||||||||
5686 | - | |||||||||||||||||||||||||||||||||||||
5687 | int bytes_to_cipher_list(SSL *s, PACKET *cipher_suites, | - | ||||||||||||||||||||||||||||||||||||
5688 | struct stack_st_SSL_CIPHER **skp, | - | ||||||||||||||||||||||||||||||||||||
5689 | struct stack_st_SSL_CIPHER **scsvs_out, | - | ||||||||||||||||||||||||||||||||||||
5690 | int sslv2format, int fatal) | - | ||||||||||||||||||||||||||||||||||||
5691 | { | - | ||||||||||||||||||||||||||||||||||||
5692 | const SSL_CIPHER *c; | - | ||||||||||||||||||||||||||||||||||||
5693 | struct stack_st_SSL_CIPHER *sk = | - | ||||||||||||||||||||||||||||||||||||
5694 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5695 | ; | - | ||||||||||||||||||||||||||||||||||||
5696 | struct stack_st_SSL_CIPHER *scsvs = | - | ||||||||||||||||||||||||||||||||||||
5697 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
5698 | ; | - | ||||||||||||||||||||||||||||||||||||
5699 | int n; | - | ||||||||||||||||||||||||||||||||||||
5700 | - | |||||||||||||||||||||||||||||||||||||
5701 | unsigned char cipher[3]; | - | ||||||||||||||||||||||||||||||||||||
5702 | - | |||||||||||||||||||||||||||||||||||||
5703 | n = sslv2format
| 54-3080 | ||||||||||||||||||||||||||||||||||||
5704 | - | |||||||||||||||||||||||||||||||||||||
5705 | if (PACKET_remaining(cipher_suites) == 0
| 1-3133 | ||||||||||||||||||||||||||||||||||||
5706 | if (fatal
| 0-1 | ||||||||||||||||||||||||||||||||||||
5707 | ossl_statem_fatal((s), (47), (519), (183), never executed: ossl_statem_fatal((s), (47), (519), (183), __FILE__ , 5283 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5708 | __FILE__ never executed: ossl_statem_fatal((s), (47), (519), (183), __FILE__ , 5283 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5709 | , never executed: ossl_statem_fatal((s), (47), (519), (183), __FILE__ , 5283 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5710 | 5283 never executed: ossl_statem_fatal((s), (47), (519), (183), __FILE__ , 5283 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5711 | ) never executed: ossl_statem_fatal((s), (47), (519), (183), __FILE__ , 5283 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5712 | ; never executed: ossl_statem_fatal((s), (47), (519), (183), __FILE__ , 5283 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5713 | else | - | ||||||||||||||||||||||||||||||||||||
5714 | ERR_put_error(20,(519),(183),__FILE__,5285); executed 1 time by 1 test: ERR_put_error(20,(519),(183),__FILE__,5285); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5715 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5716 | } | - | ||||||||||||||||||||||||||||||||||||
5717 | - | |||||||||||||||||||||||||||||||||||||
5718 | if (PACKET_remaining(cipher_suites) % n != 0
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5719 | if (fatal
| 0 | ||||||||||||||||||||||||||||||||||||
5720 | ossl_statem_fatal((s), (50), (519), (151), never executed: ossl_statem_fatal((s), (50), (519), (151), __FILE__ , 5292 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5721 | __FILE__ never executed: ossl_statem_fatal((s), (50), (519), (151), __FILE__ , 5292 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5722 | , never executed: ossl_statem_fatal((s), (50), (519), (151), __FILE__ , 5292 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5723 | 5292 never executed: ossl_statem_fatal((s), (50), (519), (151), __FILE__ , 5292 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5724 | ) never executed: ossl_statem_fatal((s), (50), (519), (151), __FILE__ , 5292 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5725 | ; never executed: ossl_statem_fatal((s), (50), (519), (151), __FILE__ , 5292 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5726 | else | - | ||||||||||||||||||||||||||||||||||||
5727 | ERR_put_error(20,(519),(151),__FILE__,5295) never executed: ERR_put_error(20,(519),(151),__FILE__,5295) ; | 0 | ||||||||||||||||||||||||||||||||||||
5728 | ; never executed: ERR_put_error(20,(519),(151),__FILE__,5295) ; | 0 | ||||||||||||||||||||||||||||||||||||
5729 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5730 | } | - | ||||||||||||||||||||||||||||||||||||
5731 | - | |||||||||||||||||||||||||||||||||||||
5732 | sk = sk_SSL_CIPHER_new_null(); | - | ||||||||||||||||||||||||||||||||||||
5733 | scsvs = sk_SSL_CIPHER_new_null(); | - | ||||||||||||||||||||||||||||||||||||
5734 | if (sk ==
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5735 | ((void *)0)
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5736 | || scsvs ==
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5737 | ((void *)0)
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5738 | ) { | - | ||||||||||||||||||||||||||||||||||||
5739 | if (fatal
| 0 | ||||||||||||||||||||||||||||||||||||
5740 | ossl_statem_fatal((s), (80), (519), ((1|64)), never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5304 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5741 | __FILE__ never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5304 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5742 | , never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5304 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5743 | 5304 never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5304 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5744 | ) never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5304 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5745 | ; never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5304 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5746 | else | - | ||||||||||||||||||||||||||||||||||||
5747 | ERR_put_error(20,(519),((1|64)),__FILE__,5306); never executed: ERR_put_error(20,(519),((1|64)),__FILE__,5306); | 0 | ||||||||||||||||||||||||||||||||||||
5748 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
5749 | } | - | ||||||||||||||||||||||||||||||||||||
5750 | - | |||||||||||||||||||||||||||||||||||||
5751 | while (PACKET_copy_bytes(cipher_suites, cipher, n)
| 3133-76040 | ||||||||||||||||||||||||||||||||||||
5752 | - | |||||||||||||||||||||||||||||||||||||
5753 | - | |||||||||||||||||||||||||||||||||||||
5754 | - | |||||||||||||||||||||||||||||||||||||
5755 | - | |||||||||||||||||||||||||||||||||||||
5756 | - | |||||||||||||||||||||||||||||||||||||
5757 | if (sslv2format
| 426-74864 | ||||||||||||||||||||||||||||||||||||
5758 | continue; executed 426 times by 1 test: continue; Executed by:
| 426 | ||||||||||||||||||||||||||||||||||||
5759 | - | |||||||||||||||||||||||||||||||||||||
5760 | - | |||||||||||||||||||||||||||||||||||||
5761 | c = ssl_get_cipher_by_char(s, sslv2format ? &cipher[1] : cipher, 1); | - | ||||||||||||||||||||||||||||||||||||
5762 | if (c !=
| 17350-58264 | ||||||||||||||||||||||||||||||||||||
5763 | ((void *)0)
| 17350-58264 | ||||||||||||||||||||||||||||||||||||
5764 | ) { | - | ||||||||||||||||||||||||||||||||||||
5765 | if ((c->valid
| 0-55836 | ||||||||||||||||||||||||||||||||||||
5766 | (!c->valid
| 0-55836 | ||||||||||||||||||||||||||||||||||||
5767 | if (fatal
| 0 | ||||||||||||||||||||||||||||||||||||
5768 | ossl_statem_fatal((s), (80), (519), ((1|64)), never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5326 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5769 | __FILE__ never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5326 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5770 | , never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5326 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5771 | 5326 never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5326 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5772 | ) never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5326 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5773 | ; never executed: ossl_statem_fatal((s), (80), (519), ((1|64)), __FILE__ , 5326 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5774 | else | - | ||||||||||||||||||||||||||||||||||||
5775 | ERR_put_error(20,(519),((1|64)),__FILE__,5328); never executed: ERR_put_error(20,(519),((1|64)),__FILE__,5328); | 0 | ||||||||||||||||||||||||||||||||||||
5776 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
5777 | } | - | ||||||||||||||||||||||||||||||||||||
5778 | } executed 58264 times by 1 test: end of block Executed by:
| 58264 | ||||||||||||||||||||||||||||||||||||
5779 | } executed 75614 times by 1 test: end of block Executed by:
| 75614 | ||||||||||||||||||||||||||||||||||||
5780 | if (PACKET_remaining(cipher_suites) > 0
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5781 | if (fatal
| 0 | ||||||||||||||||||||||||||||||||||||
5782 | ossl_statem_fatal((s), (50), (519), (271), never executed: ossl_statem_fatal((s), (50), (519), (271), __FILE__ , 5336 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5783 | __FILE__ never executed: ossl_statem_fatal((s), (50), (519), (271), __FILE__ , 5336 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5784 | , never executed: ossl_statem_fatal((s), (50), (519), (271), __FILE__ , 5336 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5785 | 5336 never executed: ossl_statem_fatal((s), (50), (519), (271), __FILE__ , 5336 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5786 | ) never executed: ossl_statem_fatal((s), (50), (519), (271), __FILE__ , 5336 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5787 | ; never executed: ossl_statem_fatal((s), (50), (519), (271), __FILE__ , 5336 ) ; | 0 | ||||||||||||||||||||||||||||||||||||
5788 | else | - | ||||||||||||||||||||||||||||||||||||
5789 | ERR_put_error(20,(519),(271),__FILE__,5338); never executed: ERR_put_error(20,(519),(271),__FILE__,5338); | 0 | ||||||||||||||||||||||||||||||||||||
5790 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
5791 | } | - | ||||||||||||||||||||||||||||||||||||
5792 | - | |||||||||||||||||||||||||||||||||||||
5793 | if (skp !=
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5794 | ((void *)0)
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5795 | ) | - | ||||||||||||||||||||||||||||||||||||
5796 | * executed 3133 times by 1 test: skp = sk;*skp = sk; Executed by:
executed 3133 times by 1 test: *skp = sk; Executed by:
| 3133 | ||||||||||||||||||||||||||||||||||||
5797 | else | - | ||||||||||||||||||||||||||||||||||||
5798 | sk_SSL_CIPHER_free(sk); never executed: sk_SSL_CIPHER_free(sk); | 0 | ||||||||||||||||||||||||||||||||||||
5799 | if (scsvs_out !=
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5800 | ((void *)0)
| 0-3133 | ||||||||||||||||||||||||||||||||||||
5801 | ) | - | ||||||||||||||||||||||||||||||||||||
5802 | * executed 3133 times by 1 test: scsvs_out = scsvs;*scsvs_out = scsvs; Executed by:
executed 3133 times by 1 test: *scsvs_out = scsvs; Executed by:
| 3133 | ||||||||||||||||||||||||||||||||||||
5803 | else | - | ||||||||||||||||||||||||||||||||||||
5804 | sk_SSL_CIPHER_free(scsvs); never executed: sk_SSL_CIPHER_free(scsvs); | 0 | ||||||||||||||||||||||||||||||||||||
5805 | return executed 3133 times by 1 test: 1;return 1; Executed by:
executed 3133 times by 1 test: return 1; Executed by:
| 3133 | ||||||||||||||||||||||||||||||||||||
5806 | err: | - | ||||||||||||||||||||||||||||||||||||
5807 | sk_SSL_CIPHER_free(sk); | - | ||||||||||||||||||||||||||||||||||||
5808 | sk_SSL_CIPHER_free(scsvs); | - | ||||||||||||||||||||||||||||||||||||
5809 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5810 | } | - | ||||||||||||||||||||||||||||||||||||
5811 | - | |||||||||||||||||||||||||||||||||||||
5812 | int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data) | - | ||||||||||||||||||||||||||||||||||||
5813 | { | - | ||||||||||||||||||||||||||||||||||||
5814 | ctx->max_early_data = max_early_data; | - | ||||||||||||||||||||||||||||||||||||
5815 | - | |||||||||||||||||||||||||||||||||||||
5816 | return executed 62 times by 1 test: 1;return 1; Executed by:
executed 62 times by 1 test: return 1; Executed by:
| 62 | ||||||||||||||||||||||||||||||||||||
5817 | } | - | ||||||||||||||||||||||||||||||||||||
5818 | - | |||||||||||||||||||||||||||||||||||||
5819 | uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
5820 | { | - | ||||||||||||||||||||||||||||||||||||
5821 | return never executed: ctx->max_early_data;return ctx->max_early_data; never executed: return ctx->max_early_data; | 0 | ||||||||||||||||||||||||||||||||||||
5822 | } | - | ||||||||||||||||||||||||||||||||||||
5823 | - | |||||||||||||||||||||||||||||||||||||
5824 | int SSL_set_max_early_data(SSL *s, uint32_t max_early_data) | - | ||||||||||||||||||||||||||||||||||||
5825 | { | - | ||||||||||||||||||||||||||||||||||||
5826 | s->max_early_data = max_early_data; | - | ||||||||||||||||||||||||||||||||||||
5827 | - | |||||||||||||||||||||||||||||||||||||
5828 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
5829 | } | - | ||||||||||||||||||||||||||||||||||||
5830 | - | |||||||||||||||||||||||||||||||||||||
5831 | uint32_t SSL_get_max_early_data(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
5832 | { | - | ||||||||||||||||||||||||||||||||||||
5833 | return never executed: s->max_early_data;return s->max_early_data; never executed: return s->max_early_data; | 0 | ||||||||||||||||||||||||||||||||||||
5834 | } | - | ||||||||||||||||||||||||||||||||||||
5835 | - | |||||||||||||||||||||||||||||||||||||
5836 | int SSL_CTX_set_recv_max_early_data(SSL_CTX *ctx, uint32_t recv_max_early_data) | - | ||||||||||||||||||||||||||||||||||||
5837 | { | - | ||||||||||||||||||||||||||||||||||||
5838 | ctx->recv_max_early_data = recv_max_early_data; | - | ||||||||||||||||||||||||||||||||||||
5839 | - | |||||||||||||||||||||||||||||||||||||
5840 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
5841 | } | - | ||||||||||||||||||||||||||||||||||||
5842 | - | |||||||||||||||||||||||||||||||||||||
5843 | uint32_t SSL_CTX_get_recv_max_early_data(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
5844 | { | - | ||||||||||||||||||||||||||||||||||||
5845 | return never executed: ctx->recv_max_early_data;return ctx->recv_max_early_data; never executed: return ctx->recv_max_early_data; | 0 | ||||||||||||||||||||||||||||||||||||
5846 | } | - | ||||||||||||||||||||||||||||||||||||
5847 | - | |||||||||||||||||||||||||||||||||||||
5848 | int SSL_set_recv_max_early_data(SSL *s, uint32_t recv_max_early_data) | - | ||||||||||||||||||||||||||||||||||||
5849 | { | - | ||||||||||||||||||||||||||||||||||||
5850 | s->recv_max_early_data = recv_max_early_data; | - | ||||||||||||||||||||||||||||||||||||
5851 | - | |||||||||||||||||||||||||||||||||||||
5852 | return executed 3 times by 1 test: 1;return 1; Executed by:
executed 3 times by 1 test: return 1; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
5853 | } | - | ||||||||||||||||||||||||||||||||||||
5854 | - | |||||||||||||||||||||||||||||||||||||
5855 | uint32_t SSL_get_recv_max_early_data(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
5856 | { | - | ||||||||||||||||||||||||||||||||||||
5857 | return never executed: s->recv_max_early_data;return s->recv_max_early_data; never executed: return s->recv_max_early_data; | 0 | ||||||||||||||||||||||||||||||||||||
5858 | } | - | ||||||||||||||||||||||||||||||||||||
5859 | - | |||||||||||||||||||||||||||||||||||||
5860 | unsigned int ssl_get_max_send_fragment(const SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
5861 | { | - | ||||||||||||||||||||||||||||||||||||
5862 | - | |||||||||||||||||||||||||||||||||||||
5863 | if (ssl->session !=
| 7993-47522 | ||||||||||||||||||||||||||||||||||||
5864 | ((void *)0)
| 7993-47522 | ||||||||||||||||||||||||||||||||||||
5865 | && (((
| 0-47189 | ||||||||||||||||||||||||||||||||||||
5866 | return executed 333 times by 1 test: (512U << (ssl->session->ext.max_fragment_len_mode - 1));return (512U << (ssl->session->ext.max_fragment_len_mode - 1)); Executed by:
executed 333 times by 1 test: return (512U << (ssl->session->ext.max_fragment_len_mode - 1)); Executed by:
| 333 | ||||||||||||||||||||||||||||||||||||
5867 | - | |||||||||||||||||||||||||||||||||||||
5868 | - | |||||||||||||||||||||||||||||||||||||
5869 | return executed 55182 times by 1 test: ssl->max_send_fragment;return ssl->max_send_fragment; Executed by:
executed 55182 times by 1 test: return ssl->max_send_fragment; Executed by:
| 55182 | ||||||||||||||||||||||||||||||||||||
5870 | } | - | ||||||||||||||||||||||||||||||||||||
5871 | - | |||||||||||||||||||||||||||||||||||||
5872 | unsigned int ssl_get_split_send_fragment(const SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
5873 | { | - | ||||||||||||||||||||||||||||||||||||
5874 | - | |||||||||||||||||||||||||||||||||||||
5875 | if (ssl->session !=
| 226-26393 | ||||||||||||||||||||||||||||||||||||
5876 | ((void *)0)
| 226-26393 | ||||||||||||||||||||||||||||||||||||
5877 | && (((
| 0-26230 | ||||||||||||||||||||||||||||||||||||
5878 | && ssl->split_send_fragment > (512U << (ssl->session->ext.max_fragment_len_mode - 1))
| 48-115 | ||||||||||||||||||||||||||||||||||||
5879 | return executed 115 times by 1 test: (512U << (ssl->session->ext.max_fragment_len_mode - 1));return (512U << (ssl->session->ext.max_fragment_len_mode - 1)); Executed by:
executed 115 times by 1 test: return (512U << (ssl->session->ext.max_fragment_len_mode - 1)); Executed by:
| 115 | ||||||||||||||||||||||||||||||||||||
5880 | - | |||||||||||||||||||||||||||||||||||||
5881 | - | |||||||||||||||||||||||||||||||||||||
5882 | if (ssl->split_send_fragment > ssl->max_send_fragment
| 0-26504 | ||||||||||||||||||||||||||||||||||||
5883 | return never executed: ssl->max_send_fragment;return ssl->max_send_fragment; never executed: return ssl->max_send_fragment; | 0 | ||||||||||||||||||||||||||||||||||||
5884 | - | |||||||||||||||||||||||||||||||||||||
5885 | - | |||||||||||||||||||||||||||||||||||||
5886 | return executed 26504 times by 1 test: ssl->split_send_fragment;return ssl->split_send_fragment; Executed by:
executed 26504 times by 1 test: return ssl->split_send_fragment; Executed by:
| 26504 | ||||||||||||||||||||||||||||||||||||
5887 | } | - | ||||||||||||||||||||||||||||||||||||
5888 | - | |||||||||||||||||||||||||||||||||||||
5889 | int SSL_stateless(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
5890 | { | - | ||||||||||||||||||||||||||||||||||||
5891 | int ret; | - | ||||||||||||||||||||||||||||||||||||
5892 | - | |||||||||||||||||||||||||||||||||||||
5893 | - | |||||||||||||||||||||||||||||||||||||
5894 | if (!SSL_clear(s)
| 0-4 | ||||||||||||||||||||||||||||||||||||
5895 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5896 | - | |||||||||||||||||||||||||||||||||||||
5897 | ERR_clear_error(); | - | ||||||||||||||||||||||||||||||||||||
5898 | - | |||||||||||||||||||||||||||||||||||||
5899 | s->s3->flags |= 0x0800; | - | ||||||||||||||||||||||||||||||||||||
5900 | ret = SSL_accept(s); | - | ||||||||||||||||||||||||||||||||||||
5901 | s->s3->flags &= ~0x0800; | - | ||||||||||||||||||||||||||||||||||||
5902 | - | |||||||||||||||||||||||||||||||||||||
5903 | if (ret > 0
| 1-3 | ||||||||||||||||||||||||||||||||||||
5904 | return executed 1 time by 1 test: 1;return 1; Executed by:
executed 1 time by 1 test: return 1; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5905 | - | |||||||||||||||||||||||||||||||||||||
5906 | if (s->hello_retry_request == SSL_HRR_PENDING
| 0-3 | ||||||||||||||||||||||||||||||||||||
5907 | return executed 2 times by 1 test: 0;return 0; Executed by:
executed 2 times by 1 test: return 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
5908 | - | |||||||||||||||||||||||||||||||||||||
5909 | return executed 1 time by 1 test: -1;return -1; Executed by:
executed 1 time by 1 test: return -1; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
5910 | } | - | ||||||||||||||||||||||||||||||||||||
5911 | - | |||||||||||||||||||||||||||||||||||||
5912 | void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val) | - | ||||||||||||||||||||||||||||||||||||
5913 | { | - | ||||||||||||||||||||||||||||||||||||
5914 | ctx->pha_enabled = val; | - | ||||||||||||||||||||||||||||||||||||
5915 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
5916 | - | |||||||||||||||||||||||||||||||||||||
5917 | void SSL_set_post_handshake_auth(SSL *ssl, int val) | - | ||||||||||||||||||||||||||||||||||||
5918 | { | - | ||||||||||||||||||||||||||||||||||||
5919 | ssl->pha_enabled = val; | - | ||||||||||||||||||||||||||||||||||||
5920 | } executed 36 times by 1 test: end of block Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||
5921 | - | |||||||||||||||||||||||||||||||||||||
5922 | int SSL_verify_client_post_handshake(SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
5923 | { | - | ||||||||||||||||||||||||||||||||||||
5924 | if (!(!(ssl->method->ssl3_enc->enc_flags & 0x8)
| 0-28 | ||||||||||||||||||||||||||||||||||||
5925 | ERR_put_error(20,(616),(266),__FILE__,5466); | - | ||||||||||||||||||||||||||||||||||||
5926 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5927 | } | - | ||||||||||||||||||||||||||||||||||||
5928 | if (!ssl->server
| 0-28 | ||||||||||||||||||||||||||||||||||||
5929 | ERR_put_error(20,(616),(284),__FILE__,5470); | - | ||||||||||||||||||||||||||||||||||||
5930 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5931 | } | - | ||||||||||||||||||||||||||||||||||||
5932 | - | |||||||||||||||||||||||||||||||||||||
5933 | if (!SSL_is_init_finished(ssl)
| 0-28 | ||||||||||||||||||||||||||||||||||||
5934 | ERR_put_error(20,(616),(121),__FILE__,5475); | - | ||||||||||||||||||||||||||||||||||||
5935 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5936 | } | - | ||||||||||||||||||||||||||||||||||||
5937 | - | |||||||||||||||||||||||||||||||||||||
5938 | switch (ssl->post_handshake_auth) { | - | ||||||||||||||||||||||||||||||||||||
5939 | case executed 2 times by 1 test: SSL_PHA_NONE:case SSL_PHA_NONE: Executed by:
executed 2 times by 1 test: case SSL_PHA_NONE: Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
5940 | ERR_put_error(20,(616),(279),__FILE__,5481); | - | ||||||||||||||||||||||||||||||||||||
5941 | return executed 2 times by 1 test: 0;return 0; Executed by:
executed 2 times by 1 test: return 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
5942 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
5943 | case never executed: SSL_PHA_EXT_SENT:case SSL_PHA_EXT_SENT: never executed: case SSL_PHA_EXT_SENT: | 0 | ||||||||||||||||||||||||||||||||||||
5944 | ERR_put_error(20,(616),((4|64)),__FILE__,5485); | - | ||||||||||||||||||||||||||||||||||||
5945 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5946 | case executed 26 times by 1 test: SSL_PHA_EXT_RECEIVED:case SSL_PHA_EXT_RECEIVED: Executed by:
executed 26 times by 1 test: case SSL_PHA_EXT_RECEIVED: Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||
5947 | break; executed 26 times by 1 test: break; Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||
5948 | case never executed: SSL_PHA_REQUEST_PENDING:case SSL_PHA_REQUEST_PENDING: never executed: case SSL_PHA_REQUEST_PENDING: | 0 | ||||||||||||||||||||||||||||||||||||
5949 | ERR_put_error(20,(616),(285),__FILE__,5490); | - | ||||||||||||||||||||||||||||||||||||
5950 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5951 | case never executed: SSL_PHA_REQUESTED:case SSL_PHA_REQUESTED: never executed: case SSL_PHA_REQUESTED: | 0 | ||||||||||||||||||||||||||||||||||||
5952 | ERR_put_error(20,(616),(286),__FILE__,5493); | - | ||||||||||||||||||||||||||||||||||||
5953 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5954 | } | - | ||||||||||||||||||||||||||||||||||||
5955 | - | |||||||||||||||||||||||||||||||||||||
5956 | ssl->post_handshake_auth = SSL_PHA_REQUEST_PENDING; | - | ||||||||||||||||||||||||||||||||||||
5957 | - | |||||||||||||||||||||||||||||||||||||
5958 | - | |||||||||||||||||||||||||||||||||||||
5959 | if (!send_certificate_request(ssl)
| 0-26 | ||||||||||||||||||||||||||||||||||||
5960 | ssl->post_handshake_auth = SSL_PHA_EXT_RECEIVED; | - | ||||||||||||||||||||||||||||||||||||
5961 | ERR_put_error(20,(616),(283),__FILE__,5502); | - | ||||||||||||||||||||||||||||||||||||
5962 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
5963 | } | - | ||||||||||||||||||||||||||||||||||||
5964 | - | |||||||||||||||||||||||||||||||||||||
5965 | ossl_statem_set_in_init(ssl, 1); | - | ||||||||||||||||||||||||||||||||||||
5966 | return executed 26 times by 1 test: 1;return 1; Executed by:
executed 26 times by 1 test: return 1; Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||
5967 | } | - | ||||||||||||||||||||||||||||||||||||
5968 | - | |||||||||||||||||||||||||||||||||||||
5969 | int SSL_CTX_set_session_ticket_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
5970 | SSL_CTX_generate_session_ticket_fn gen_cb, | - | ||||||||||||||||||||||||||||||||||||
5971 | SSL_CTX_decrypt_session_ticket_fn dec_cb, | - | ||||||||||||||||||||||||||||||||||||
5972 | void *arg) | - | ||||||||||||||||||||||||||||||||||||
5973 | { | - | ||||||||||||||||||||||||||||||||||||
5974 | ctx->generate_ticket_cb = gen_cb; | - | ||||||||||||||||||||||||||||||||||||
5975 | ctx->decrypt_ticket_cb = dec_cb; | - | ||||||||||||||||||||||||||||||||||||
5976 | ctx->ticket_cb_data = arg; | - | ||||||||||||||||||||||||||||||||||||
5977 | return executed 16 times by 1 test: 1;return 1; Executed by:
executed 16 times by 1 test: return 1; Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||
5978 | } | - | ||||||||||||||||||||||||||||||||||||
5979 | - | |||||||||||||||||||||||||||||||||||||
5980 | void SSL_CTX_set_allow_early_data_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||||||||
5981 | SSL_allow_early_data_cb_fn cb, | - | ||||||||||||||||||||||||||||||||||||
5982 | void *arg) | - | ||||||||||||||||||||||||||||||||||||
5983 | { | - | ||||||||||||||||||||||||||||||||||||
5984 | ctx->allow_early_data_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
5985 | ctx->allow_early_data_cb_data = arg; | - | ||||||||||||||||||||||||||||||||||||
5986 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
5987 | - | |||||||||||||||||||||||||||||||||||||
5988 | void SSL_set_allow_early_data_cb(SSL *s, | - | ||||||||||||||||||||||||||||||||||||
5989 | SSL_allow_early_data_cb_fn cb, | - | ||||||||||||||||||||||||||||||||||||
5990 | void *arg) | - | ||||||||||||||||||||||||||||||||||||
5991 | { | - | ||||||||||||||||||||||||||||||||||||
5992 | s->allow_early_data_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
5993 | s->allow_early_data_cb_data = arg; | - | ||||||||||||||||||||||||||||||||||||
5994 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |