| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/bio/bio_lib.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||
| 2 | - | |||||||||||||||||||
| 3 | - | |||||||||||||||||||
| 4 | int | - | ||||||||||||||||||
| 5 | BIO_get_new_index(void) | - | ||||||||||||||||||
| 6 | { | - | ||||||||||||||||||
| 7 | static int bio_type_index = 128; | - | ||||||||||||||||||
| 8 | int index; | - | ||||||||||||||||||
| 9 | - | |||||||||||||||||||
| 10 | - | |||||||||||||||||||
| 11 | index = CRYPTO_add_lock(&bio_type_index,1,21,__FILE__,74); | - | ||||||||||||||||||
| 12 | if (index > 255
| 0 | ||||||||||||||||||
| 13 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||
| 14 | - | |||||||||||||||||||
| 15 | return never executed: index;return index;never executed: return index; | 0 | ||||||||||||||||||
| 16 | } | - | ||||||||||||||||||
| 17 | - | |||||||||||||||||||
| 18 | BIO * | - | ||||||||||||||||||
| 19 | BIO_new(const BIO_METHOD *method) | - | ||||||||||||||||||
| 20 | { | - | ||||||||||||||||||
| 21 | BIO *ret = | - | ||||||||||||||||||
| 22 | ((void *)0) | - | ||||||||||||||||||
| 23 | ; | - | ||||||||||||||||||
| 24 | - | |||||||||||||||||||
| 25 | ret = malloc(sizeof(BIO)); | - | ||||||||||||||||||
| 26 | if (ret ==
| 0-2194 | ||||||||||||||||||
| 27 | ((void *)0)
| 0-2194 | ||||||||||||||||||
| 28 | ) { | - | ||||||||||||||||||
| 29 | ERR_put_error(32,(0xfff),((1|64)),__FILE__,88); | - | ||||||||||||||||||
| 30 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 31 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 32 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 33 | } | - | ||||||||||||||||||
| 34 | if (!BIO_set(ret, method)
| 0-2194 | ||||||||||||||||||
| 35 | free(ret); | - | ||||||||||||||||||
| 36 | ret = | - | ||||||||||||||||||
| 37 | ((void *)0) | - | ||||||||||||||||||
| 38 | ; | - | ||||||||||||||||||
| 39 | } never executed: end of block | 0 | ||||||||||||||||||
| 40 | return executed 2194 times by 18 tests: (ret);return (ret);Executed by:
executed 2194 times by 18 tests: return (ret);Executed by:
| 2194 | ||||||||||||||||||
| 41 | } | - | ||||||||||||||||||
| 42 | - | |||||||||||||||||||
| 43 | int | - | ||||||||||||||||||
| 44 | BIO_set(BIO *bio, const BIO_METHOD *method) | - | ||||||||||||||||||
| 45 | { | - | ||||||||||||||||||
| 46 | bio->method = method; | - | ||||||||||||||||||
| 47 | bio->callback = | - | ||||||||||||||||||
| 48 | ((void *)0) | - | ||||||||||||||||||
| 49 | ; | - | ||||||||||||||||||
| 50 | bio->cb_arg = | - | ||||||||||||||||||
| 51 | ((void *)0) | - | ||||||||||||||||||
| 52 | ; | - | ||||||||||||||||||
| 53 | bio->init = 0; | - | ||||||||||||||||||
| 54 | bio->shutdown = 1; | - | ||||||||||||||||||
| 55 | bio->flags = 0; | - | ||||||||||||||||||
| 56 | bio->retry_reason = 0; | - | ||||||||||||||||||
| 57 | bio->num = 0; | - | ||||||||||||||||||
| 58 | bio->ptr = | - | ||||||||||||||||||
| 59 | ((void *)0) | - | ||||||||||||||||||
| 60 | ; | - | ||||||||||||||||||
| 61 | bio->prev_bio = | - | ||||||||||||||||||
| 62 | ((void *)0) | - | ||||||||||||||||||
| 63 | ; | - | ||||||||||||||||||
| 64 | bio->next_bio = | - | ||||||||||||||||||
| 65 | ((void *)0) | - | ||||||||||||||||||
| 66 | ; | - | ||||||||||||||||||
| 67 | bio->references = 1; | - | ||||||||||||||||||
| 68 | bio->num_read = 0L; | - | ||||||||||||||||||
| 69 | bio->num_write = 0L; | - | ||||||||||||||||||
| 70 | CRYPTO_new_ex_data(0, bio, &bio->ex_data); | - | ||||||||||||||||||
| 71 | if (method->create !=
| 4-2190 | ||||||||||||||||||
| 72 | ((void *)0)
| 4-2190 | ||||||||||||||||||
| 73 | ) | - | ||||||||||||||||||
| 74 | if (!method->create(bio)
| 0-2190 | ||||||||||||||||||
| 75 | CRYPTO_free_ex_data(0, bio, | - | ||||||||||||||||||
| 76 | &bio->ex_data); | - | ||||||||||||||||||
| 77 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 78 | } | - | ||||||||||||||||||
| 79 | return executed 2194 times by 18 tests: (1);return (1);Executed by:
executed 2194 times by 18 tests: return (1);Executed by:
| 2194 | ||||||||||||||||||
| 80 | } | - | ||||||||||||||||||
| 81 | - | |||||||||||||||||||
| 82 | int | - | ||||||||||||||||||
| 83 | BIO_free(BIO *a) | - | ||||||||||||||||||
| 84 | { | - | ||||||||||||||||||
| 85 | int i; | - | ||||||||||||||||||
| 86 | - | |||||||||||||||||||
| 87 | if (a ==
| 1177-2331 | ||||||||||||||||||
| 88 | ((void *)0)
| 1177-2331 | ||||||||||||||||||
| 89 | ) | - | ||||||||||||||||||
| 90 | return executed 1177 times by 12 tests: (0);return (0);Executed by:
executed 1177 times by 12 tests: return (0);Executed by:
| 1177 | ||||||||||||||||||
| 91 | - | |||||||||||||||||||
| 92 | i = CRYPTO_add_lock(&a->references,-1,21,__FILE__,133); | - | ||||||||||||||||||
| 93 | if (i > 0
| 144-2187 | ||||||||||||||||||
| 94 | return executed 144 times by 3 tests: (1);return (1);Executed by:
executed 144 times by 3 tests: return (1);Executed by:
| 144 | ||||||||||||||||||
| 95 | if ((
| 0-2187 | ||||||||||||||||||
| 96 | ((void *)0)
| 0-2187 | ||||||||||||||||||
| 97 | )
| 0-2187 | ||||||||||||||||||
| 98 | ((
| 0 | ||||||||||||||||||
| 99 | ((void *)0)
| 0 | ||||||||||||||||||
| 100 | , 0, 0L, 1L)) <= 0)
| 0 | ||||||||||||||||||
| 101 | return never executed: (i);return (i);never executed: return (i); | 0 | ||||||||||||||||||
| 102 | - | |||||||||||||||||||
| 103 | CRYPTO_free_ex_data(0, a, &a->ex_data); | - | ||||||||||||||||||
| 104 | - | |||||||||||||||||||
| 105 | if (a->method !=
| 0-2187 | ||||||||||||||||||
| 106 | ((void *)0)
| 0-2187 | ||||||||||||||||||
| 107 | && a->method->destroy !=
| 4-2183 | ||||||||||||||||||
| 108 | ((void *)0)
| 4-2183 | ||||||||||||||||||
| 109 | ) | - | ||||||||||||||||||
| 110 | a->method->destroy(a); executed 2183 times by 17 tests: a->method->destroy(a);Executed by:
| 2183 | ||||||||||||||||||
| 111 | free(a); | - | ||||||||||||||||||
| 112 | return executed 2187 times by 17 tests: (1);return (1);Executed by:
executed 2187 times by 17 tests: return (1);Executed by:
| 2187 | ||||||||||||||||||
| 113 | } | - | ||||||||||||||||||
| 114 | - | |||||||||||||||||||
| 115 | void | - | ||||||||||||||||||
| 116 | BIO_vfree(BIO *a) | - | ||||||||||||||||||
| 117 | { | - | ||||||||||||||||||
| 118 | BIO_free(a); | - | ||||||||||||||||||
| 119 | } never executed: end of block | 0 | ||||||||||||||||||
| 120 | - | |||||||||||||||||||
| 121 | int | - | ||||||||||||||||||
| 122 | BIO_up_ref(BIO *bio) | - | ||||||||||||||||||
| 123 | { | - | ||||||||||||||||||
| 124 | int refs = CRYPTO_add_lock(&bio->references,1,21,__FILE__,157); | - | ||||||||||||||||||
| 125 | return never executed: (return (refs > 1) ? 1 : 0;
never executed: return (refs > 1) ? 1 : 0; | 0 | ||||||||||||||||||
| 126 | } | - | ||||||||||||||||||
| 127 | - | |||||||||||||||||||
| 128 | void * | - | ||||||||||||||||||
| 129 | BIO_get_data(BIO *a) | - | ||||||||||||||||||
| 130 | { | - | ||||||||||||||||||
| 131 | return never executed: (a->ptr);return (a->ptr);never executed: return (a->ptr); | 0 | ||||||||||||||||||
| 132 | } | - | ||||||||||||||||||
| 133 | - | |||||||||||||||||||
| 134 | void | - | ||||||||||||||||||
| 135 | BIO_set_data(BIO *a, void *ptr) | - | ||||||||||||||||||
| 136 | { | - | ||||||||||||||||||
| 137 | a->ptr = ptr; | - | ||||||||||||||||||
| 138 | } never executed: end of block | 0 | ||||||||||||||||||
| 139 | - | |||||||||||||||||||
| 140 | void | - | ||||||||||||||||||
| 141 | BIO_set_init(BIO *a, int init) | - | ||||||||||||||||||
| 142 | { | - | ||||||||||||||||||
| 143 | a->init = init; | - | ||||||||||||||||||
| 144 | } never executed: end of block | 0 | ||||||||||||||||||
| 145 | - | |||||||||||||||||||
| 146 | int | - | ||||||||||||||||||
| 147 | BIO_get_shutdown(BIO *a) | - | ||||||||||||||||||
| 148 | { | - | ||||||||||||||||||
| 149 | return never executed: (a->shutdown);return (a->shutdown);never executed: return (a->shutdown); | 0 | ||||||||||||||||||
| 150 | } | - | ||||||||||||||||||
| 151 | - | |||||||||||||||||||
| 152 | void | - | ||||||||||||||||||
| 153 | BIO_set_shutdown(BIO *a, int shut) | - | ||||||||||||||||||
| 154 | { | - | ||||||||||||||||||
| 155 | a->shutdown = shut; | - | ||||||||||||||||||
| 156 | } never executed: end of block | 0 | ||||||||||||||||||
| 157 | - | |||||||||||||||||||
| 158 | void | - | ||||||||||||||||||
| 159 | BIO_clear_flags(BIO *b, int flags) | - | ||||||||||||||||||
| 160 | { | - | ||||||||||||||||||
| 161 | b->flags &= ~flags; | - | ||||||||||||||||||
| 162 | } executed 16325 times by 9 tests: end of blockExecuted by:
| 16325 | ||||||||||||||||||
| 163 | - | |||||||||||||||||||
| 164 | int | - | ||||||||||||||||||
| 165 | BIO_test_flags(const BIO *b, int flags) | - | ||||||||||||||||||
| 166 | { | - | ||||||||||||||||||
| 167 | return executed 8275 times by 6 tests: (b->flags & flags);return (b->flags & flags);Executed by:
executed 8275 times by 6 tests: return (b->flags & flags);Executed by:
| 8275 | ||||||||||||||||||
| 168 | } | - | ||||||||||||||||||
| 169 | - | |||||||||||||||||||
| 170 | void | - | ||||||||||||||||||
| 171 | BIO_set_flags(BIO *b, int flags) | - | ||||||||||||||||||
| 172 | { | - | ||||||||||||||||||
| 173 | b->flags |= flags; | - | ||||||||||||||||||
| 174 | } executed 7145 times by 6 tests: end of blockExecuted by:
| 7145 | ||||||||||||||||||
| 175 | - | |||||||||||||||||||
| 176 | long | - | ||||||||||||||||||
| 177 | (*BIO_get_callback(const BIO *b))(struct bio_st *, int, const char *, int, | - | ||||||||||||||||||
| 178 | long, long) | - | ||||||||||||||||||
| 179 | { | - | ||||||||||||||||||
| 180 | return never executed: b->callback;return b->callback;never executed: return b->callback; | 0 | ||||||||||||||||||
| 181 | } | - | ||||||||||||||||||
| 182 | - | |||||||||||||||||||
| 183 | void | - | ||||||||||||||||||
| 184 | BIO_set_callback(BIO *b, long (*cb)(struct bio_st *, int, const char *, int, | - | ||||||||||||||||||
| 185 | long, long)) | - | ||||||||||||||||||
| 186 | { | - | ||||||||||||||||||
| 187 | b->callback = cb; | - | ||||||||||||||||||
| 188 | } never executed: end of block | 0 | ||||||||||||||||||
| 189 | - | |||||||||||||||||||
| 190 | void | - | ||||||||||||||||||
| 191 | BIO_set_callback_arg(BIO *b, char *arg) | - | ||||||||||||||||||
| 192 | { | - | ||||||||||||||||||
| 193 | b->cb_arg = arg; | - | ||||||||||||||||||
| 194 | } never executed: end of block | 0 | ||||||||||||||||||
| 195 | - | |||||||||||||||||||
| 196 | char * | - | ||||||||||||||||||
| 197 | BIO_get_callback_arg(const BIO *b) | - | ||||||||||||||||||
| 198 | { | - | ||||||||||||||||||
| 199 | return never executed: b->cb_arg;return b->cb_arg;never executed: return b->cb_arg; | 0 | ||||||||||||||||||
| 200 | } | - | ||||||||||||||||||
| 201 | - | |||||||||||||||||||
| 202 | const char * | - | ||||||||||||||||||
| 203 | BIO_method_name(const BIO *b) | - | ||||||||||||||||||
| 204 | { | - | ||||||||||||||||||
| 205 | return never executed: b->method->name;return b->method->name;never executed: return b->method->name; | 0 | ||||||||||||||||||
| 206 | } | - | ||||||||||||||||||
| 207 | - | |||||||||||||||||||
| 208 | int | - | ||||||||||||||||||
| 209 | BIO_method_type(const BIO *b) | - | ||||||||||||||||||
| 210 | { | - | ||||||||||||||||||
| 211 | return executed 6 times by 2 tests: b->method->type;return b->method->type;Executed by:
executed 6 times by 2 tests: return b->method->type;Executed by:
| 6 | ||||||||||||||||||
| 212 | } | - | ||||||||||||||||||
| 213 | - | |||||||||||||||||||
| 214 | int | - | ||||||||||||||||||
| 215 | BIO_read(BIO *b, void *out, int outl) | - | ||||||||||||||||||
| 216 | { | - | ||||||||||||||||||
| 217 | int i; | - | ||||||||||||||||||
| 218 | long (*cb)(BIO *, int, const char *, int, long, long); | - | ||||||||||||||||||
| 219 | - | |||||||||||||||||||
| 220 | if ((
| 0-7824 | ||||||||||||||||||
| 221 | ((void *)0)
| 0-7824 | ||||||||||||||||||
| 222 | )
| 0-7824 | ||||||||||||||||||
| 223 | ((void *)0)
| 0-7824 | ||||||||||||||||||
| 224 | )
| 0-7824 | ||||||||||||||||||
| 225 | ((void *)0)
| 0-7824 | ||||||||||||||||||
| 226 | )
| 0-7824 | ||||||||||||||||||
| 227 | ERR_put_error(32,(0xfff),(121),__FILE__,254); | - | ||||||||||||||||||
| 228 | return never executed: (-2);return (-2);never executed: return (-2); | 0 | ||||||||||||||||||
| 229 | } | - | ||||||||||||||||||
| 230 | - | |||||||||||||||||||
| 231 | cb = b->callback; | - | ||||||||||||||||||
| 232 | if ((
| 0-7824 | ||||||||||||||||||
| 233 | ((void *)0)
| 0-7824 | ||||||||||||||||||
| 234 | )
| 0-7824 | ||||||||||||||||||
| 235 | ((
| 0 | ||||||||||||||||||
| 236 | return never executed: (i);return (i);never executed: return (i); | 0 | ||||||||||||||||||
| 237 | - | |||||||||||||||||||
| 238 | if (!b->init
| 0-7824 | ||||||||||||||||||
| 239 | ERR_put_error(32,(0xfff),(120),__FILE__,264); | - | ||||||||||||||||||
| 240 | return never executed: (-2);return (-2);never executed: return (-2); | 0 | ||||||||||||||||||
| 241 | } | - | ||||||||||||||||||
| 242 | - | |||||||||||||||||||
| 243 | i = b->method->bread(b, out, outl); | - | ||||||||||||||||||
| 244 | - | |||||||||||||||||||
| 245 | if (i > 0
| 3606-4218 | ||||||||||||||||||
| 246 | b->num_read += (unsigned long)i; executed 3606 times by 7 tests: b->num_read += (unsigned long)i;Executed by:
| 3606 | ||||||||||||||||||
| 247 | - | |||||||||||||||||||
| 248 | if (cb !=
| 0-7824 | ||||||||||||||||||
| 249 | ((void *)0)
| 0-7824 | ||||||||||||||||||
| 250 | ) | - | ||||||||||||||||||
| 251 | i = (int)cb(b, 0x02|0x80, out, outl, never executed: i = (int)cb(b, 0x02|0x80, out, outl, 0L, (long)i); | 0 | ||||||||||||||||||
| 252 | 0L, (long)i); never executed: i = (int)cb(b, 0x02|0x80, out, outl, 0L, (long)i); | 0 | ||||||||||||||||||
| 253 | return executed 7824 times by 7 tests: (i);return (i);Executed by:
executed 7824 times by 7 tests: return (i);Executed by:
| 7824 | ||||||||||||||||||
| 254 | } | - | ||||||||||||||||||
| 255 | - | |||||||||||||||||||
| 256 | int | - | ||||||||||||||||||
| 257 | BIO_write(BIO *b, const void *in, int inl) | - | ||||||||||||||||||
| 258 | { | - | ||||||||||||||||||
| 259 | int i; | - | ||||||||||||||||||
| 260 | long (*cb)(BIO *, int, const char *, int, long, long); | - | ||||||||||||||||||
| 261 | - | |||||||||||||||||||
| 262 | if (b ==
| 0-800946 | ||||||||||||||||||
| 263 | ((void *)0)
| 0-800946 | ||||||||||||||||||
| 264 | ) | - | ||||||||||||||||||
| 265 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 266 | - | |||||||||||||||||||
| 267 | cb = b->callback; | - | ||||||||||||||||||
| 268 | if ((
| 0-800946 | ||||||||||||||||||
| 269 | ((void *)0)
| 0-800946 | ||||||||||||||||||
| 270 | )
| 0-800946 | ||||||||||||||||||
| 271 | ((void *)0)
| 0-800946 | ||||||||||||||||||
| 272 | )
| 0-800946 | ||||||||||||||||||
| 273 | ERR_put_error(32,(0xfff),(121),__FILE__,290); | - | ||||||||||||||||||
| 274 | return never executed: (-2);return (-2);never executed: return (-2); | 0 | ||||||||||||||||||
| 275 | } | - | ||||||||||||||||||
| 276 | - | |||||||||||||||||||
| 277 | if ((
| 0-800946 | ||||||||||||||||||
| 278 | ((void *)0)
| 0-800946 | ||||||||||||||||||
| 279 | )
| 0-800946 | ||||||||||||||||||
| 280 | ((
| 0 | ||||||||||||||||||
| 281 | return never executed: (i);return (i);never executed: return (i); | 0 | ||||||||||||||||||
| 282 | - | |||||||||||||||||||
| 283 | if (!b->init
| 48-800898 | ||||||||||||||||||
| 284 | ERR_put_error(32,(0xfff),(120),__FILE__,299); | - | ||||||||||||||||||
| 285 | return executed 48 times by 1 test: (-2);return (-2);Executed by:
executed 48 times by 1 test: return (-2);Executed by:
| 48 | ||||||||||||||||||
| 286 | } | - | ||||||||||||||||||
| 287 | - | |||||||||||||||||||
| 288 | i = b->method->bwrite(b, in, inl); | - | ||||||||||||||||||
| 289 | - | |||||||||||||||||||
| 290 | if (i > 0
| 1972-798926 | ||||||||||||||||||
| 291 | b->num_write += (unsigned long)i; executed 798926 times by 13 tests: b->num_write += (unsigned long)i;Executed by:
| 798926 | ||||||||||||||||||
| 292 | - | |||||||||||||||||||
| 293 | if (cb !=
| 0-800898 | ||||||||||||||||||
| 294 | ((void *)0)
| 0-800898 | ||||||||||||||||||
| 295 | ) | - | ||||||||||||||||||
| 296 | i = (int)cb(b, 0x03|0x80, in, inl, never executed: i = (int)cb(b, 0x03|0x80, in, inl, 0L, (long)i); | 0 | ||||||||||||||||||
| 297 | 0L, (long)i); never executed: i = (int)cb(b, 0x03|0x80, in, inl, 0L, (long)i); | 0 | ||||||||||||||||||
| 298 | return executed 800898 times by 13 tests: (i);return (i);Executed by:
executed 800898 times by 13 tests: return (i);Executed by:
| 800898 | ||||||||||||||||||
| 299 | } | - | ||||||||||||||||||
| 300 | - | |||||||||||||||||||
| 301 | int | - | ||||||||||||||||||
| 302 | BIO_puts(BIO *b, const char *in) | - | ||||||||||||||||||
| 303 | { | - | ||||||||||||||||||
| 304 | int i; | - | ||||||||||||||||||
| 305 | long (*cb)(BIO *, int, const char *, int, long, long); | - | ||||||||||||||||||
| 306 | - | |||||||||||||||||||
| 307 | if ((
| 0-9012 | ||||||||||||||||||
| 308 | ((void *)0)
| 0-9012 | ||||||||||||||||||
| 309 | )
| 0-9012 | ||||||||||||||||||
| 310 | ((void *)0)
| 0-9012 | ||||||||||||||||||
| 311 | )
| 0-9012 | ||||||||||||||||||
| 312 | ((void *)0)
| 0-9012 | ||||||||||||||||||
| 313 | )
| 0-9012 | ||||||||||||||||||
| 314 | ERR_put_error(32,(0xfff),(121),__FILE__,321); | - | ||||||||||||||||||
| 315 | return never executed: (-2);return (-2);never executed: return (-2); | 0 | ||||||||||||||||||
| 316 | } | - | ||||||||||||||||||
| 317 | - | |||||||||||||||||||
| 318 | cb = b->callback; | - | ||||||||||||||||||
| 319 | - | |||||||||||||||||||
| 320 | if ((
| 0-9012 | ||||||||||||||||||
| 321 | ((void *)0)
| 0-9012 | ||||||||||||||||||
| 322 | )
| 0-9012 | ||||||||||||||||||
| 323 | ((
| 0 | ||||||||||||||||||
| 324 | return never executed: (i);return (i);never executed: return (i); | 0 | ||||||||||||||||||
| 325 | - | |||||||||||||||||||
| 326 | if (!b->init
| 0-9012 | ||||||||||||||||||
| 327 | ERR_put_error(32,(0xfff),(120),__FILE__,332); | - | ||||||||||||||||||
| 328 | return never executed: (-2);return (-2);never executed: return (-2); | 0 | ||||||||||||||||||
| 329 | } | - | ||||||||||||||||||
| 330 | - | |||||||||||||||||||
| 331 | i = b->method->bputs(b, in); | - | ||||||||||||||||||
| 332 | - | |||||||||||||||||||
| 333 | if (i > 0
| 0-9012 | ||||||||||||||||||
| 334 | b->num_write += (unsigned long)i; executed 9012 times by 5 tests: b->num_write += (unsigned long)i;Executed by:
| 9012 | ||||||||||||||||||
| 335 | - | |||||||||||||||||||
| 336 | if (cb !=
| 0-9012 | ||||||||||||||||||
| 337 | ((void *)0)
| 0-9012 | ||||||||||||||||||
| 338 | ) | - | ||||||||||||||||||
| 339 | i = (int)cb(b, 0x04|0x80, in, 0, 0L, (long)i); never executed: i = (int)cb(b, 0x04|0x80, in, 0, 0L, (long)i); | 0 | ||||||||||||||||||
| 340 | return executed 9012 times by 5 tests: (i);return (i);Executed by:
executed 9012 times by 5 tests: return (i);Executed by:
| 9012 | ||||||||||||||||||
| 341 | } | - | ||||||||||||||||||
| 342 | - | |||||||||||||||||||
| 343 | int | - | ||||||||||||||||||
| 344 | BIO_gets(BIO *b, char *in, int inl) | - | ||||||||||||||||||
| 345 | { | - | ||||||||||||||||||
| 346 | int i; | - | ||||||||||||||||||
| 347 | long (*cb)(BIO *, int, const char *, int, long, long); | - | ||||||||||||||||||
| 348 | - | |||||||||||||||||||
| 349 | if ((
| 0-6425 | ||||||||||||||||||
| 350 | ((void *)0)
| 0-6425 | ||||||||||||||||||
| 351 | )
| 0-6425 | ||||||||||||||||||
| 352 | ((void *)0)
| 0-6425 | ||||||||||||||||||
| 353 | )
| 0-6425 | ||||||||||||||||||
| 354 | ((void *)0)
| 0-6425 | ||||||||||||||||||
| 355 | )
| 0-6425 | ||||||||||||||||||
| 356 | ERR_put_error(32,(0xfff),(121),__FILE__,353); | - | ||||||||||||||||||
| 357 | return never executed: (-2);return (-2);never executed: return (-2); | 0 | ||||||||||||||||||
| 358 | } | - | ||||||||||||||||||
| 359 | - | |||||||||||||||||||
| 360 | cb = b->callback; | - | ||||||||||||||||||
| 361 | - | |||||||||||||||||||
| 362 | if ((
| 0-6425 | ||||||||||||||||||
| 363 | ((void *)0)
| 0-6425 | ||||||||||||||||||
| 364 | )
| 0-6425 | ||||||||||||||||||
| 365 | ((
| 0 | ||||||||||||||||||
| 366 | return never executed: (i);return (i);never executed: return (i); | 0 | ||||||||||||||||||
| 367 | - | |||||||||||||||||||
| 368 | if (!b->init
| 0-6425 | ||||||||||||||||||
| 369 | ERR_put_error(32,(0xfff),(120),__FILE__,364); | - | ||||||||||||||||||
| 370 | return never executed: (-2);return (-2);never executed: return (-2); | 0 | ||||||||||||||||||
| 371 | } | - | ||||||||||||||||||
| 372 | - | |||||||||||||||||||
| 373 | i = b->method->bgets(b, in, inl); | - | ||||||||||||||||||
| 374 | - | |||||||||||||||||||
| 375 | if (cb !=
| 0-6425 | ||||||||||||||||||
| 376 | ((void *)0)
| 0-6425 | ||||||||||||||||||
| 377 | ) | - | ||||||||||||||||||
| 378 | i = (int)cb(b, 0x05|0x80, in, inl, 0L, (long)i); never executed: i = (int)cb(b, 0x05|0x80, in, inl, 0L, (long)i); | 0 | ||||||||||||||||||
| 379 | return executed 6425 times by 7 tests: (i);return (i);Executed by:
executed 6425 times by 7 tests: return (i);Executed by:
| 6425 | ||||||||||||||||||
| 380 | } | - | ||||||||||||||||||
| 381 | - | |||||||||||||||||||
| 382 | int | - | ||||||||||||||||||
| 383 | BIO_indent(BIO *b, int indent, int max) | - | ||||||||||||||||||
| 384 | { | - | ||||||||||||||||||
| 385 | if (indent < 0
| 0-114 | ||||||||||||||||||
| 386 | indent = 0; never executed: indent = 0; | 0 | ||||||||||||||||||
| 387 | if (indent > max
| 0-114 | ||||||||||||||||||
| 388 | indent = max; never executed: indent = max; | 0 | ||||||||||||||||||
| 389 | while (indent--
| 114-1608 | ||||||||||||||||||
| 390 | if (BIO_puts(b, " ") != 1
| 0-1608 | ||||||||||||||||||
| 391 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||
| 392 | return executed 114 times by 2 tests: 1;return 1;Executed by:
executed 114 times by 2 tests: return 1;Executed by:
| 114 | ||||||||||||||||||
| 393 | } | - | ||||||||||||||||||
| 394 | - | |||||||||||||||||||
| 395 | long | - | ||||||||||||||||||
| 396 | BIO_int_ctrl(BIO *b, int cmd, long larg, int iarg) | - | ||||||||||||||||||
| 397 | { | - | ||||||||||||||||||
| 398 | int i; | - | ||||||||||||||||||
| 399 | - | |||||||||||||||||||
| 400 | i = iarg; | - | ||||||||||||||||||
| 401 | return executed 145 times by 4 tests: (BIO_ctrl(b, cmd, larg, (char *)&i));return (BIO_ctrl(b, cmd, larg, (char *)&i));Executed by:
executed 145 times by 4 tests: return (BIO_ctrl(b, cmd, larg, (char *)&i));Executed by:
| 145 | ||||||||||||||||||
| 402 | } | - | ||||||||||||||||||
| 403 | - | |||||||||||||||||||
| 404 | char * | - | ||||||||||||||||||
| 405 | BIO_ptr_ctrl(BIO *b, int cmd, long larg) | - | ||||||||||||||||||
| 406 | { | - | ||||||||||||||||||
| 407 | char *p = | - | ||||||||||||||||||
| 408 | ((void *)0) | - | ||||||||||||||||||
| 409 | ; | - | ||||||||||||||||||
| 410 | - | |||||||||||||||||||
| 411 | if (BIO_ctrl(b, cmd, larg, (char *)&p) <= 0
| 0 | ||||||||||||||||||
| 412 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 413 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 414 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 415 | else | - | ||||||||||||||||||
| 416 | return never executed: (p);return (p);never executed: return (p); | 0 | ||||||||||||||||||
| 417 | } | - | ||||||||||||||||||
| 418 | - | |||||||||||||||||||
| 419 | long | - | ||||||||||||||||||
| 420 | BIO_ctrl(BIO *b, int cmd, long larg, void *parg) | - | ||||||||||||||||||
| 421 | { | - | ||||||||||||||||||
| 422 | long ret; | - | ||||||||||||||||||
| 423 | long (*cb)(BIO *, int, const char *, int, long, long); | - | ||||||||||||||||||
| 424 | - | |||||||||||||||||||
| 425 | if (b ==
| 8-13226 | ||||||||||||||||||
| 426 | ((void *)0)
| 8-13226 | ||||||||||||||||||
| 427 | ) | - | ||||||||||||||||||
| 428 | return executed 8 times by 1 test: (0);return (0);Executed by:
executed 8 times by 1 test: return (0);Executed by:
| 8 | ||||||||||||||||||
| 429 | - | |||||||||||||||||||
| 430 | if ((
| 0-13226 | ||||||||||||||||||
| 431 | ((void *)0)
| 0-13226 | ||||||||||||||||||
| 432 | )
| 0-13226 | ||||||||||||||||||
| 433 | ((void *)0)
| 0-13226 | ||||||||||||||||||
| 434 | )
| 0-13226 | ||||||||||||||||||
| 435 | ERR_put_error(32,(0xfff),(121),__FILE__,418); | - | ||||||||||||||||||
| 436 | return never executed: (-2);return (-2);never executed: return (-2); | 0 | ||||||||||||||||||
| 437 | } | - | ||||||||||||||||||
| 438 | - | |||||||||||||||||||
| 439 | cb = b->callback; | - | ||||||||||||||||||
| 440 | - | |||||||||||||||||||
| 441 | if ((
| 0-13226 | ||||||||||||||||||
| 442 | ((void *)0)
| 0-13226 | ||||||||||||||||||
| 443 | )
| 0-13226 | ||||||||||||||||||
| 444 | ((
| 0 | ||||||||||||||||||
| 445 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||
| 446 | - | |||||||||||||||||||
| 447 | ret = b->method->ctrl(b, cmd, larg, parg); | - | ||||||||||||||||||
| 448 | - | |||||||||||||||||||
| 449 | if (cb !=
| 0-13226 | ||||||||||||||||||
| 450 | ((void *)0)
| 0-13226 | ||||||||||||||||||
| 451 | ) | - | ||||||||||||||||||
| 452 | ret = cb(b, 0x06|0x80, parg, cmd, larg, ret); never executed: ret = cb(b, 0x06|0x80, parg, cmd, larg, ret); | 0 | ||||||||||||||||||
| 453 | return executed 13226 times by 17 tests: (ret);return (ret);Executed by:
executed 13226 times by 17 tests: return (ret);Executed by:
| 13226 | ||||||||||||||||||
| 454 | } | - | ||||||||||||||||||
| 455 | - | |||||||||||||||||||
| 456 | long | - | ||||||||||||||||||
| 457 | BIO_callback_ctrl(BIO *b, int cmd, | - | ||||||||||||||||||
| 458 | void (*fp)(struct bio_st *, int, const char *, int, long, long)) | - | ||||||||||||||||||
| 459 | { | - | ||||||||||||||||||
| 460 | long ret; | - | ||||||||||||||||||
| 461 | long (*cb)(BIO *, int, const char *, int, long, long); | - | ||||||||||||||||||
| 462 | - | |||||||||||||||||||
| 463 | if (b ==
| 0 | ||||||||||||||||||
| 464 | ((void *)0)
| 0 | ||||||||||||||||||
| 465 | ) | - | ||||||||||||||||||
| 466 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 467 | - | |||||||||||||||||||
| 468 | if ((
| 0 | ||||||||||||||||||
| 469 | ((void *)0)
| 0 | ||||||||||||||||||
| 470 | )
| 0 | ||||||||||||||||||
| 471 | ((void *)0)
| 0 | ||||||||||||||||||
| 472 | )
| 0 | ||||||||||||||||||
| 473 | ERR_put_error(32,(0xfff),(121),__FILE__,446); | - | ||||||||||||||||||
| 474 | return never executed: (-2);return (-2);never executed: return (-2); | 0 | ||||||||||||||||||
| 475 | } | - | ||||||||||||||||||
| 476 | - | |||||||||||||||||||
| 477 | cb = b->callback; | - | ||||||||||||||||||
| 478 | - | |||||||||||||||||||
| 479 | if ((
| 0 | ||||||||||||||||||
| 480 | ((void *)0)
| 0 | ||||||||||||||||||
| 481 | )
| 0 | ||||||||||||||||||
| 482 | ((
| 0 | ||||||||||||||||||
| 483 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||
| 484 | - | |||||||||||||||||||
| 485 | ret = b->method->callback_ctrl(b, cmd, fp); | - | ||||||||||||||||||
| 486 | - | |||||||||||||||||||
| 487 | if (cb !=
| 0 | ||||||||||||||||||
| 488 | ((void *)0)
| 0 | ||||||||||||||||||
| 489 | ) | - | ||||||||||||||||||
| 490 | ret = cb(b, 0x06|0x80, (void *)&fp, cmd, 0, ret); never executed: ret = cb(b, 0x06|0x80, (void *)&fp, cmd, 0, ret); | 0 | ||||||||||||||||||
| 491 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||
| 492 | } | - | ||||||||||||||||||
| 493 | - | |||||||||||||||||||
| 494 | - | |||||||||||||||||||
| 495 | - | |||||||||||||||||||
| 496 | - | |||||||||||||||||||
| 497 | size_t | - | ||||||||||||||||||
| 498 | BIO_ctrl_pending(BIO *bio) | - | ||||||||||||||||||
| 499 | { | - | ||||||||||||||||||
| 500 | return executed 1818 times by 1 test: BIO_ctrl(bio, 10, 0, return BIO_ctrl(bio, 10, 0, ((void *)0) );Executed by:
executed 1818 times by 1 test: return BIO_ctrl(bio, 10, 0, ((void *)0) );Executed by:
| 1818 | ||||||||||||||||||
| 501 | ((void *)0) executed 1818 times by 1 test: return BIO_ctrl(bio, 10, 0, ((void *)0) );Executed by:
| 1818 | ||||||||||||||||||
| 502 | ); executed 1818 times by 1 test: return BIO_ctrl(bio, 10, 0, ((void *)0) );Executed by:
| 1818 | ||||||||||||||||||
| 503 | } | - | ||||||||||||||||||
| 504 | - | |||||||||||||||||||
| 505 | size_t | - | ||||||||||||||||||
| 506 | BIO_ctrl_wpending(BIO *bio) | - | ||||||||||||||||||
| 507 | { | - | ||||||||||||||||||
| 508 | 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 | ||||||||||||||||||
| 509 | ((void *)0) never executed: return BIO_ctrl(bio, 13, 0, ((void *)0) ); | 0 | ||||||||||||||||||
| 510 | ); never executed: return BIO_ctrl(bio, 13, 0, ((void *)0) ); | 0 | ||||||||||||||||||
| 511 | } | - | ||||||||||||||||||
| 512 | - | |||||||||||||||||||
| 513 | - | |||||||||||||||||||
| 514 | - | |||||||||||||||||||
| 515 | BIO * | - | ||||||||||||||||||
| 516 | BIO_push(BIO *b, BIO *bio) | - | ||||||||||||||||||
| 517 | { | - | ||||||||||||||||||
| 518 | BIO *lb; | - | ||||||||||||||||||
| 519 | - | |||||||||||||||||||
| 520 | if (b ==
| 0-597 | ||||||||||||||||||
| 521 | ((void *)0)
| 0-597 | ||||||||||||||||||
| 522 | ) | - | ||||||||||||||||||
| 523 | return never executed: (bio);return (bio);never executed: return (bio); | 0 | ||||||||||||||||||
| 524 | lb = b; | - | ||||||||||||||||||
| 525 | while (lb->next_bio !=
| 0-597 | ||||||||||||||||||
| 526 | ((void *)0)
| 0-597 | ||||||||||||||||||
| 527 | ) | - | ||||||||||||||||||
| 528 | lb = lb->next_bio; never executed: lb = lb->next_bio; | 0 | ||||||||||||||||||
| 529 | lb->next_bio = bio; | - | ||||||||||||||||||
| 530 | if (bio !=
| 0-597 | ||||||||||||||||||
| 531 | ((void *)0)
| 0-597 | ||||||||||||||||||
| 532 | ) | - | ||||||||||||||||||
| 533 | bio->prev_bio = lb; executed 597 times by 7 tests: bio->prev_bio = lb;Executed by:
| 597 | ||||||||||||||||||
| 534 | - | |||||||||||||||||||
| 535 | BIO_ctrl(b, 6, 0, lb); | - | ||||||||||||||||||
| 536 | return executed 597 times by 7 tests: (b);return (b);Executed by:
executed 597 times by 7 tests: return (b);Executed by:
| 597 | ||||||||||||||||||
| 537 | } | - | ||||||||||||||||||
| 538 | - | |||||||||||||||||||
| 539 | - | |||||||||||||||||||
| 540 | BIO * | - | ||||||||||||||||||
| 541 | BIO_pop(BIO *b) | - | ||||||||||||||||||
| 542 | { | - | ||||||||||||||||||
| 543 | BIO *ret; | - | ||||||||||||||||||
| 544 | - | |||||||||||||||||||
| 545 | if (b ==
| 0-142 | ||||||||||||||||||
| 546 | ((void *)0)
| 0-142 | ||||||||||||||||||
| 547 | ) | - | ||||||||||||||||||
| 548 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 549 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 550 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 551 | ret = b->next_bio; | - | ||||||||||||||||||
| 552 | - | |||||||||||||||||||
| 553 | BIO_ctrl(b, 7, 0, b); | - | ||||||||||||||||||
| 554 | - | |||||||||||||||||||
| 555 | if (b->prev_bio !=
| 0-142 | ||||||||||||||||||
| 556 | ((void *)0)
| 0-142 | ||||||||||||||||||
| 557 | ) | - | ||||||||||||||||||
| 558 | b->prev_bio->next_bio = b->next_bio; never executed: b->prev_bio->next_bio = b->next_bio; | 0 | ||||||||||||||||||
| 559 | if (b->next_bio !=
| 0-142 | ||||||||||||||||||
| 560 | ((void *)0)
| 0-142 | ||||||||||||||||||
| 561 | ) | - | ||||||||||||||||||
| 562 | b->next_bio->prev_bio = b->prev_bio; executed 142 times by 5 tests: b->next_bio->prev_bio = b->prev_bio;Executed by:
| 142 | ||||||||||||||||||
| 563 | - | |||||||||||||||||||
| 564 | b->next_bio = | - | ||||||||||||||||||
| 565 | ((void *)0) | - | ||||||||||||||||||
| 566 | ; | - | ||||||||||||||||||
| 567 | b->prev_bio = | - | ||||||||||||||||||
| 568 | ((void *)0) | - | ||||||||||||||||||
| 569 | ; | - | ||||||||||||||||||
| 570 | return executed 142 times by 5 tests: (ret);return (ret);Executed by:
executed 142 times by 5 tests: return (ret);Executed by:
| 142 | ||||||||||||||||||
| 571 | } | - | ||||||||||||||||||
| 572 | - | |||||||||||||||||||
| 573 | BIO * | - | ||||||||||||||||||
| 574 | BIO_get_retry_BIO(BIO *bio, int *reason) | - | ||||||||||||||||||
| 575 | { | - | ||||||||||||||||||
| 576 | BIO *b, *last; | - | ||||||||||||||||||
| 577 | - | |||||||||||||||||||
| 578 | b = last = bio; | - | ||||||||||||||||||
| 579 | for (;;) { | - | ||||||||||||||||||
| 580 | if (!BIO_test_flags(b, 0x08)
| 0 | ||||||||||||||||||
| 581 | break; never executed: break; | 0 | ||||||||||||||||||
| 582 | last = b; | - | ||||||||||||||||||
| 583 | b = b->next_bio; | - | ||||||||||||||||||
| 584 | if (b ==
| 0 | ||||||||||||||||||
| 585 | ((void *)0)
| 0 | ||||||||||||||||||
| 586 | ) | - | ||||||||||||||||||
| 587 | break; never executed: break; | 0 | ||||||||||||||||||
| 588 | } never executed: end of block | 0 | ||||||||||||||||||
| 589 | if (reason !=
| 0 | ||||||||||||||||||
| 590 | ((void *)0)
| 0 | ||||||||||||||||||
| 591 | ) | - | ||||||||||||||||||
| 592 | * never executed: reason = last->retry_reason;*reason = last->retry_reason;never executed: *reason = last->retry_reason; | 0 | ||||||||||||||||||
| 593 | return never executed: (last);return (last);never executed: return (last); | 0 | ||||||||||||||||||
| 594 | } | - | ||||||||||||||||||
| 595 | - | |||||||||||||||||||
| 596 | int | - | ||||||||||||||||||
| 597 | BIO_get_retry_reason(BIO *bio) | - | ||||||||||||||||||
| 598 | { | - | ||||||||||||||||||
| 599 | return never executed: (bio->retry_reason);return (bio->retry_reason);never executed: return (bio->retry_reason); | 0 | ||||||||||||||||||
| 600 | } | - | ||||||||||||||||||
| 601 | - | |||||||||||||||||||
| 602 | BIO * | - | ||||||||||||||||||
| 603 | BIO_find_type(BIO *bio, int type) | - | ||||||||||||||||||
| 604 | { | - | ||||||||||||||||||
| 605 | int mt, mask; | - | ||||||||||||||||||
| 606 | - | |||||||||||||||||||
| 607 | if (!bio
| 0-6 | ||||||||||||||||||
| 608 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
| 609 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
| 610 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
| 611 | mask = type & 0xff; | - | ||||||||||||||||||
| 612 | do { | - | ||||||||||||||||||
| 613 | if (bio->method !=
| 0-8 | ||||||||||||||||||
| 614 | ((void *)0)
| 0-8 | ||||||||||||||||||
| 615 | ) { | - | ||||||||||||||||||
| 616 | mt = bio->method->type; | - | ||||||||||||||||||
| 617 | if (!mask
| 0-8 | ||||||||||||||||||
| 618 | if (mt & type
| 0 | ||||||||||||||||||
| 619 | return never executed: (bio);return (bio);never executed: return (bio); | 0 | ||||||||||||||||||
| 620 | } never executed: else if (mt == typeend of block
| 0-6 | ||||||||||||||||||
| 621 | return executed 6 times by 1 test: (bio);return (bio);Executed by:
executed 6 times by 1 test: return (bio);Executed by:
| 6 | ||||||||||||||||||
| 622 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||
| 623 | bio = bio->next_bio; | - | ||||||||||||||||||
| 624 | } executed 2 times by 1 test: while (bio != end of blockExecuted by:
| 0-2 | ||||||||||||||||||
| 625 | ((void *)0)
| 0-2 | ||||||||||||||||||
| 626 | ); | - | ||||||||||||||||||
| 627 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 628 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 629 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 630 | } | - | ||||||||||||||||||
| 631 | - | |||||||||||||||||||
| 632 | BIO * | - | ||||||||||||||||||
| 633 | BIO_next(BIO *b) | - | ||||||||||||||||||
| 634 | { | - | ||||||||||||||||||
| 635 | if (!b
| 0 | ||||||||||||||||||
| 636 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
| 637 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
| 638 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
| 639 | return never executed: b->next_bio;return b->next_bio;never executed: return b->next_bio; | 0 | ||||||||||||||||||
| 640 | } | - | ||||||||||||||||||
| 641 | - | |||||||||||||||||||
| 642 | void | - | ||||||||||||||||||
| 643 | BIO_free_all(BIO *bio) | - | ||||||||||||||||||
| 644 | { | - | ||||||||||||||||||
| 645 | BIO *b; | - | ||||||||||||||||||
| 646 | int ref; | - | ||||||||||||||||||
| 647 | - | |||||||||||||||||||
| 648 | while (bio !=
| 753-764 | ||||||||||||||||||
| 649 | ((void *)0)
| 753-764 | ||||||||||||||||||
| 650 | ) { | - | ||||||||||||||||||
| 651 | b = bio; | - | ||||||||||||||||||
| 652 | ref = b->references; | - | ||||||||||||||||||
| 653 | bio = bio->next_bio; | - | ||||||||||||||||||
| 654 | BIO_free(b); | - | ||||||||||||||||||
| 655 | - | |||||||||||||||||||
| 656 | if (ref > 1
| 26-727 | ||||||||||||||||||
| 657 | break; executed 26 times by 2 tests: break;Executed by:
| 26 | ||||||||||||||||||
| 658 | } executed 727 times by 5 tests: end of blockExecuted by:
| 727 | ||||||||||||||||||
| 659 | } executed 790 times by 14 tests: end of blockExecuted by:
| 790 | ||||||||||||||||||
| 660 | - | |||||||||||||||||||
| 661 | BIO * | - | ||||||||||||||||||
| 662 | BIO_dup_chain(BIO *in) | - | ||||||||||||||||||
| 663 | { | - | ||||||||||||||||||
| 664 | BIO *ret = | - | ||||||||||||||||||
| 665 | ((void *)0) | - | ||||||||||||||||||
| 666 | , *eoc = | - | ||||||||||||||||||
| 667 | ((void *)0) | - | ||||||||||||||||||
| 668 | , *bio, *new_bio; | - | ||||||||||||||||||
| 669 | - | |||||||||||||||||||
| 670 | for (bio = in; bio !=
| 0 | ||||||||||||||||||
| 671 | ((void *)0)
| 0 | ||||||||||||||||||
| 672 | ; bio = bio->next_bio) { | - | ||||||||||||||||||
| 673 | if ((
| 0 | ||||||||||||||||||
| 674 | ((void *)0)
| 0 | ||||||||||||||||||
| 675 | ) | - | ||||||||||||||||||
| 676 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||
| 677 | new_bio->callback = bio->callback; | - | ||||||||||||||||||
| 678 | new_bio->cb_arg = bio->cb_arg; | - | ||||||||||||||||||
| 679 | new_bio->init = bio->init; | - | ||||||||||||||||||
| 680 | new_bio->shutdown = bio->shutdown; | - | ||||||||||||||||||
| 681 | new_bio->flags = bio->flags; | - | ||||||||||||||||||
| 682 | - | |||||||||||||||||||
| 683 | - | |||||||||||||||||||
| 684 | new_bio->num = bio->num; | - | ||||||||||||||||||
| 685 | - | |||||||||||||||||||
| 686 | if (!BIO_ctrl(bio,12,0,(char *)((char *)new_bio))
| 0 | ||||||||||||||||||
| 687 | BIO_free(new_bio); | - | ||||||||||||||||||
| 688 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||
| 689 | } | - | ||||||||||||||||||
| 690 | - | |||||||||||||||||||
| 691 | - | |||||||||||||||||||
| 692 | if (!CRYPTO_dup_ex_data(0,
| 0 | ||||||||||||||||||
| 693 | &new_bio->ex_data, &bio->ex_data)
| 0 | ||||||||||||||||||
| 694 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||
| 695 | - | |||||||||||||||||||
| 696 | if (ret ==
| 0 | ||||||||||||||||||
| 697 | ((void *)0)
| 0 | ||||||||||||||||||
| 698 | ) { | - | ||||||||||||||||||
| 699 | eoc = new_bio; | - | ||||||||||||||||||
| 700 | ret = eoc; | - | ||||||||||||||||||
| 701 | } never executed: else {end of block | 0 | ||||||||||||||||||
| 702 | BIO_push(eoc, new_bio); | - | ||||||||||||||||||
| 703 | eoc = new_bio; | - | ||||||||||||||||||
| 704 | } never executed: end of block | 0 | ||||||||||||||||||
| 705 | } | - | ||||||||||||||||||
| 706 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||
| 707 | err: | - | ||||||||||||||||||
| 708 | BIO_free(ret); | - | ||||||||||||||||||
| 709 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 710 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 711 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
| 712 | - | |||||||||||||||||||
| 713 | } | - | ||||||||||||||||||
| 714 | - | |||||||||||||||||||
| 715 | void | - | ||||||||||||||||||
| 716 | BIO_copy_next_retry(BIO *b) | - | ||||||||||||||||||
| 717 | { | - | ||||||||||||||||||
| 718 | BIO_set_flags(b, BIO_test_flags(b->next_bio, ((0x01|0x02|0x04)|0x08))); | - | ||||||||||||||||||
| 719 | b->retry_reason = b->next_bio->retry_reason; | - | ||||||||||||||||||
| 720 | } executed 1274 times by 6 tests: end of blockExecuted by:
| 1274 | ||||||||||||||||||
| 721 | - | |||||||||||||||||||
| 722 | int | - | ||||||||||||||||||
| 723 | BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | - | ||||||||||||||||||
| 724 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) | - | ||||||||||||||||||
| 725 | { | - | ||||||||||||||||||
| 726 | return never executed: CRYPTO_get_ex_new_index(0, argl, argp,return CRYPTO_get_ex_new_index(0, argl, argp, new_func, dup_func, free_func);never executed: return CRYPTO_get_ex_new_index(0, argl, argp, new_func, dup_func, free_func); | 0 | ||||||||||||||||||
| 727 | new_func, dup_func, free_func); never executed: return CRYPTO_get_ex_new_index(0, argl, argp, new_func, dup_func, free_func); | 0 | ||||||||||||||||||
| 728 | } | - | ||||||||||||||||||
| 729 | - | |||||||||||||||||||
| 730 | int | - | ||||||||||||||||||
| 731 | BIO_set_ex_data(BIO *bio, int idx, void *data) | - | ||||||||||||||||||
| 732 | { | - | ||||||||||||||||||
| 733 | 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 | ||||||||||||||||||
| 734 | } | - | ||||||||||||||||||
| 735 | - | |||||||||||||||||||
| 736 | void * | - | ||||||||||||||||||
| 737 | BIO_get_ex_data(BIO *bio, int idx) | - | ||||||||||||||||||
| 738 | { | - | ||||||||||||||||||
| 739 | 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 | ||||||||||||||||||
| 740 | } | - | ||||||||||||||||||
| 741 | - | |||||||||||||||||||
| 742 | unsigned long | - | ||||||||||||||||||
| 743 | BIO_number_read(BIO *bio) | - | ||||||||||||||||||
| 744 | { | - | ||||||||||||||||||
| 745 | if (bio
| 0 | ||||||||||||||||||
| 746 | return never executed: bio->num_read;return bio->num_read;never executed: return bio->num_read; | 0 | ||||||||||||||||||
| 747 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||
| 748 | } | - | ||||||||||||||||||
| 749 | - | |||||||||||||||||||
| 750 | unsigned long | - | ||||||||||||||||||
| 751 | BIO_number_written(BIO *bio) | - | ||||||||||||||||||
| 752 | { | - | ||||||||||||||||||
| 753 | if (bio
| 0 | ||||||||||||||||||
| 754 | return never executed: bio->num_write;return bio->num_write;never executed: return bio->num_write; | 0 | ||||||||||||||||||
| 755 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||
| 756 | } | - | ||||||||||||||||||
| Switch to Source code | Preprocessed file |