Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/bio/bio_lib.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | static long bio_call_callback(BIO *b, int oper, const char *argp, size_t len, | - | ||||||||||||||||||||||||||||||||||||
2 | int argi, long argl, long inret, size_t *processed) | - | ||||||||||||||||||||||||||||||||||||
3 | { | - | ||||||||||||||||||||||||||||||||||||
4 | long ret; | - | ||||||||||||||||||||||||||||||||||||
5 | int bareoper; | - | ||||||||||||||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||||||||||||||
7 | if (b->callback_ex !=
| 0-5 | ||||||||||||||||||||||||||||||||||||
8 | ((void *)0)
| 0-5 | ||||||||||||||||||||||||||||||||||||
9 | ) | - | ||||||||||||||||||||||||||||||||||||
10 | return never executed: b->callback_ex(b, oper, argp, len, argi, argl, inret, processed);return b->callback_ex(b, oper, argp, len, argi, argl, inret, processed); never executed: return b->callback_ex(b, oper, argp, len, argi, argl, inret, processed); | 0 | ||||||||||||||||||||||||||||||||||||
11 | - | |||||||||||||||||||||||||||||||||||||
12 | - | |||||||||||||||||||||||||||||||||||||
13 | bareoper = oper & ~0x80; | - | ||||||||||||||||||||||||||||||||||||
14 | - | |||||||||||||||||||||||||||||||||||||
15 | - | |||||||||||||||||||||||||||||||||||||
16 | - | |||||||||||||||||||||||||||||||||||||
17 | - | |||||||||||||||||||||||||||||||||||||
18 | - | |||||||||||||||||||||||||||||||||||||
19 | if (((
| 0-5 | ||||||||||||||||||||||||||||||||||||
20 | - | |||||||||||||||||||||||||||||||||||||
21 | if (len > 0x7fffffff
| 0-2 | ||||||||||||||||||||||||||||||||||||
22 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
23 | - | |||||||||||||||||||||||||||||||||||||
24 | argi = (int)len; | - | ||||||||||||||||||||||||||||||||||||
25 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
26 | - | |||||||||||||||||||||||||||||||||||||
27 | if (inret
| 0-5 | ||||||||||||||||||||||||||||||||||||
28 | if (*
| 0-2 | ||||||||||||||||||||||||||||||||||||
29 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
30 | inret = *processed; | - | ||||||||||||||||||||||||||||||||||||
31 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
32 | - | |||||||||||||||||||||||||||||||||||||
33 | ret = b->callback(b, oper, argp, argi, argl, inret); | - | ||||||||||||||||||||||||||||||||||||
34 | - | |||||||||||||||||||||||||||||||||||||
35 | if (ret >= 0
| 0-5 | ||||||||||||||||||||||||||||||||||||
36 | *processed = (size_t)ret; | - | ||||||||||||||||||||||||||||||||||||
37 | ret = 1; | - | ||||||||||||||||||||||||||||||||||||
38 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
39 | - | |||||||||||||||||||||||||||||||||||||
40 | return executed 5 times by 1 test: ret;return ret; Executed by:
executed 5 times by 1 test: return ret; Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
41 | } | - | ||||||||||||||||||||||||||||||||||||
42 | - | |||||||||||||||||||||||||||||||||||||
43 | BIO *BIO_new(const BIO_METHOD *method) | - | ||||||||||||||||||||||||||||||||||||
44 | { | - | ||||||||||||||||||||||||||||||||||||
45 | BIO *bio = CRYPTO_zalloc(sizeof(*bio), __FILE__, 73); | - | ||||||||||||||||||||||||||||||||||||
46 | - | |||||||||||||||||||||||||||||||||||||
47 | if (bio ==
| 0-200190 | ||||||||||||||||||||||||||||||||||||
48 | ((void *)0)
| 0-200190 | ||||||||||||||||||||||||||||||||||||
49 | ) { | - | ||||||||||||||||||||||||||||||||||||
50 | ERR_put_error(32,(108),((1|64)),__FILE__,76); | - | ||||||||||||||||||||||||||||||||||||
51 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
52 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
53 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
54 | } | - | ||||||||||||||||||||||||||||||||||||
55 | - | |||||||||||||||||||||||||||||||||||||
56 | bio->method = method; | - | ||||||||||||||||||||||||||||||||||||
57 | bio->shutdown = 1; | - | ||||||||||||||||||||||||||||||||||||
58 | bio->references = 1; | - | ||||||||||||||||||||||||||||||||||||
59 | - | |||||||||||||||||||||||||||||||||||||
60 | if (!CRYPTO_new_ex_data(12, bio, &bio->ex_data)
| 0-200190 | ||||||||||||||||||||||||||||||||||||
61 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
62 | - | |||||||||||||||||||||||||||||||||||||
63 | bio->lock = CRYPTO_THREAD_lock_new(); | - | ||||||||||||||||||||||||||||||||||||
64 | if (bio->lock ==
| 0-200190 | ||||||||||||||||||||||||||||||||||||
65 | ((void *)0)
| 0-200190 | ||||||||||||||||||||||||||||||||||||
66 | ) { | - | ||||||||||||||||||||||||||||||||||||
67 | ERR_put_error(32,(108),((1|64)),__FILE__,89); | - | ||||||||||||||||||||||||||||||||||||
68 | CRYPTO_free_ex_data(12, bio, &bio->ex_data); | - | ||||||||||||||||||||||||||||||||||||
69 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
70 | } | - | ||||||||||||||||||||||||||||||||||||
71 | - | |||||||||||||||||||||||||||||||||||||
72 | if (method->create !=
| 15602-184588 | ||||||||||||||||||||||||||||||||||||
73 | ((void *)0)
| 15602-184588 | ||||||||||||||||||||||||||||||||||||
74 | && !method->create(bio)
| 0-184588 | ||||||||||||||||||||||||||||||||||||
75 | ERR_put_error(32,(108),((6|64)),__FILE__,95); | - | ||||||||||||||||||||||||||||||||||||
76 | CRYPTO_free_ex_data(12, bio, &bio->ex_data); | - | ||||||||||||||||||||||||||||||||||||
77 | CRYPTO_THREAD_lock_free(bio->lock); | - | ||||||||||||||||||||||||||||||||||||
78 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
79 | } | - | ||||||||||||||||||||||||||||||||||||
80 | if (method->create ==
| 15602-184588 | ||||||||||||||||||||||||||||||||||||
81 | ((void *)0)
| 15602-184588 | ||||||||||||||||||||||||||||||||||||
82 | ) | - | ||||||||||||||||||||||||||||||||||||
83 | bio->init = 1; executed 15602 times by 1 test: bio->init = 1; Executed by:
| 15602 | ||||||||||||||||||||||||||||||||||||
84 | - | |||||||||||||||||||||||||||||||||||||
85 | return executed 200190 times by 12 tests: bio;return bio; Executed by:
executed 200190 times by 12 tests: return bio; Executed by:
| 200190 | ||||||||||||||||||||||||||||||||||||
86 | - | |||||||||||||||||||||||||||||||||||||
87 | err: | - | ||||||||||||||||||||||||||||||||||||
88 | CRYPTO_free(bio, __FILE__, 106); | - | ||||||||||||||||||||||||||||||||||||
89 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
90 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
91 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
92 | } | - | ||||||||||||||||||||||||||||||||||||
93 | - | |||||||||||||||||||||||||||||||||||||
94 | int BIO_free(BIO *a) | - | ||||||||||||||||||||||||||||||||||||
95 | { | - | ||||||||||||||||||||||||||||||||||||
96 | int ret; | - | ||||||||||||||||||||||||||||||||||||
97 | - | |||||||||||||||||||||||||||||||||||||
98 | if (a ==
| 54311-204985 | ||||||||||||||||||||||||||||||||||||
99 | ((void *)0)
| 54311-204985 | ||||||||||||||||||||||||||||||||||||
100 | ) | - | ||||||||||||||||||||||||||||||||||||
101 | return executed 54311 times by 1 test: 0;return 0; Executed by:
executed 54311 times by 1 test: return 0; Executed by:
| 54311 | ||||||||||||||||||||||||||||||||||||
102 | - | |||||||||||||||||||||||||||||||||||||
103 | if (CRYPTO_DOWN_REF(&a->references, &ret, a->lock) <= 0
| 0-204985 | ||||||||||||||||||||||||||||||||||||
104 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
105 | - | |||||||||||||||||||||||||||||||||||||
106 | ; | - | ||||||||||||||||||||||||||||||||||||
107 | if (ret > 0
| 4795-200190 | ||||||||||||||||||||||||||||||||||||
108 | return executed 4795 times by 1 test: 1;return 1; Executed by:
executed 4795 times by 1 test: return 1; Executed by:
| 4795 | ||||||||||||||||||||||||||||||||||||
109 | ; | - | ||||||||||||||||||||||||||||||||||||
110 | - | |||||||||||||||||||||||||||||||||||||
111 | if (a->callback !=
| 1-200189 | ||||||||||||||||||||||||||||||||||||
112 | ((void *)0)
| 1-200189 | ||||||||||||||||||||||||||||||||||||
113 | || a->callback_ex !=
| 0-200189 | ||||||||||||||||||||||||||||||||||||
114 | ((void *)0)
| 0-200189 | ||||||||||||||||||||||||||||||||||||
115 | ) { | - | ||||||||||||||||||||||||||||||||||||
116 | ret = (int)bio_call_callback(a, 0x01, | - | ||||||||||||||||||||||||||||||||||||
117 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
118 | , 0, 0, 0L, 1L, | - | ||||||||||||||||||||||||||||||||||||
119 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
120 | ); | - | ||||||||||||||||||||||||||||||||||||
121 | if (ret <= 0
| 0-1 | ||||||||||||||||||||||||||||||||||||
122 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
123 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
124 | - | |||||||||||||||||||||||||||||||||||||
125 | if ((
| 0-200190 | ||||||||||||||||||||||||||||||||||||
126 | ((void *)0)
| 0-200190 | ||||||||||||||||||||||||||||||||||||
127 | )
| 0-200190 | ||||||||||||||||||||||||||||||||||||
128 | ((void *)0)
| 15602-184588 | ||||||||||||||||||||||||||||||||||||
129 | )
| 15602-184588 | ||||||||||||||||||||||||||||||||||||
130 | a->method->destroy(a); executed 184588 times by 12 tests: a->method->destroy(a); Executed by:
| 184588 | ||||||||||||||||||||||||||||||||||||
131 | - | |||||||||||||||||||||||||||||||||||||
132 | CRYPTO_free_ex_data(12, a, &a->ex_data); | - | ||||||||||||||||||||||||||||||||||||
133 | - | |||||||||||||||||||||||||||||||||||||
134 | CRYPTO_THREAD_lock_free(a->lock); | - | ||||||||||||||||||||||||||||||||||||
135 | - | |||||||||||||||||||||||||||||||||||||
136 | CRYPTO_free(a, __FILE__, 138); | - | ||||||||||||||||||||||||||||||||||||
137 | - | |||||||||||||||||||||||||||||||||||||
138 | return executed 200190 times by 12 tests: 1;return 1; Executed by:
executed 200190 times by 12 tests: return 1; Executed by:
| 200190 | ||||||||||||||||||||||||||||||||||||
139 | } | - | ||||||||||||||||||||||||||||||||||||
140 | - | |||||||||||||||||||||||||||||||||||||
141 | void BIO_set_data(BIO *a, void *ptr) | - | ||||||||||||||||||||||||||||||||||||
142 | { | - | ||||||||||||||||||||||||||||||||||||
143 | a->ptr = ptr; | - | ||||||||||||||||||||||||||||||||||||
144 | } executed 82597 times by 12 tests: end of block Executed by:
| 82597 | ||||||||||||||||||||||||||||||||||||
145 | - | |||||||||||||||||||||||||||||||||||||
146 | void *BIO_get_data(BIO *a) | - | ||||||||||||||||||||||||||||||||||||
147 | { | - | ||||||||||||||||||||||||||||||||||||
148 | return executed 492225 times by 3 tests: a->ptr;return a->ptr; Executed by:
executed 492225 times by 3 tests: return a->ptr; Executed by:
| 492225 | ||||||||||||||||||||||||||||||||||||
149 | } | - | ||||||||||||||||||||||||||||||||||||
150 | - | |||||||||||||||||||||||||||||||||||||
151 | void BIO_set_init(BIO *a, int init) | - | ||||||||||||||||||||||||||||||||||||
152 | { | - | ||||||||||||||||||||||||||||||||||||
153 | a->init = init; | - | ||||||||||||||||||||||||||||||||||||
154 | } executed 117338 times by 12 tests: end of block Executed by:
| 117338 | ||||||||||||||||||||||||||||||||||||
155 | - | |||||||||||||||||||||||||||||||||||||
156 | int BIO_get_init(BIO *a) | - | ||||||||||||||||||||||||||||||||||||
157 | { | - | ||||||||||||||||||||||||||||||||||||
158 | return executed 326 times by 1 test: a->init;return a->init; Executed by:
executed 326 times by 1 test: return a->init; Executed by:
| 326 | ||||||||||||||||||||||||||||||||||||
159 | } | - | ||||||||||||||||||||||||||||||||||||
160 | - | |||||||||||||||||||||||||||||||||||||
161 | void BIO_set_shutdown(BIO *a, int shut) | - | ||||||||||||||||||||||||||||||||||||
162 | { | - | ||||||||||||||||||||||||||||||||||||
163 | a->shutdown = shut; | - | ||||||||||||||||||||||||||||||||||||
164 | } executed 487 times by 1 test: end of block Executed by:
| 487 | ||||||||||||||||||||||||||||||||||||
165 | - | |||||||||||||||||||||||||||||||||||||
166 | int BIO_get_shutdown(BIO *a) | - | ||||||||||||||||||||||||||||||||||||
167 | { | - | ||||||||||||||||||||||||||||||||||||
168 | return executed 487 times by 1 test: a->shutdown;return a->shutdown; Executed by:
executed 487 times by 1 test: return a->shutdown; Executed by:
| 487 | ||||||||||||||||||||||||||||||||||||
169 | } | - | ||||||||||||||||||||||||||||||||||||
170 | - | |||||||||||||||||||||||||||||||||||||
171 | void BIO_vfree(BIO *a) | - | ||||||||||||||||||||||||||||||||||||
172 | { | - | ||||||||||||||||||||||||||||||||||||
173 | BIO_free(a); | - | ||||||||||||||||||||||||||||||||||||
174 | } executed 561 times by 1 test: end of block Executed by:
| 561 | ||||||||||||||||||||||||||||||||||||
175 | - | |||||||||||||||||||||||||||||||||||||
176 | int BIO_up_ref(BIO *a) | - | ||||||||||||||||||||||||||||||||||||
177 | { | - | ||||||||||||||||||||||||||||||||||||
178 | int i; | - | ||||||||||||||||||||||||||||||||||||
179 | - | |||||||||||||||||||||||||||||||||||||
180 | if (CRYPTO_UP_REF(&a->references, &i, a->lock) <= 0
| 0-4795 | ||||||||||||||||||||||||||||||||||||
181 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
182 | - | |||||||||||||||||||||||||||||||||||||
183 | ; | - | ||||||||||||||||||||||||||||||||||||
184 | ; | - | ||||||||||||||||||||||||||||||||||||
185 | return executed 4795 times by 1 test: ((return ((i > 1) ? 1 : 0); Executed by:
executed 4795 times by 1 test: return ((i > 1) ? 1 : 0); Executed by:
| 0-4795 | ||||||||||||||||||||||||||||||||||||
186 | } | - | ||||||||||||||||||||||||||||||||||||
187 | - | |||||||||||||||||||||||||||||||||||||
188 | void BIO_clear_flags(BIO *b, int flags) | - | ||||||||||||||||||||||||||||||||||||
189 | { | - | ||||||||||||||||||||||||||||||||||||
190 | b->flags &= ~flags; | - | ||||||||||||||||||||||||||||||||||||
191 | } executed 1773137 times by 1 test: end of block Executed by:
| 1773137 | ||||||||||||||||||||||||||||||||||||
192 | - | |||||||||||||||||||||||||||||||||||||
193 | int BIO_test_flags(const BIO *b, int flags) | - | ||||||||||||||||||||||||||||||||||||
194 | { | - | ||||||||||||||||||||||||||||||||||||
195 | return executed 349329 times by 1 test: (b->flags & flags);return (b->flags & flags); Executed by:
executed 349329 times by 1 test: return (b->flags & flags); Executed by:
| 349329 | ||||||||||||||||||||||||||||||||||||
196 | } | - | ||||||||||||||||||||||||||||||||||||
197 | - | |||||||||||||||||||||||||||||||||||||
198 | void BIO_set_flags(BIO *b, int flags) | - | ||||||||||||||||||||||||||||||||||||
199 | { | - | ||||||||||||||||||||||||||||||||||||
200 | b->flags |= flags; | - | ||||||||||||||||||||||||||||||||||||
201 | } executed 339941 times by 12 tests: end of block Executed by:
| 339941 | ||||||||||||||||||||||||||||||||||||
202 | - | |||||||||||||||||||||||||||||||||||||
203 | BIO_callback_fn BIO_get_callback(const BIO *b) | - | ||||||||||||||||||||||||||||||||||||
204 | { | - | ||||||||||||||||||||||||||||||||||||
205 | return executed 36938 times by 1 test: b->callback;return b->callback; Executed by:
executed 36938 times by 1 test: return b->callback; Executed by:
| 36938 | ||||||||||||||||||||||||||||||||||||
206 | } | - | ||||||||||||||||||||||||||||||||||||
207 | - | |||||||||||||||||||||||||||||||||||||
208 | void BIO_set_callback(BIO *b, BIO_callback_fn cb) | - | ||||||||||||||||||||||||||||||||||||
209 | { | - | ||||||||||||||||||||||||||||||||||||
210 | b->callback = cb; | - | ||||||||||||||||||||||||||||||||||||
211 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
212 | - | |||||||||||||||||||||||||||||||||||||
213 | BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b) | - | ||||||||||||||||||||||||||||||||||||
214 | { | - | ||||||||||||||||||||||||||||||||||||
215 | return never executed: b->callback_ex;return b->callback_ex; never executed: return b->callback_ex; | 0 | ||||||||||||||||||||||||||||||||||||
216 | } | - | ||||||||||||||||||||||||||||||||||||
217 | - | |||||||||||||||||||||||||||||||||||||
218 | void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex cb) | - | ||||||||||||||||||||||||||||||||||||
219 | { | - | ||||||||||||||||||||||||||||||||||||
220 | b->callback_ex = cb; | - | ||||||||||||||||||||||||||||||||||||
221 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
222 | - | |||||||||||||||||||||||||||||||||||||
223 | void BIO_set_callback_arg(BIO *b, char *arg) | - | ||||||||||||||||||||||||||||||||||||
224 | { | - | ||||||||||||||||||||||||||||||||||||
225 | b->cb_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
226 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
227 | - | |||||||||||||||||||||||||||||||||||||
228 | char *BIO_get_callback_arg(const BIO *b) | - | ||||||||||||||||||||||||||||||||||||
229 | { | - | ||||||||||||||||||||||||||||||||||||
230 | return executed 2 times by 1 test: b->cb_arg;return b->cb_arg; Executed by:
executed 2 times by 1 test: return b->cb_arg; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
231 | } | - | ||||||||||||||||||||||||||||||||||||
232 | - | |||||||||||||||||||||||||||||||||||||
233 | const char *BIO_method_name(const BIO *b) | - | ||||||||||||||||||||||||||||||||||||
234 | { | - | ||||||||||||||||||||||||||||||||||||
235 | return never executed: b->method->name;return b->method->name; never executed: return b->method->name; | 0 | ||||||||||||||||||||||||||||||||||||
236 | } | - | ||||||||||||||||||||||||||||||||||||
237 | - | |||||||||||||||||||||||||||||||||||||
238 | int BIO_method_type(const BIO *b) | - | ||||||||||||||||||||||||||||||||||||
239 | { | - | ||||||||||||||||||||||||||||||||||||
240 | return executed 65 times by 1 test: b->method->type;return b->method->type; Executed by:
executed 65 times by 1 test: return b->method->type; Executed by:
| 65 | ||||||||||||||||||||||||||||||||||||
241 | } | - | ||||||||||||||||||||||||||||||||||||
242 | - | |||||||||||||||||||||||||||||||||||||
243 | - | |||||||||||||||||||||||||||||||||||||
244 | - | |||||||||||||||||||||||||||||||||||||
245 | - | |||||||||||||||||||||||||||||||||||||
246 | - | |||||||||||||||||||||||||||||||||||||
247 | - | |||||||||||||||||||||||||||||||||||||
248 | - | |||||||||||||||||||||||||||||||||||||
249 | static int bio_read_intern(BIO *b, void *data, size_t dlen, size_t *readbytes) | - | ||||||||||||||||||||||||||||||||||||
250 | { | - | ||||||||||||||||||||||||||||||||||||
251 | int ret; | - | ||||||||||||||||||||||||||||||||||||
252 | - | |||||||||||||||||||||||||||||||||||||
253 | if ((
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
254 | ((void *)0)
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
255 | )
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
256 | ((void *)0)
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
257 | )
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
258 | ((void *)0)
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
259 | )
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
260 | ERR_put_error(32,(120),(121),__FILE__,256); | - | ||||||||||||||||||||||||||||||||||||
261 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||||||||
262 | } | - | ||||||||||||||||||||||||||||||||||||
263 | - | |||||||||||||||||||||||||||||||||||||
264 | if ((b->callback !=
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
265 | ((void *)0)
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
266 | || b->callback_ex !=
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
267 | ((void *)0)
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
268 | ) && | - | ||||||||||||||||||||||||||||||||||||
269 | ((
| 0 | ||||||||||||||||||||||||||||||||||||
270 |
| 0 | ||||||||||||||||||||||||||||||||||||
271 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
272 | )) <= 0)
| 0 | ||||||||||||||||||||||||||||||||||||
273 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
274 | - | |||||||||||||||||||||||||||||||||||||
275 | if (!b->init
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
276 | ERR_put_error(32,(120),(120),__FILE__,266); | - | ||||||||||||||||||||||||||||||||||||
277 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||||||||
278 | } | - | ||||||||||||||||||||||||||||||||||||
279 | - | |||||||||||||||||||||||||||||||||||||
280 | ret = b->method->bread(b, data, dlen, readbytes); | - | ||||||||||||||||||||||||||||||||||||
281 | - | |||||||||||||||||||||||||||||||||||||
282 | if (ret > 0
| 114081-979029 | ||||||||||||||||||||||||||||||||||||
283 | b->num_read += (uint64_t)*readbytes; executed 979029 times by 1 test: b->num_read += (uint64_t)*readbytes; Executed by:
| 979029 | ||||||||||||||||||||||||||||||||||||
284 | - | |||||||||||||||||||||||||||||||||||||
285 | if (b->callback !=
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
286 | ((void *)0)
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
287 | || b->callback_ex !=
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
288 | ((void *)0)
| 0-1093110 | ||||||||||||||||||||||||||||||||||||
289 | ) | - | ||||||||||||||||||||||||||||||||||||
290 | ret = (int)bio_call_callback(b, 0x02 | 0x80, data, never executed: ret = (int)bio_call_callback(b, 0x02 | 0x80, data, dlen, 0, 0L, ret, readbytes); | 0 | ||||||||||||||||||||||||||||||||||||
291 | dlen, 0, 0L, ret, readbytes); never executed: ret = (int)bio_call_callback(b, 0x02 | 0x80, data, dlen, 0, 0L, ret, readbytes); | 0 | ||||||||||||||||||||||||||||||||||||
292 | - | |||||||||||||||||||||||||||||||||||||
293 | - | |||||||||||||||||||||||||||||||||||||
294 | if (ret > 0
| 0-979029 | ||||||||||||||||||||||||||||||||||||
295 | ERR_put_error(32,(120),((4|64)),__FILE__,281); | - | ||||||||||||||||||||||||||||||||||||
296 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
297 | } | - | ||||||||||||||||||||||||||||||||||||
298 | - | |||||||||||||||||||||||||||||||||||||
299 | return executed 1093110 times by 1 test: ret;return ret; Executed by:
executed 1093110 times by 1 test: return ret; Executed by:
| 1093110 | ||||||||||||||||||||||||||||||||||||
300 | } | - | ||||||||||||||||||||||||||||||||||||
301 | - | |||||||||||||||||||||||||||||||||||||
302 | int BIO_read(BIO *b, void *data, int dlen) | - | ||||||||||||||||||||||||||||||||||||
303 | { | - | ||||||||||||||||||||||||||||||||||||
304 | size_t readbytes; | - | ||||||||||||||||||||||||||||||||||||
305 | int ret; | - | ||||||||||||||||||||||||||||||||||||
306 | - | |||||||||||||||||||||||||||||||||||||
307 | if (dlen < 0
| 0-1093107 | ||||||||||||||||||||||||||||||||||||
308 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
309 | - | |||||||||||||||||||||||||||||||||||||
310 | ret = bio_read_intern(b, data, (size_t)dlen, &readbytes); | - | ||||||||||||||||||||||||||||||||||||
311 | - | |||||||||||||||||||||||||||||||||||||
312 | if (ret > 0
| 114081-979026 | ||||||||||||||||||||||||||||||||||||
313 | - | |||||||||||||||||||||||||||||||||||||
314 | ret = (int)readbytes; | - | ||||||||||||||||||||||||||||||||||||
315 | } executed 979026 times by 1 test: end of block Executed by:
| 979026 | ||||||||||||||||||||||||||||||||||||
316 | - | |||||||||||||||||||||||||||||||||||||
317 | return executed 1093107 times by 1 test: ret;return ret; Executed by:
executed 1093107 times by 1 test: return ret; Executed by:
| 1093107 | ||||||||||||||||||||||||||||||||||||
318 | } | - | ||||||||||||||||||||||||||||||||||||
319 | - | |||||||||||||||||||||||||||||||||||||
320 | int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes) | - | ||||||||||||||||||||||||||||||||||||
321 | { | - | ||||||||||||||||||||||||||||||||||||
322 | int ret; | - | ||||||||||||||||||||||||||||||||||||
323 | - | |||||||||||||||||||||||||||||||||||||
324 | ret = bio_read_intern(b, data, dlen, readbytes); | - | ||||||||||||||||||||||||||||||||||||
325 | - | |||||||||||||||||||||||||||||||||||||
326 | if (ret > 0
| 0-3 | ||||||||||||||||||||||||||||||||||||
327 | ret = 1; executed 3 times by 1 test: ret = 1; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
328 | else | - | ||||||||||||||||||||||||||||||||||||
329 | ret = 0; never executed: ret = 0; | 0 | ||||||||||||||||||||||||||||||||||||
330 | - | |||||||||||||||||||||||||||||||||||||
331 | return executed 3 times by 1 test: ret;return ret; Executed by:
executed 3 times by 1 test: return ret; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
332 | } | - | ||||||||||||||||||||||||||||||||||||
333 | - | |||||||||||||||||||||||||||||||||||||
334 | static int bio_write_intern(BIO *b, const void *data, size_t dlen, | - | ||||||||||||||||||||||||||||||||||||
335 | size_t *written) | - | ||||||||||||||||||||||||||||||||||||
336 | { | - | ||||||||||||||||||||||||||||||||||||
337 | int ret; | - | ||||||||||||||||||||||||||||||||||||
338 | - | |||||||||||||||||||||||||||||||||||||
339 | if (b ==
| 0-13188871 | ||||||||||||||||||||||||||||||||||||
340 | ((void *)0)
| 0-13188871 | ||||||||||||||||||||||||||||||||||||
341 | ) | - | ||||||||||||||||||||||||||||||||||||
342 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
343 | - | |||||||||||||||||||||||||||||||||||||
344 | if ((
| 0-13188871 | ||||||||||||||||||||||||||||||||||||
345 | ((void *)0)
| 0-13188871 | ||||||||||||||||||||||||||||||||||||
346 | )
| 0-13188871 | ||||||||||||||||||||||||||||||||||||
347 | ((void *)0)
| 0-13188871 | ||||||||||||||||||||||||||||||||||||
348 | )
| 0-13188871 | ||||||||||||||||||||||||||||||||||||
349 | ERR_put_error(32,(128),(121),__FILE__,329); | - | ||||||||||||||||||||||||||||||||||||
350 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||||||||
351 | } | - | ||||||||||||||||||||||||||||||||||||
352 | - | |||||||||||||||||||||||||||||||||||||
353 | if ((b->callback !=
| 1-13188870 | ||||||||||||||||||||||||||||||||||||
354 | ((void *)0)
| 1-13188870 | ||||||||||||||||||||||||||||||||||||
355 | || b->callback_ex !=
| 0-13188870 | ||||||||||||||||||||||||||||||||||||
356 | ((void *)0)
| 0-13188870 | ||||||||||||||||||||||||||||||||||||
357 | ) && | - | ||||||||||||||||||||||||||||||||||||
358 | ((
| 0-1 | ||||||||||||||||||||||||||||||||||||
359 |
| 0-1 | ||||||||||||||||||||||||||||||||||||
360 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
361 | )) <= 0)
| 0-1 | ||||||||||||||||||||||||||||||||||||
362 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
363 | - | |||||||||||||||||||||||||||||||||||||
364 | if (!b->init
| 88-13188783 | ||||||||||||||||||||||||||||||||||||
365 | ERR_put_error(32,(128),(120),__FILE__,339); | - | ||||||||||||||||||||||||||||||||||||
366 | return executed 88 times by 1 test: -2;return -2; Executed by:
executed 88 times by 1 test: return -2; Executed by:
| 88 | ||||||||||||||||||||||||||||||||||||
367 | } | - | ||||||||||||||||||||||||||||||||||||
368 | - | |||||||||||||||||||||||||||||||||||||
369 | ret = b->method->bwrite(b, data, dlen, written); | - | ||||||||||||||||||||||||||||||||||||
370 | - | |||||||||||||||||||||||||||||||||||||
371 | if (ret > 0
| 3588-13185195 | ||||||||||||||||||||||||||||||||||||
372 | b->num_write += (uint64_t)*written; executed 13185195 times by 12 tests: b->num_write += (uint64_t)*written; Executed by:
| 13185195 | ||||||||||||||||||||||||||||||||||||
373 | - | |||||||||||||||||||||||||||||||||||||
374 | if (b->callback !=
| 1-13188782 | ||||||||||||||||||||||||||||||||||||
375 | ((void *)0)
| 1-13188782 | ||||||||||||||||||||||||||||||||||||
376 | || b->callback_ex !=
| 0-13188782 | ||||||||||||||||||||||||||||||||||||
377 | ((void *)0)
| 0-13188782 | ||||||||||||||||||||||||||||||||||||
378 | ) | - | ||||||||||||||||||||||||||||||||||||
379 | ret = (int)bio_call_callback(b, 0x03 | 0x80, data, executed 1 time by 1 test: ret = (int)bio_call_callback(b, 0x03 | 0x80, data, dlen, 0, 0L, ret, written); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
380 | dlen, 0, 0L, ret, written); executed 1 time by 1 test: ret = (int)bio_call_callback(b, 0x03 | 0x80, data, dlen, 0, 0L, ret, written); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
381 | - | |||||||||||||||||||||||||||||||||||||
382 | return executed 13188783 times by 12 tests: ret;return ret; Executed by:
executed 13188783 times by 12 tests: return ret; Executed by:
| 13188783 | ||||||||||||||||||||||||||||||||||||
383 | } | - | ||||||||||||||||||||||||||||||||||||
384 | - | |||||||||||||||||||||||||||||||||||||
385 | int BIO_write(BIO *b, const void *data, int dlen) | - | ||||||||||||||||||||||||||||||||||||
386 | { | - | ||||||||||||||||||||||||||||||||||||
387 | size_t written; | - | ||||||||||||||||||||||||||||||||||||
388 | int ret; | - | ||||||||||||||||||||||||||||||||||||
389 | - | |||||||||||||||||||||||||||||||||||||
390 | if (dlen < 0
| 0-13089765 | ||||||||||||||||||||||||||||||||||||
391 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
392 | - | |||||||||||||||||||||||||||||||||||||
393 | ret = bio_write_intern(b, data, (size_t)dlen, &written); | - | ||||||||||||||||||||||||||||||||||||
394 | - | |||||||||||||||||||||||||||||||||||||
395 | if (ret > 0
| 3676-13086089 | ||||||||||||||||||||||||||||||||||||
396 | - | |||||||||||||||||||||||||||||||||||||
397 | ret = (int)written; | - | ||||||||||||||||||||||||||||||||||||
398 | } executed 13086089 times by 12 tests: end of block Executed by:
| 13086089 | ||||||||||||||||||||||||||||||||||||
399 | - | |||||||||||||||||||||||||||||||||||||
400 | return executed 13089765 times by 12 tests: ret;return ret; Executed by:
executed 13089765 times by 12 tests: return ret; Executed by:
| 13089765 | ||||||||||||||||||||||||||||||||||||
401 | } | - | ||||||||||||||||||||||||||||||||||||
402 | - | |||||||||||||||||||||||||||||||||||||
403 | int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written) | - | ||||||||||||||||||||||||||||||||||||
404 | { | - | ||||||||||||||||||||||||||||||||||||
405 | int ret; | - | ||||||||||||||||||||||||||||||||||||
406 | - | |||||||||||||||||||||||||||||||||||||
407 | ret = bio_write_intern(b, data, dlen, written); | - | ||||||||||||||||||||||||||||||||||||
408 | - | |||||||||||||||||||||||||||||||||||||
409 | if (ret > 0
| 0-99106 | ||||||||||||||||||||||||||||||||||||
410 | ret = 1; executed 99106 times by 3 tests: ret = 1; Executed by:
| 99106 | ||||||||||||||||||||||||||||||||||||
411 | else | - | ||||||||||||||||||||||||||||||||||||
412 | ret = 0; never executed: ret = 0; | 0 | ||||||||||||||||||||||||||||||||||||
413 | - | |||||||||||||||||||||||||||||||||||||
414 | return executed 99106 times by 3 tests: ret;return ret; Executed by:
executed 99106 times by 3 tests: return ret; Executed by:
| 99106 | ||||||||||||||||||||||||||||||||||||
415 | } | - | ||||||||||||||||||||||||||||||||||||
416 | - | |||||||||||||||||||||||||||||||||||||
417 | int BIO_puts(BIO *b, const char *buf) | - | ||||||||||||||||||||||||||||||||||||
418 | { | - | ||||||||||||||||||||||||||||||||||||
419 | int ret; | - | ||||||||||||||||||||||||||||||||||||
420 | size_t written = 0; | - | ||||||||||||||||||||||||||||||||||||
421 | - | |||||||||||||||||||||||||||||||||||||
422 | if ((
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
423 | ((void *)0)
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
424 | )
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
425 | ((void *)0)
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
426 | )
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
427 | ((void *)0)
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
428 | )
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
429 | ERR_put_error(32,(110),(121),__FILE__,393); | - | ||||||||||||||||||||||||||||||||||||
430 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||||||||
431 | } | - | ||||||||||||||||||||||||||||||||||||
432 | - | |||||||||||||||||||||||||||||||||||||
433 | if (b->callback !=
| 1-6180366 | ||||||||||||||||||||||||||||||||||||
434 | ((void *)0)
| 1-6180366 | ||||||||||||||||||||||||||||||||||||
435 | || b->callback_ex !=
| 0-6180366 | ||||||||||||||||||||||||||||||||||||
436 | ((void *)0)
| 0-6180366 | ||||||||||||||||||||||||||||||||||||
437 | ) { | - | ||||||||||||||||||||||||||||||||||||
438 | ret = (int)bio_call_callback(b, 0x04, buf, 0, 0, 0L, 1L, | - | ||||||||||||||||||||||||||||||||||||
439 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
440 | ); | - | ||||||||||||||||||||||||||||||||||||
441 | if (ret <= 0
| 0-1 | ||||||||||||||||||||||||||||||||||||
442 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
443 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
444 | - | |||||||||||||||||||||||||||||||||||||
445 | if (!b->init
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
446 | ERR_put_error(32,(110),(120),__FILE__,404); | - | ||||||||||||||||||||||||||||||||||||
447 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||||||||
448 | } | - | ||||||||||||||||||||||||||||||||||||
449 | - | |||||||||||||||||||||||||||||||||||||
450 | ret = b->method->bputs(b, buf); | - | ||||||||||||||||||||||||||||||||||||
451 | - | |||||||||||||||||||||||||||||||||||||
452 | if (ret > 0
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
453 | b->num_write += (uint64_t)ret; | - | ||||||||||||||||||||||||||||||||||||
454 | written = ret; | - | ||||||||||||||||||||||||||||||||||||
455 | ret = 1; | - | ||||||||||||||||||||||||||||||||||||
456 | } executed 6180367 times by 1 test: end of block Executed by:
| 6180367 | ||||||||||||||||||||||||||||||||||||
457 | - | |||||||||||||||||||||||||||||||||||||
458 | if (b->callback !=
| 1-6180366 | ||||||||||||||||||||||||||||||||||||
459 | ((void *)0)
| 1-6180366 | ||||||||||||||||||||||||||||||||||||
460 | || b->callback_ex !=
| 0-6180366 | ||||||||||||||||||||||||||||||||||||
461 | ((void *)0)
| 0-6180366 | ||||||||||||||||||||||||||||||||||||
462 | ) | - | ||||||||||||||||||||||||||||||||||||
463 | ret = (int)bio_call_callback(b, 0x04 | 0x80, buf, 0, 0, executed 1 time by 1 test: ret = (int)bio_call_callback(b, 0x04 | 0x80, buf, 0, 0, 0L, ret, &written); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
464 | 0L, ret, &written); executed 1 time by 1 test: ret = (int)bio_call_callback(b, 0x04 | 0x80, buf, 0, 0, 0L, ret, &written); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
465 | - | |||||||||||||||||||||||||||||||||||||
466 | if (ret > 0
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
467 | if (written > 0x7fffffff
| 0-6180367 | ||||||||||||||||||||||||||||||||||||
468 | ERR_put_error(32,(110),(102),__FILE__,422); | - | ||||||||||||||||||||||||||||||||||||
469 | ret = -1; | - | ||||||||||||||||||||||||||||||||||||
470 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
471 | ret = (int)written; | - | ||||||||||||||||||||||||||||||||||||
472 | } executed 6180367 times by 1 test: end of block Executed by:
| 6180367 | ||||||||||||||||||||||||||||||||||||
473 | } | - | ||||||||||||||||||||||||||||||||||||
474 | - | |||||||||||||||||||||||||||||||||||||
475 | return executed 6180367 times by 1 test: ret;return ret; Executed by:
executed 6180367 times by 1 test: return ret; Executed by:
| 6180367 | ||||||||||||||||||||||||||||||||||||
476 | } | - | ||||||||||||||||||||||||||||||||||||
477 | - | |||||||||||||||||||||||||||||||||||||
478 | int BIO_gets(BIO *b, char *buf, int size) | - | ||||||||||||||||||||||||||||||||||||
479 | { | - | ||||||||||||||||||||||||||||||||||||
480 | int ret; | - | ||||||||||||||||||||||||||||||||||||
481 | size_t readbytes = 0; | - | ||||||||||||||||||||||||||||||||||||
482 | - | |||||||||||||||||||||||||||||||||||||
483 | if ((
| 0-507747 | ||||||||||||||||||||||||||||||||||||
484 | ((void *)0)
| 0-507747 | ||||||||||||||||||||||||||||||||||||
485 | )
| 0-507747 | ||||||||||||||||||||||||||||||||||||
486 | ((void *)0)
| 0-507747 | ||||||||||||||||||||||||||||||||||||
487 | )
| 0-507747 | ||||||||||||||||||||||||||||||||||||
488 | ((void *)0)
| 0-507747 | ||||||||||||||||||||||||||||||||||||
489 | )
| 0-507747 | ||||||||||||||||||||||||||||||||||||
490 | ERR_put_error(32,(104),(121),__FILE__,438); | - | ||||||||||||||||||||||||||||||||||||
491 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||||||||
492 | } | - | ||||||||||||||||||||||||||||||||||||
493 | - | |||||||||||||||||||||||||||||||||||||
494 | if (size < 0
| 0-507747 | ||||||||||||||||||||||||||||||||||||
495 | ERR_put_error(32,(104),(125),__FILE__,443); | - | ||||||||||||||||||||||||||||||||||||
496 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
497 | } | - | ||||||||||||||||||||||||||||||||||||
498 | - | |||||||||||||||||||||||||||||||||||||
499 | if (b->callback !=
| 0-507747 | ||||||||||||||||||||||||||||||||||||
500 | ((void *)0)
| 0-507747 | ||||||||||||||||||||||||||||||||||||
501 | || b->callback_ex !=
| 0-507747 | ||||||||||||||||||||||||||||||||||||
502 | ((void *)0)
| 0-507747 | ||||||||||||||||||||||||||||||||||||
503 | ) { | - | ||||||||||||||||||||||||||||||||||||
504 | ret = (int)bio_call_callback(b, 0x05, buf, size, 0, 0L, 1, | - | ||||||||||||||||||||||||||||||||||||
505 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
506 | ); | - | ||||||||||||||||||||||||||||||||||||
507 | if (ret <= 0
| 0 | ||||||||||||||||||||||||||||||||||||
508 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
509 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
510 | - | |||||||||||||||||||||||||||||||||||||
511 | if (!b->init
| 0-507747 | ||||||||||||||||||||||||||||||||||||
512 | ERR_put_error(32,(104),(120),__FILE__,454); | - | ||||||||||||||||||||||||||||||||||||
513 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||||||||
514 | } | - | ||||||||||||||||||||||||||||||||||||
515 | - | |||||||||||||||||||||||||||||||||||||
516 | ret = b->method->bgets(b, buf, size); | - | ||||||||||||||||||||||||||||||||||||
517 | - | |||||||||||||||||||||||||||||||||||||
518 | if (ret > 0
| 7064-500683 | ||||||||||||||||||||||||||||||||||||
519 | readbytes = ret; | - | ||||||||||||||||||||||||||||||||||||
520 | ret = 1; | - | ||||||||||||||||||||||||||||||||||||
521 | } executed 500683 times by 1 test: end of block Executed by:
| 500683 | ||||||||||||||||||||||||||||||||||||
522 | - | |||||||||||||||||||||||||||||||||||||
523 | if (b->callback !=
| 0-507747 | ||||||||||||||||||||||||||||||||||||
524 | ((void *)0)
| 0-507747 | ||||||||||||||||||||||||||||||||||||
525 | || b->callback_ex !=
| 0-507747 | ||||||||||||||||||||||||||||||||||||
526 | ((void *)0)
| 0-507747 | ||||||||||||||||||||||||||||||||||||
527 | ) | - | ||||||||||||||||||||||||||||||||||||
528 | ret = (int)bio_call_callback(b, 0x05 | 0x80, buf, size, never executed: ret = (int)bio_call_callback(b, 0x05 | 0x80, buf, size, 0, 0L, ret, &readbytes); | 0 | ||||||||||||||||||||||||||||||||||||
529 | 0, 0L, ret, &readbytes); never executed: ret = (int)bio_call_callback(b, 0x05 | 0x80, buf, size, 0, 0L, ret, &readbytes); | 0 | ||||||||||||||||||||||||||||||||||||
530 | - | |||||||||||||||||||||||||||||||||||||
531 | if (ret > 0
| 7064-500683 | ||||||||||||||||||||||||||||||||||||
532 | - | |||||||||||||||||||||||||||||||||||||
533 | if (readbytes > (size_t)size
| 0-500683 | ||||||||||||||||||||||||||||||||||||
534 | ret = -1; never executed: ret = -1; | 0 | ||||||||||||||||||||||||||||||||||||
535 | else | - | ||||||||||||||||||||||||||||||||||||
536 | ret = (int)readbytes; executed 500683 times by 1 test: ret = (int)readbytes; Executed by:
| 500683 | ||||||||||||||||||||||||||||||||||||
537 | } | - | ||||||||||||||||||||||||||||||||||||
538 | - | |||||||||||||||||||||||||||||||||||||
539 | return executed 507747 times by 1 test: ret;return ret; Executed by:
executed 507747 times by 1 test: return ret; Executed by:
| 507747 | ||||||||||||||||||||||||||||||||||||
540 | } | - | ||||||||||||||||||||||||||||||||||||
541 | - | |||||||||||||||||||||||||||||||||||||
542 | int BIO_indent(BIO *b, int indent, int max) | - | ||||||||||||||||||||||||||||||||||||
543 | { | - | ||||||||||||||||||||||||||||||||||||
544 | if (indent < 0
| 0-1476595 | ||||||||||||||||||||||||||||||||||||
545 | indent = 0; never executed: indent = 0; | 0 | ||||||||||||||||||||||||||||||||||||
546 | if (indent > max
| 0-1476595 | ||||||||||||||||||||||||||||||||||||
547 | indent = max; never executed: indent = max; | 0 | ||||||||||||||||||||||||||||||||||||
548 | while (indent--
| 1476595-5429877 | ||||||||||||||||||||||||||||||||||||
549 | if (BIO_puts(b, " ") != 1
| 0-5429877 | ||||||||||||||||||||||||||||||||||||
550 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
551 | return executed 1476595 times by 1 test: 1;return 1; Executed by:
executed 1476595 times by 1 test: return 1; Executed by:
| 1476595 | ||||||||||||||||||||||||||||||||||||
552 | } | - | ||||||||||||||||||||||||||||||||||||
553 | - | |||||||||||||||||||||||||||||||||||||
554 | long BIO_int_ctrl(BIO *b, int cmd, long larg, int iarg) | - | ||||||||||||||||||||||||||||||||||||
555 | { | - | ||||||||||||||||||||||||||||||||||||
556 | int i; | - | ||||||||||||||||||||||||||||||||||||
557 | - | |||||||||||||||||||||||||||||||||||||
558 | i = iarg; | - | ||||||||||||||||||||||||||||||||||||
559 | return executed 9822 times by 1 test: BIO_ctrl(b, cmd, larg, (char *)&i);return BIO_ctrl(b, cmd, larg, (char *)&i); Executed by:
executed 9822 times by 1 test: return BIO_ctrl(b, cmd, larg, (char *)&i); Executed by:
| 9822 | ||||||||||||||||||||||||||||||||||||
560 | } | - | ||||||||||||||||||||||||||||||||||||
561 | - | |||||||||||||||||||||||||||||||||||||
562 | void *BIO_ptr_ctrl(BIO *b, int cmd, long larg) | - | ||||||||||||||||||||||||||||||||||||
563 | { | - | ||||||||||||||||||||||||||||||||||||
564 | void *p = | - | ||||||||||||||||||||||||||||||||||||
565 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
566 | ; | - | ||||||||||||||||||||||||||||||||||||
567 | - | |||||||||||||||||||||||||||||||||||||
568 | if (BIO_ctrl(b, cmd, larg, (char *)&p) <= 0
| 0-2 | ||||||||||||||||||||||||||||||||||||
569 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
570 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
571 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
572 | else | - | ||||||||||||||||||||||||||||||||||||
573 | return executed 2 times by 1 test: p;return p; Executed by:
executed 2 times by 1 test: return p; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
574 | } | - | ||||||||||||||||||||||||||||||||||||
575 | - | |||||||||||||||||||||||||||||||||||||
576 | long BIO_ctrl(BIO *b, int cmd, long larg, void *parg) | - | ||||||||||||||||||||||||||||||||||||
577 | { | - | ||||||||||||||||||||||||||||||||||||
578 | long ret; | - | ||||||||||||||||||||||||||||||||||||
579 | - | |||||||||||||||||||||||||||||||||||||
580 | if (b ==
| 0-330333 | ||||||||||||||||||||||||||||||||||||
581 | ((void *)0)
| 0-330333 | ||||||||||||||||||||||||||||||||||||
582 | ) | - | ||||||||||||||||||||||||||||||||||||
583 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
584 | - | |||||||||||||||||||||||||||||||||||||
585 | if ((
| 0-330333 | ||||||||||||||||||||||||||||||||||||
586 | ((void *)0)
| 0-330333 | ||||||||||||||||||||||||||||||||||||
587 | )
| 0-330333 | ||||||||||||||||||||||||||||||||||||
588 | ((void *)0)
| 0-330333 | ||||||||||||||||||||||||||||||||||||
589 | )
| 0-330333 | ||||||||||||||||||||||||||||||||||||
590 | ERR_put_error(32,(103),(121),__FILE__,518); | - | ||||||||||||||||||||||||||||||||||||
591 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||||||||
592 | } | - | ||||||||||||||||||||||||||||||||||||
593 | - | |||||||||||||||||||||||||||||||||||||
594 | if (b->callback !=
| 0-330333 | ||||||||||||||||||||||||||||||||||||
595 | ((void *)0)
| 0-330333 | ||||||||||||||||||||||||||||||||||||
596 | || b->callback_ex !=
| 0-330333 | ||||||||||||||||||||||||||||||||||||
597 | ((void *)0)
| 0-330333 | ||||||||||||||||||||||||||||||||||||
598 | ) { | - | ||||||||||||||||||||||||||||||||||||
599 | ret = bio_call_callback(b, 0x06, parg, 0, cmd, larg, 1L, | - | ||||||||||||||||||||||||||||||||||||
600 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
601 | ); | - | ||||||||||||||||||||||||||||||||||||
602 | if (ret <= 0
| 0 | ||||||||||||||||||||||||||||||||||||
603 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
604 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
605 | - | |||||||||||||||||||||||||||||||||||||
606 | ret = b->method->ctrl(b, cmd, larg, parg); | - | ||||||||||||||||||||||||||||||||||||
607 | - | |||||||||||||||||||||||||||||||||||||
608 | if (b->callback !=
| 0-330333 | ||||||||||||||||||||||||||||||||||||
609 | ((void *)0)
| 0-330333 | ||||||||||||||||||||||||||||||||||||
610 | || b->callback_ex !=
| 0-330333 | ||||||||||||||||||||||||||||||||||||
611 | ((void *)0)
| 0-330333 | ||||||||||||||||||||||||||||||||||||
612 | ) | - | ||||||||||||||||||||||||||||||||||||
613 | ret = bio_call_callback(b, 0x06 | 0x80, parg, 0, cmd, never executed: ret = bio_call_callback(b, 0x06 | 0x80, parg, 0, cmd, larg, ret, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
614 | larg, ret, never executed: ret = bio_call_callback(b, 0x06 | 0x80, parg, 0, cmd, larg, ret, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
615 | ((void *)0) never executed: ret = bio_call_callback(b, 0x06 | 0x80, parg, 0, cmd, larg, ret, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
616 | ); never executed: ret = bio_call_callback(b, 0x06 | 0x80, parg, 0, cmd, larg, ret, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
617 | - | |||||||||||||||||||||||||||||||||||||
618 | return executed 330333 times by 12 tests: ret;return ret; Executed by:
executed 330333 times by 12 tests: return ret; Executed by:
| 330333 | ||||||||||||||||||||||||||||||||||||
619 | } | - | ||||||||||||||||||||||||||||||||||||
620 | - | |||||||||||||||||||||||||||||||||||||
621 | long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) | - | ||||||||||||||||||||||||||||||||||||
622 | { | - | ||||||||||||||||||||||||||||||||||||
623 | long ret; | - | ||||||||||||||||||||||||||||||||||||
624 | - | |||||||||||||||||||||||||||||||||||||
625 | if (b ==
| 0 | ||||||||||||||||||||||||||||||||||||
626 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
627 | ) | - | ||||||||||||||||||||||||||||||||||||
628 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
629 | - | |||||||||||||||||||||||||||||||||||||
630 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
631 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
632 | )
| 0 | ||||||||||||||||||||||||||||||||||||
633 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
634 | )
| 0 | ||||||||||||||||||||||||||||||||||||
635 | || (
| 0 | ||||||||||||||||||||||||||||||||||||
636 | ERR_put_error(32,(131),(121),__FILE__,546); | - | ||||||||||||||||||||||||||||||||||||
637 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||||||||
638 | } | - | ||||||||||||||||||||||||||||||||||||
639 | - | |||||||||||||||||||||||||||||||||||||
640 | if (b->callback !=
| 0 | ||||||||||||||||||||||||||||||||||||
641 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
642 | || b->callback_ex !=
| 0 | ||||||||||||||||||||||||||||||||||||
643 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
644 | ) { | - | ||||||||||||||||||||||||||||||||||||
645 | ret = bio_call_callback(b, 0x06, (void *)&fp, 0, cmd, 0, 1L, | - | ||||||||||||||||||||||||||||||||||||
646 | - | |||||||||||||||||||||||||||||||||||||
647 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
648 | ); | - | ||||||||||||||||||||||||||||||||||||
649 | if (ret <= 0
| 0 | ||||||||||||||||||||||||||||||||||||
650 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
651 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
652 | - | |||||||||||||||||||||||||||||||||||||
653 | ret = b->method->callback_ctrl(b, cmd, fp); | - | ||||||||||||||||||||||||||||||||||||
654 | - | |||||||||||||||||||||||||||||||||||||
655 | if (b->callback !=
| 0 | ||||||||||||||||||||||||||||||||||||
656 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
657 | || b->callback_ex !=
| 0 | ||||||||||||||||||||||||||||||||||||
658 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
659 | ) | - | ||||||||||||||||||||||||||||||||||||
660 | ret = bio_call_callback(b, 0x06 | 0x80, (void *)&fp, 0, never executed: ret = bio_call_callback(b, 0x06 | 0x80, (void *)&fp, 0, cmd, 0, ret, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
661 | cmd, 0, ret, never executed: ret = bio_call_callback(b, 0x06 | 0x80, (void *)&fp, 0, cmd, 0, ret, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
662 | ((void *)0) never executed: ret = bio_call_callback(b, 0x06 | 0x80, (void *)&fp, 0, cmd, 0, ret, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
663 | ); never executed: ret = bio_call_callback(b, 0x06 | 0x80, (void *)&fp, 0, cmd, 0, ret, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
664 | - | |||||||||||||||||||||||||||||||||||||
665 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
666 | } | - | ||||||||||||||||||||||||||||||||||||
667 | - | |||||||||||||||||||||||||||||||||||||
668 | - | |||||||||||||||||||||||||||||||||||||
669 | - | |||||||||||||||||||||||||||||||||||||
670 | - | |||||||||||||||||||||||||||||||||||||
671 | - | |||||||||||||||||||||||||||||||||||||
672 | - | |||||||||||||||||||||||||||||||||||||
673 | size_t BIO_ctrl_pending(BIO *bio) | - | ||||||||||||||||||||||||||||||||||||
674 | { | - | ||||||||||||||||||||||||||||||||||||
675 | return executed 3225 times by 1 test: BIO_ctrl(bio, 10, 0, return BIO_ctrl(bio, 10, 0, ((void *)0) ); Executed by:
executed 3225 times by 1 test: return BIO_ctrl(bio, 10, 0, ((void *)0) ); Executed by:
| 3225 | ||||||||||||||||||||||||||||||||||||
676 | ((void *)0) executed 3225 times by 1 test: return BIO_ctrl(bio, 10, 0, ((void *)0) ); Executed by:
| 3225 | ||||||||||||||||||||||||||||||||||||
677 | ); executed 3225 times by 1 test: return BIO_ctrl(bio, 10, 0, ((void *)0) ); Executed by:
| 3225 | ||||||||||||||||||||||||||||||||||||
678 | } | - | ||||||||||||||||||||||||||||||||||||
679 | - | |||||||||||||||||||||||||||||||||||||
680 | size_t BIO_ctrl_wpending(BIO *bio) | - | ||||||||||||||||||||||||||||||||||||
681 | { | - | ||||||||||||||||||||||||||||||||||||
682 | return never executed: BIO_ctrl(bio, 13, 0, return BIO_ctrl(bio, 13, 0, ((void *)0) ); never executed: return BIO_ctrl(bio, 13, 0, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
683 | ((void *)0) never executed: return BIO_ctrl(bio, 13, 0, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
684 | ); never executed: return BIO_ctrl(bio, 13, 0, ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
685 | } | - | ||||||||||||||||||||||||||||||||||||
686 | - | |||||||||||||||||||||||||||||||||||||
687 | - | |||||||||||||||||||||||||||||||||||||
688 | BIO *BIO_push(BIO *b, BIO *bio) | - | ||||||||||||||||||||||||||||||||||||
689 | { | - | ||||||||||||||||||||||||||||||||||||
690 | BIO *lb; | - | ||||||||||||||||||||||||||||||||||||
691 | - | |||||||||||||||||||||||||||||||||||||
692 | if (b ==
| 0-49329 | ||||||||||||||||||||||||||||||||||||
693 | ((void *)0)
| 0-49329 | ||||||||||||||||||||||||||||||||||||
694 | ) | - | ||||||||||||||||||||||||||||||||||||
695 | return never executed: bio;return bio; never executed: return bio; | 0 | ||||||||||||||||||||||||||||||||||||
696 | lb = b; | - | ||||||||||||||||||||||||||||||||||||
697 | while (lb->next_bio !=
| 0-49329 | ||||||||||||||||||||||||||||||||||||
698 | ((void *)0)
| 0-49329 | ||||||||||||||||||||||||||||||||||||
699 | ) | - | ||||||||||||||||||||||||||||||||||||
700 | lb = lb->next_bio; never executed: lb = lb->next_bio; | 0 | ||||||||||||||||||||||||||||||||||||
701 | lb->next_bio = bio; | - | ||||||||||||||||||||||||||||||||||||
702 | if (bio !=
| 2-49327 | ||||||||||||||||||||||||||||||||||||
703 | ((void *)0)
| 2-49327 | ||||||||||||||||||||||||||||||||||||
704 | ) | - | ||||||||||||||||||||||||||||||||||||
705 | bio->prev_bio = lb; executed 49327 times by 12 tests: bio->prev_bio = lb; Executed by:
| 49327 | ||||||||||||||||||||||||||||||||||||
706 | - | |||||||||||||||||||||||||||||||||||||
707 | BIO_ctrl(b, 6, 0, lb); | - | ||||||||||||||||||||||||||||||||||||
708 | return executed 49329 times by 12 tests: b;return b; Executed by:
executed 49329 times by 12 tests: return b; Executed by:
| 49329 | ||||||||||||||||||||||||||||||||||||
709 | } | - | ||||||||||||||||||||||||||||||||||||
710 | - | |||||||||||||||||||||||||||||||||||||
711 | - | |||||||||||||||||||||||||||||||||||||
712 | BIO *BIO_pop(BIO *b) | - | ||||||||||||||||||||||||||||||||||||
713 | { | - | ||||||||||||||||||||||||||||||||||||
714 | BIO *ret; | - | ||||||||||||||||||||||||||||||||||||
715 | - | |||||||||||||||||||||||||||||||||||||
716 | if (b ==
| 0-9518 | ||||||||||||||||||||||||||||||||||||
717 | ((void *)0)
| 0-9518 | ||||||||||||||||||||||||||||||||||||
718 | ) | - | ||||||||||||||||||||||||||||||||||||
719 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
720 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
721 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
722 | ret = b->next_bio; | - | ||||||||||||||||||||||||||||||||||||
723 | - | |||||||||||||||||||||||||||||||||||||
724 | BIO_ctrl(b, 7, 0, b); | - | ||||||||||||||||||||||||||||||||||||
725 | - | |||||||||||||||||||||||||||||||||||||
726 | if (b->prev_bio !=
| 3-9515 | ||||||||||||||||||||||||||||||||||||
727 | ((void *)0)
| 3-9515 | ||||||||||||||||||||||||||||||||||||
728 | ) | - | ||||||||||||||||||||||||||||||||||||
729 | b->prev_bio->next_bio = b->next_bio; executed 3 times by 1 test: b->prev_bio->next_bio = b->next_bio; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
730 | if (b->next_bio !=
| 5-9513 | ||||||||||||||||||||||||||||||||||||
731 | ((void *)0)
| 5-9513 | ||||||||||||||||||||||||||||||||||||
732 | ) | - | ||||||||||||||||||||||||||||||||||||
733 | b->next_bio->prev_bio = b->prev_bio; executed 9513 times by 1 test: b->next_bio->prev_bio = b->prev_bio; Executed by:
| 9513 | ||||||||||||||||||||||||||||||||||||
734 | - | |||||||||||||||||||||||||||||||||||||
735 | b->next_bio = | - | ||||||||||||||||||||||||||||||||||||
736 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
737 | ; | - | ||||||||||||||||||||||||||||||||||||
738 | b->prev_bio = | - | ||||||||||||||||||||||||||||||||||||
739 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
740 | ; | - | ||||||||||||||||||||||||||||||||||||
741 | return executed 9518 times by 1 test: ret;return ret; Executed by:
executed 9518 times by 1 test: return ret; Executed by:
| 9518 | ||||||||||||||||||||||||||||||||||||
742 | } | - | ||||||||||||||||||||||||||||||||||||
743 | - | |||||||||||||||||||||||||||||||||||||
744 | BIO *BIO_get_retry_BIO(BIO *bio, int *reason) | - | ||||||||||||||||||||||||||||||||||||
745 | { | - | ||||||||||||||||||||||||||||||||||||
746 | BIO *b, *last; | - | ||||||||||||||||||||||||||||||||||||
747 | - | |||||||||||||||||||||||||||||||||||||
748 | b = last = bio; | - | ||||||||||||||||||||||||||||||||||||
749 | for (;;) { | - | ||||||||||||||||||||||||||||||||||||
750 | if (!BIO_test_flags(b, 0x08)
| 0 | ||||||||||||||||||||||||||||||||||||
751 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
752 | last = b; | - | ||||||||||||||||||||||||||||||||||||
753 | b = b->next_bio; | - | ||||||||||||||||||||||||||||||||||||
754 | if (b ==
| 0 | ||||||||||||||||||||||||||||||||||||
755 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
756 | ) | - | ||||||||||||||||||||||||||||||||||||
757 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
758 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
759 | if (reason !=
| 0 | ||||||||||||||||||||||||||||||||||||
760 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
761 | ) | - | ||||||||||||||||||||||||||||||||||||
762 | * never executed: reason = last->retry_reason;*reason = last->retry_reason; never executed: *reason = last->retry_reason; | 0 | ||||||||||||||||||||||||||||||||||||
763 | return never executed: last;return last; never executed: return last; | 0 | ||||||||||||||||||||||||||||||||||||
764 | } | - | ||||||||||||||||||||||||||||||||||||
765 | - | |||||||||||||||||||||||||||||||||||||
766 | int BIO_get_retry_reason(BIO *bio) | - | ||||||||||||||||||||||||||||||||||||
767 | { | - | ||||||||||||||||||||||||||||||||||||
768 | return never executed: bio->retry_reason;return bio->retry_reason; never executed: return bio->retry_reason; | 0 | ||||||||||||||||||||||||||||||||||||
769 | } | - | ||||||||||||||||||||||||||||||||||||
770 | - | |||||||||||||||||||||||||||||||||||||
771 | void BIO_set_retry_reason(BIO *bio, int reason) | - | ||||||||||||||||||||||||||||||||||||
772 | { | - | ||||||||||||||||||||||||||||||||||||
773 | bio->retry_reason = reason; | - | ||||||||||||||||||||||||||||||||||||
774 | } executed 13307 times by 1 test: end of block Executed by:
| 13307 | ||||||||||||||||||||||||||||||||||||
775 | - | |||||||||||||||||||||||||||||||||||||
776 | BIO *BIO_find_type(BIO *bio, int type) | - | ||||||||||||||||||||||||||||||||||||
777 | { | - | ||||||||||||||||||||||||||||||||||||
778 | int mt, mask; | - | ||||||||||||||||||||||||||||||||||||
779 | - | |||||||||||||||||||||||||||||||||||||
780 | if (bio ==
| 0-4337 | ||||||||||||||||||||||||||||||||||||
781 | ((void *)0)
| 0-4337 | ||||||||||||||||||||||||||||||||||||
782 | ) | - | ||||||||||||||||||||||||||||||||||||
783 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
784 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
785 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
786 | mask = type & 0xff; | - | ||||||||||||||||||||||||||||||||||||
787 | do { | - | ||||||||||||||||||||||||||||||||||||
788 | if (bio->method !=
| 0-4348 | ||||||||||||||||||||||||||||||||||||
789 | ((void *)0)
| 0-4348 | ||||||||||||||||||||||||||||||||||||
790 | ) { | - | ||||||||||||||||||||||||||||||||||||
791 | mt = bio->method->type; | - | ||||||||||||||||||||||||||||||||||||
792 | - | |||||||||||||||||||||||||||||||||||||
793 | if (!mask
| 192-4156 | ||||||||||||||||||||||||||||||||||||
794 | if (mt & type
| 0-4156 | ||||||||||||||||||||||||||||||||||||
795 | return executed 4156 times by 1 test: bio;return bio; Executed by:
executed 4156 times by 1 test: return bio; Executed by:
| 4156 | ||||||||||||||||||||||||||||||||||||
796 | } never executed: else if (mt == typeend of block
| 0-181 | ||||||||||||||||||||||||||||||||||||
797 | return executed 181 times by 1 test: bio;return bio; Executed by:
executed 181 times by 1 test: return bio; Executed by:
| 181 | ||||||||||||||||||||||||||||||||||||
798 | } executed 11 times by 1 test: end of block Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||
799 | bio = bio->next_bio; | - | ||||||||||||||||||||||||||||||||||||
800 | } executed 11 times by 1 test: while (bio != end of block Executed by:
| 0-11 | ||||||||||||||||||||||||||||||||||||
801 | ((void *)0)
| 0-11 | ||||||||||||||||||||||||||||||||||||
802 | ); | - | ||||||||||||||||||||||||||||||||||||
803 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
804 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
805 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
806 | } | - | ||||||||||||||||||||||||||||||||||||
807 | - | |||||||||||||||||||||||||||||||||||||
808 | BIO *BIO_next(BIO *b) | - | ||||||||||||||||||||||||||||||||||||
809 | { | - | ||||||||||||||||||||||||||||||||||||
810 | if (b ==
| 0-336075 | ||||||||||||||||||||||||||||||||||||
811 | ((void *)0)
| 0-336075 | ||||||||||||||||||||||||||||||||||||
812 | ) | - | ||||||||||||||||||||||||||||||||||||
813 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
814 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
815 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
816 | return executed 336075 times by 12 tests: b->next_bio;return b->next_bio; Executed by:
executed 336075 times by 12 tests: return b->next_bio; Executed by:
| 336075 | ||||||||||||||||||||||||||||||||||||
817 | } | - | ||||||||||||||||||||||||||||||||||||
818 | - | |||||||||||||||||||||||||||||||||||||
819 | void BIO_set_next(BIO *b, BIO *next) | - | ||||||||||||||||||||||||||||||||||||
820 | { | - | ||||||||||||||||||||||||||||||||||||
821 | b->next_bio = next; | - | ||||||||||||||||||||||||||||||||||||
822 | } executed 483 times by 1 test: end of block Executed by:
| 483 | ||||||||||||||||||||||||||||||||||||
823 | - | |||||||||||||||||||||||||||||||||||||
824 | void BIO_free_all(BIO *bio) | - | ||||||||||||||||||||||||||||||||||||
825 | { | - | ||||||||||||||||||||||||||||||||||||
826 | BIO *b; | - | ||||||||||||||||||||||||||||||||||||
827 | int ref; | - | ||||||||||||||||||||||||||||||||||||
828 | - | |||||||||||||||||||||||||||||||||||||
829 | while (bio !=
| 70378-96843 | ||||||||||||||||||||||||||||||||||||
830 | ((void *)0)
| 70378-96843 | ||||||||||||||||||||||||||||||||||||
831 | ) { | - | ||||||||||||||||||||||||||||||||||||
832 | b = bio; | - | ||||||||||||||||||||||||||||||||||||
833 | ref = b->references; | - | ||||||||||||||||||||||||||||||||||||
834 | bio = bio->next_bio; | - | ||||||||||||||||||||||||||||||||||||
835 | BIO_free(b); | - | ||||||||||||||||||||||||||||||||||||
836 | - | |||||||||||||||||||||||||||||||||||||
837 | if (ref > 1
| 4602-92241 | ||||||||||||||||||||||||||||||||||||
838 | break; executed 4602 times by 1 test: break; Executed by:
| 4602 | ||||||||||||||||||||||||||||||||||||
839 | } executed 92241 times by 12 tests: end of block Executed by:
| 92241 | ||||||||||||||||||||||||||||||||||||
840 | } executed 74980 times by 12 tests: end of block Executed by:
| 74980 | ||||||||||||||||||||||||||||||||||||
841 | - | |||||||||||||||||||||||||||||||||||||
842 | BIO *BIO_dup_chain(BIO *in) | - | ||||||||||||||||||||||||||||||||||||
843 | { | - | ||||||||||||||||||||||||||||||||||||
844 | BIO *ret = | - | ||||||||||||||||||||||||||||||||||||
845 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
846 | , *eoc = | - | ||||||||||||||||||||||||||||||||||||
847 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
848 | , *bio, *new_bio; | - | ||||||||||||||||||||||||||||||||||||
849 | - | |||||||||||||||||||||||||||||||||||||
850 | for (bio = in; bio !=
| 0 | ||||||||||||||||||||||||||||||||||||
851 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
852 | ; bio = bio->next_bio) { | - | ||||||||||||||||||||||||||||||||||||
853 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
854 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
855 | ) | - | ||||||||||||||||||||||||||||||||||||
856 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
857 | new_bio->callback = bio->callback; | - | ||||||||||||||||||||||||||||||||||||
858 | new_bio->callback_ex = bio->callback_ex; | - | ||||||||||||||||||||||||||||||||||||
859 | new_bio->cb_arg = bio->cb_arg; | - | ||||||||||||||||||||||||||||||||||||
860 | new_bio->init = bio->init; | - | ||||||||||||||||||||||||||||||||||||
861 | new_bio->shutdown = bio->shutdown; | - | ||||||||||||||||||||||||||||||||||||
862 | new_bio->flags = bio->flags; | - | ||||||||||||||||||||||||||||||||||||
863 | - | |||||||||||||||||||||||||||||||||||||
864 | - | |||||||||||||||||||||||||||||||||||||
865 | new_bio->num = bio->num; | - | ||||||||||||||||||||||||||||||||||||
866 | - | |||||||||||||||||||||||||||||||||||||
867 | if (!BIO_ctrl(bio,12,0,(char *)((char *)new_bio))
| 0 | ||||||||||||||||||||||||||||||||||||
868 | BIO_free(new_bio); | - | ||||||||||||||||||||||||||||||||||||
869 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
870 | } | - | ||||||||||||||||||||||||||||||||||||
871 | - | |||||||||||||||||||||||||||||||||||||
872 | - | |||||||||||||||||||||||||||||||||||||
873 | if (!CRYPTO_dup_ex_data(12, &new_bio->ex_data,
| 0 | ||||||||||||||||||||||||||||||||||||
874 | &bio->ex_data)
| 0 | ||||||||||||||||||||||||||||||||||||
875 | BIO_free(new_bio); | - | ||||||||||||||||||||||||||||||||||||
876 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
877 | } | - | ||||||||||||||||||||||||||||||||||||
878 | - | |||||||||||||||||||||||||||||||||||||
879 | if (ret ==
| 0 | ||||||||||||||||||||||||||||||||||||
880 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
881 | ) { | - | ||||||||||||||||||||||||||||||||||||
882 | eoc = new_bio; | - | ||||||||||||||||||||||||||||||||||||
883 | ret = eoc; | - | ||||||||||||||||||||||||||||||||||||
884 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
885 | BIO_push(eoc, new_bio); | - | ||||||||||||||||||||||||||||||||||||
886 | eoc = new_bio; | - | ||||||||||||||||||||||||||||||||||||
887 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
888 | } | - | ||||||||||||||||||||||||||||||||||||
889 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
890 | err: | - | ||||||||||||||||||||||||||||||||||||
891 | BIO_free_all(ret); | - | ||||||||||||||||||||||||||||||||||||
892 | - | |||||||||||||||||||||||||||||||||||||
893 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
894 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
895 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
896 | } | - | ||||||||||||||||||||||||||||||||||||
897 | - | |||||||||||||||||||||||||||||||||||||
898 | void BIO_copy_next_retry(BIO *b) | - | ||||||||||||||||||||||||||||||||||||
899 | { | - | ||||||||||||||||||||||||||||||||||||
900 | BIO_set_flags(b, BIO_test_flags(b->next_bio, ((0x01|0x02|0x04)|0x08))); | - | ||||||||||||||||||||||||||||||||||||
901 | b->retry_reason = b->next_bio->retry_reason; | - | ||||||||||||||||||||||||||||||||||||
902 | } executed 262367 times by 1 test: end of block Executed by:
| 262367 | ||||||||||||||||||||||||||||||||||||
903 | - | |||||||||||||||||||||||||||||||||||||
904 | int BIO_set_ex_data(BIO *bio, int idx, void *data) | - | ||||||||||||||||||||||||||||||||||||
905 | { | - | ||||||||||||||||||||||||||||||||||||
906 | return never executed: CRYPTO_set_ex_data(&(bio->ex_data), idx, data);return CRYPTO_set_ex_data(&(bio->ex_data), idx, data); never executed: return CRYPTO_set_ex_data(&(bio->ex_data), idx, data); | 0 | ||||||||||||||||||||||||||||||||||||
907 | } | - | ||||||||||||||||||||||||||||||||||||
908 | - | |||||||||||||||||||||||||||||||||||||
909 | void *BIO_get_ex_data(BIO *bio, int idx) | - | ||||||||||||||||||||||||||||||||||||
910 | { | - | ||||||||||||||||||||||||||||||||||||
911 | return never executed: CRYPTO_get_ex_data(&(bio->ex_data), idx);return CRYPTO_get_ex_data(&(bio->ex_data), idx); never executed: return CRYPTO_get_ex_data(&(bio->ex_data), idx); | 0 | ||||||||||||||||||||||||||||||||||||
912 | } | - | ||||||||||||||||||||||||||||||||||||
913 | - | |||||||||||||||||||||||||||||||||||||
914 | uint64_t BIO_number_read(BIO *bio) | - | ||||||||||||||||||||||||||||||||||||
915 | { | - | ||||||||||||||||||||||||||||||||||||
916 | if (bio
| 0-191 | ||||||||||||||||||||||||||||||||||||
917 | return executed 191 times by 1 test: bio->num_read;return bio->num_read; Executed by:
executed 191 times by 1 test: return bio->num_read; Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
918 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
919 | } | - | ||||||||||||||||||||||||||||||||||||
920 | - | |||||||||||||||||||||||||||||||||||||
921 | uint64_t BIO_number_written(BIO *bio) | - | ||||||||||||||||||||||||||||||||||||
922 | { | - | ||||||||||||||||||||||||||||||||||||
923 | if (bio
| 0-191 | ||||||||||||||||||||||||||||||||||||
924 | return executed 191 times by 1 test: bio->num_write;return bio->num_write; Executed by:
executed 191 times by 1 test: return bio->num_write; Executed by:
| 191 | ||||||||||||||||||||||||||||||||||||
925 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
926 | } | - | ||||||||||||||||||||||||||||||||||||
927 | - | |||||||||||||||||||||||||||||||||||||
928 | void bio_free_ex_data(BIO *bio) | - | ||||||||||||||||||||||||||||||||||||
929 | { | - | ||||||||||||||||||||||||||||||||||||
930 | CRYPTO_free_ex_data(12, bio, &bio->ex_data); | - | ||||||||||||||||||||||||||||||||||||
931 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
932 | - | |||||||||||||||||||||||||||||||||||||
933 | void bio_cleanup(void) | - | ||||||||||||||||||||||||||||||||||||
934 | { | - | ||||||||||||||||||||||||||||||||||||
935 | - | |||||||||||||||||||||||||||||||||||||
936 | bio_sock_cleanup_int(); | - | ||||||||||||||||||||||||||||||||||||
937 | CRYPTO_THREAD_lock_free(bio_lookup_lock); | - | ||||||||||||||||||||||||||||||||||||
938 | bio_lookup_lock = | - | ||||||||||||||||||||||||||||||||||||
939 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
940 | ; | - | ||||||||||||||||||||||||||||||||||||
941 | - | |||||||||||||||||||||||||||||||||||||
942 | CRYPTO_THREAD_lock_free(bio_type_lock); | - | ||||||||||||||||||||||||||||||||||||
943 | bio_type_lock = | - | ||||||||||||||||||||||||||||||||||||
944 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
945 | ; | - | ||||||||||||||||||||||||||||||||||||
946 | } executed 2076 times by 12 tests: end of block Executed by:
| 2076 | ||||||||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |