diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bio_lib.c')
-rw-r--r-- | src/lib/libcrypto/bio/bio_lib.c | 288 |
1 files changed, 203 insertions, 85 deletions
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c index 59c1317296..0b6c9ecac0 100644 --- a/src/lib/libcrypto/bio/bio_lib.c +++ b/src/lib/libcrypto/bio/bio_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio_lib.c,v 1.34 2022/01/07 09:02:17 tb Exp $ */ | 1 | /* $OpenBSD: bio_lib.c,v 1.35 2022/01/14 08:40:57 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -57,6 +57,7 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <errno.h> | 59 | #include <errno.h> |
60 | #include <limits.h> | ||
60 | #include <stdio.h> | 61 | #include <stdio.h> |
61 | 62 | ||
62 | #include <openssl/bio.h> | 63 | #include <openssl/bio.h> |
@@ -66,6 +67,55 @@ | |||
66 | 67 | ||
67 | #include "bio_local.h" | 68 | #include "bio_local.h" |
68 | 69 | ||
70 | /* | ||
71 | * Helper function to work out whether to call the new style callback or the old | ||
72 | * one, and translate between the two. | ||
73 | * | ||
74 | * This has a long return type for consistency with the old callback. Similarly | ||
75 | * for the "long" used for "inret" | ||
76 | */ | ||
77 | static long | ||
78 | bio_call_callback(BIO *b, int oper, const char *argp, size_t len, int argi, | ||
79 | long argl, long inret, size_t *processed) | ||
80 | { | ||
81 | long ret; | ||
82 | int bareoper; | ||
83 | |||
84 | if (b->callback_ex != NULL) | ||
85 | return b->callback_ex(b, oper, argp, len, argi, argl, inret, | ||
86 | processed); | ||
87 | |||
88 | /* | ||
89 | * We have an old style callback, so we will have to do nasty casts and | ||
90 | * check for overflows. | ||
91 | */ | ||
92 | |||
93 | bareoper = oper & ~BIO_CB_RETURN; | ||
94 | |||
95 | if (bareoper == BIO_CB_READ || bareoper == BIO_CB_WRITE || | ||
96 | bareoper == BIO_CB_GETS) { | ||
97 | /* In this case len is set and should be used instead of argi. */ | ||
98 | if (len > INT_MAX) | ||
99 | return -1; | ||
100 | argi = (int)len; | ||
101 | } | ||
102 | |||
103 | if (inret > 0 && (oper & BIO_CB_RETURN) && bareoper != BIO_CB_CTRL) { | ||
104 | if (*processed > INT_MAX) | ||
105 | return -1; | ||
106 | inret = *processed; | ||
107 | } | ||
108 | |||
109 | ret = b->callback(b, oper, argp, argi, argl, inret); | ||
110 | |||
111 | if (ret > 0 && (oper & BIO_CB_RETURN) && bareoper != BIO_CB_CTRL) { | ||
112 | *processed = (size_t)ret; | ||
113 | ret = 1; | ||
114 | } | ||
115 | |||
116 | return ret; | ||
117 | } | ||
118 | |||
69 | int | 119 | int |
70 | BIO_get_new_index(void) | 120 | BIO_get_new_index(void) |
71 | { | 121 | { |
@@ -85,6 +135,7 @@ BIO_new(const BIO_METHOD *method) | |||
85 | { | 135 | { |
86 | BIO *ret = NULL; | 136 | BIO *ret = NULL; |
87 | 137 | ||
138 | /* XXX calloc */ | ||
88 | ret = malloc(sizeof(BIO)); | 139 | ret = malloc(sizeof(BIO)); |
89 | if (ret == NULL) { | 140 | if (ret == NULL) { |
90 | BIOerror(ERR_R_MALLOC_FAILURE); | 141 | BIOerror(ERR_R_MALLOC_FAILURE); |
@@ -102,6 +153,7 @@ BIO_set(BIO *bio, const BIO_METHOD *method) | |||
102 | { | 153 | { |
103 | bio->method = method; | 154 | bio->method = method; |
104 | bio->callback = NULL; | 155 | bio->callback = NULL; |
156 | bio->callback_ex = NULL; | ||
105 | bio->cb_arg = NULL; | 157 | bio->cb_arg = NULL; |
106 | bio->init = 0; | 158 | bio->init = 0; |
107 | bio->shutdown = 1; | 159 | bio->shutdown = 1; |
@@ -115,29 +167,32 @@ BIO_set(BIO *bio, const BIO_METHOD *method) | |||
115 | bio->num_read = 0L; | 167 | bio->num_read = 0L; |
116 | bio->num_write = 0L; | 168 | bio->num_write = 0L; |
117 | CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data); | 169 | CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data); |
118 | if (method->create != NULL) | 170 | if (method->create != NULL) { |
119 | if (!method->create(bio)) { | 171 | if (!method->create(bio)) { |
120 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, | 172 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, |
121 | &bio->ex_data); | 173 | &bio->ex_data); |
122 | return (0); | 174 | return (0); |
123 | } | 175 | } |
176 | } | ||
124 | return (1); | 177 | return (1); |
125 | } | 178 | } |
126 | 179 | ||
127 | int | 180 | int |
128 | BIO_free(BIO *a) | 181 | BIO_free(BIO *a) |
129 | { | 182 | { |
130 | int i; | 183 | int ret; |
131 | 184 | ||
132 | if (a == NULL) | 185 | if (a == NULL) |
133 | return (0); | 186 | return (0); |
134 | 187 | ||
135 | i = CRYPTO_add(&a->references, -1, CRYPTO_LOCK_BIO); | 188 | if (CRYPTO_add(&a->references, -1, CRYPTO_LOCK_BIO) > 0) |
136 | if (i > 0) | ||
137 | return (1); | 189 | return (1); |
138 | if ((a->callback != NULL) && | 190 | |
139 | ((i = (int)a->callback(a, BIO_CB_FREE, NULL, 0, 0L, 1L)) <= 0)) | 191 | if (a->callback != NULL || a->callback_ex != NULL) { |
140 | return (i); | 192 | if ((ret = (int)bio_call_callback(a, BIO_CB_FREE, NULL, 0, 0, |
193 | 0L, 1L, NULL)) <= 0) | ||
194 | return (ret); | ||
195 | } | ||
141 | 196 | ||
142 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data); | 197 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data); |
143 | 198 | ||
@@ -214,20 +269,30 @@ BIO_set_flags(BIO *b, int flags) | |||
214 | b->flags |= flags; | 269 | b->flags |= flags; |
215 | } | 270 | } |
216 | 271 | ||
217 | long | 272 | BIO_callback_fn |
218 | (*BIO_get_callback(const BIO *b))(struct bio_st *, int, const char *, int, | 273 | BIO_get_callback(const BIO *b) |
219 | long, long) | ||
220 | { | 274 | { |
221 | return b->callback; | 275 | return b->callback; |
222 | } | 276 | } |
223 | 277 | ||
224 | void | 278 | void |
225 | BIO_set_callback(BIO *b, long (*cb)(struct bio_st *, int, const char *, int, | 279 | BIO_set_callback(BIO *b, BIO_callback_fn cb) |
226 | long, long)) | ||
227 | { | 280 | { |
228 | b->callback = cb; | 281 | b->callback = cb; |
229 | } | 282 | } |
230 | 283 | ||
284 | BIO_callback_fn_ex | ||
285 | BIO_get_callback_ex(const BIO *b) | ||
286 | { | ||
287 | return b->callback_ex; | ||
288 | } | ||
289 | |||
290 | void | ||
291 | BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex cb) | ||
292 | { | ||
293 | b->callback_ex = cb; | ||
294 | } | ||
295 | |||
231 | void | 296 | void |
232 | BIO_set_callback_arg(BIO *b, char *arg) | 297 | BIO_set_callback_arg(BIO *b, char *arg) |
233 | { | 298 | { |
@@ -255,8 +320,8 @@ BIO_method_type(const BIO *b) | |||
255 | int | 320 | int |
256 | BIO_read(BIO *b, void *out, int outl) | 321 | BIO_read(BIO *b, void *out, int outl) |
257 | { | 322 | { |
258 | int i; | 323 | size_t readbytes = 0; |
259 | long (*cb)(BIO *, int, const char *, int, long, long); | 324 | int ret; |
260 | 325 | ||
261 | if (b == NULL) | 326 | if (b == NULL) |
262 | return (0); | 327 | return (0); |
@@ -269,33 +334,44 @@ BIO_read(BIO *b, void *out, int outl) | |||
269 | return (-2); | 334 | return (-2); |
270 | } | 335 | } |
271 | 336 | ||
272 | cb = b->callback; | 337 | if (b->callback != NULL || b->callback_ex != NULL) { |
273 | if ((cb != NULL) && | 338 | if ((ret = (int)bio_call_callback(b, BIO_CB_READ, out, outl, 0, |
274 | ((i = (int)cb(b, BIO_CB_READ, out, outl, 0L, 1L)) <= 0)) | 339 | 0L, 1L, NULL)) <= 0) |
275 | return (i); | 340 | return (ret); |
341 | } | ||
276 | 342 | ||
277 | if (!b->init) { | 343 | if (!b->init) { |
278 | BIOerror(BIO_R_UNINITIALIZED); | 344 | BIOerror(BIO_R_UNINITIALIZED); |
279 | return (-2); | 345 | return (-2); |
280 | } | 346 | } |
281 | 347 | ||
282 | i = b->method->bread(b, out, outl); | 348 | if ((ret = b->method->bread(b, out, outl)) > 0) |
349 | readbytes = (size_t)ret; | ||
283 | 350 | ||
284 | if (i > 0) | 351 | b->num_read += readbytes; |
285 | b->num_read += (unsigned long)i; | ||
286 | 352 | ||
287 | if (cb != NULL) | 353 | if (b->callback != NULL || b->callback_ex != NULL) { |
288 | i = (int)cb(b, BIO_CB_READ|BIO_CB_RETURN, out, outl, | 354 | ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, |
289 | 0L, (long)i); | 355 | out, outl, 0, 0L, (ret > 0) ? 1 : ret, &readbytes); |
356 | } | ||
290 | 357 | ||
291 | return (i); | 358 | if (ret > 0) { |
359 | if (readbytes > INT_MAX) { | ||
360 | BIOerror(BIO_R_LENGTH_TOO_LONG); | ||
361 | ret = -1; | ||
362 | } else { | ||
363 | ret = (int)readbytes; | ||
364 | } | ||
365 | } | ||
366 | |||
367 | return (ret); | ||
292 | } | 368 | } |
293 | 369 | ||
294 | int | 370 | int |
295 | BIO_write(BIO *b, const void *in, int inl) | 371 | BIO_write(BIO *b, const void *in, int inl) |
296 | { | 372 | { |
297 | int i; | 373 | size_t writebytes = 0; |
298 | long (*cb)(BIO *, int, const char *, int, long, long); | 374 | int ret; |
299 | 375 | ||
300 | if (b == NULL) | 376 | if (b == NULL) |
301 | return (0); | 377 | return (0); |
@@ -308,86 +384,123 @@ BIO_write(BIO *b, const void *in, int inl) | |||
308 | return (-2); | 384 | return (-2); |
309 | } | 385 | } |
310 | 386 | ||
311 | cb = b->callback; | 387 | if (b->callback != NULL || b->callback_ex != NULL) { |
312 | if ((cb != NULL) && | 388 | if ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, in, inl, 0, |
313 | ((i = (int)cb(b, BIO_CB_WRITE, in, inl, 0L, 1L)) <= 0)) | 389 | 0L, 1L, NULL)) <= 0) |
314 | return (i); | 390 | return (ret); |
391 | } | ||
315 | 392 | ||
316 | if (!b->init) { | 393 | if (!b->init) { |
317 | BIOerror(BIO_R_UNINITIALIZED); | 394 | BIOerror(BIO_R_UNINITIALIZED); |
318 | return (-2); | 395 | return (-2); |
319 | } | 396 | } |
320 | 397 | ||
321 | i = b->method->bwrite(b, in, inl); | 398 | if ((ret = b->method->bwrite(b, in, inl)) > 0) |
399 | writebytes = ret; | ||
400 | |||
401 | b->num_write += writebytes; | ||
402 | |||
403 | if (b->callback != NULL || b->callback_ex != NULL) { | ||
404 | ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, | ||
405 | in, inl, 0, 0L, (ret > 0) ? 1 : ret, &writebytes); | ||
406 | } | ||
322 | 407 | ||
323 | if (i > 0) | 408 | if (ret > 0) { |
324 | b->num_write += (unsigned long)i; | 409 | if (writebytes > INT_MAX) { |
410 | BIOerror(BIO_R_LENGTH_TOO_LONG); | ||
411 | ret = -1; | ||
412 | } else { | ||
413 | ret = (int)writebytes; | ||
414 | } | ||
415 | } | ||
325 | 416 | ||
326 | if (cb != NULL) | 417 | return (ret); |
327 | i = (int)cb(b, BIO_CB_WRITE|BIO_CB_RETURN, in, inl, | ||
328 | 0L, (long)i); | ||
329 | return (i); | ||
330 | } | 418 | } |
331 | 419 | ||
332 | int | 420 | int |
333 | BIO_puts(BIO *b, const char *in) | 421 | BIO_puts(BIO *b, const char *in) |
334 | { | 422 | { |
335 | int i; | 423 | size_t writebytes = 0; |
336 | long (*cb)(BIO *, int, const char *, int, long, long); | 424 | int ret; |
337 | 425 | ||
338 | if ((b == NULL) || (b->method == NULL) || (b->method->bputs == NULL)) { | 426 | if (b == NULL || b->method == NULL || b->method->bputs == NULL) { |
339 | BIOerror(BIO_R_UNSUPPORTED_METHOD); | 427 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
340 | return (-2); | 428 | return (-2); |
341 | } | 429 | } |
342 | 430 | ||
343 | cb = b->callback; | 431 | if (b->callback != NULL || b->callback_ex != NULL) { |
344 | 432 | if ((ret = (int)bio_call_callback(b, BIO_CB_PUTS, in, 0, 0, 0L, | |
345 | if ((cb != NULL) && | 433 | 1L, NULL)) <= 0) |
346 | ((i = (int)cb(b, BIO_CB_PUTS, in, 0, 0L, 1L)) <= 0)) | 434 | return (ret); |
347 | return (i); | 435 | } |
348 | 436 | ||
349 | if (!b->init) { | 437 | if (!b->init) { |
350 | BIOerror(BIO_R_UNINITIALIZED); | 438 | BIOerror(BIO_R_UNINITIALIZED); |
351 | return (-2); | 439 | return (-2); |
352 | } | 440 | } |
353 | 441 | ||
354 | i = b->method->bputs(b, in); | 442 | if ((ret = b->method->bputs(b, in)) > 0) |
443 | writebytes = ret; | ||
355 | 444 | ||
356 | if (i > 0) | 445 | b->num_write += writebytes; |
357 | b->num_write += (unsigned long)i; | ||
358 | 446 | ||
359 | if (cb != NULL) | 447 | if (b->callback != NULL || b->callback_ex != NULL) { |
360 | i = (int)cb(b, BIO_CB_PUTS|BIO_CB_RETURN, in, 0, 0L, (long)i); | 448 | ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, |
361 | return (i); | 449 | in, 0, 0, 0L, (ret > 0) ? 1 : ret, &writebytes); |
450 | } | ||
451 | |||
452 | if (ret > 0) { | ||
453 | if (writebytes > INT_MAX) { | ||
454 | BIOerror(BIO_R_LENGTH_TOO_LONG); | ||
455 | ret = -1; | ||
456 | } else { | ||
457 | ret = (int)writebytes; | ||
458 | } | ||
459 | } | ||
460 | |||
461 | return (ret); | ||
362 | } | 462 | } |
363 | 463 | ||
364 | int | 464 | int |
365 | BIO_gets(BIO *b, char *in, int inl) | 465 | BIO_gets(BIO *b, char *in, int inl) |
366 | { | 466 | { |
367 | int i; | 467 | size_t readbytes; |
368 | long (*cb)(BIO *, int, const char *, int, long, long); | 468 | int ret; |
369 | 469 | ||
370 | if ((b == NULL) || (b->method == NULL) || (b->method->bgets == NULL)) { | 470 | if (b == NULL || b->method == NULL || b->method->bgets == NULL) { |
371 | BIOerror(BIO_R_UNSUPPORTED_METHOD); | 471 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
372 | return (-2); | 472 | return (-2); |
373 | } | 473 | } |
374 | 474 | ||
375 | cb = b->callback; | 475 | if (b->callback != NULL || b->callback_ex != NULL) { |
376 | 476 | if ((ret = (int)bio_call_callback(b, BIO_CB_GETS, in, inl, 0, 0L, | |
377 | if ((cb != NULL) && | 477 | 1, NULL)) <= 0) |
378 | ((i = (int)cb(b, BIO_CB_GETS, in, inl, 0L, 1L)) <= 0)) | 478 | return (ret); |
379 | return (i); | 479 | } |
380 | 480 | ||
381 | if (!b->init) { | 481 | if (!b->init) { |
382 | BIOerror(BIO_R_UNINITIALIZED); | 482 | BIOerror(BIO_R_UNINITIALIZED); |
383 | return (-2); | 483 | return (-2); |
384 | } | 484 | } |
385 | 485 | ||
386 | i = b->method->bgets(b, in, inl); | 486 | if ((ret = b->method->bgets(b, in, inl)) > 0) |
487 | readbytes = ret; | ||
488 | |||
489 | if (b->callback != NULL || b->callback_ex != NULL) { | ||
490 | ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, in, | ||
491 | inl, 0, 0L, (ret > 0) ? 1 : ret, &readbytes); | ||
492 | } | ||
493 | |||
494 | if (ret > 0) { | ||
495 | if (readbytes > INT_MAX) { | ||
496 | BIOerror(BIO_R_LENGTH_TOO_LONG); | ||
497 | ret = -1; | ||
498 | } else { | ||
499 | ret = (int)readbytes; | ||
500 | } | ||
501 | } | ||
387 | 502 | ||
388 | if (cb != NULL) | 503 | return (ret); |
389 | i = (int)cb(b, BIO_CB_GETS|BIO_CB_RETURN, in, inl, 0L, (long)i); | ||
390 | return (i); | ||
391 | } | 504 | } |
392 | 505 | ||
393 | int | 506 | int |
@@ -427,54 +540,58 @@ long | |||
427 | BIO_ctrl(BIO *b, int cmd, long larg, void *parg) | 540 | BIO_ctrl(BIO *b, int cmd, long larg, void *parg) |
428 | { | 541 | { |
429 | long ret; | 542 | long ret; |
430 | long (*cb)(BIO *, int, const char *, int, long, long); | ||
431 | 543 | ||
432 | if (b == NULL) | 544 | if (b == NULL) |
433 | return (0); | 545 | return (0); |
434 | 546 | ||
435 | if ((b->method == NULL) || (b->method->ctrl == NULL)) { | 547 | if (b->method == NULL || b->method->ctrl == NULL) { |
436 | BIOerror(BIO_R_UNSUPPORTED_METHOD); | 548 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
437 | return (-2); | 549 | return (-2); |
438 | } | 550 | } |
439 | 551 | ||
440 | cb = b->callback; | 552 | if (b->callback != NULL || b->callback_ex != NULL) { |
441 | 553 | if ((ret = bio_call_callback(b, BIO_CB_CTRL, parg, 0, cmd, larg, | |
442 | if ((cb != NULL) && | 554 | 1L, NULL)) <= 0) |
443 | ((ret = cb(b, BIO_CB_CTRL, parg, cmd, larg, 1L)) <= 0)) | 555 | return (ret); |
444 | return (ret); | 556 | } |
445 | 557 | ||
446 | ret = b->method->ctrl(b, cmd, larg, parg); | 558 | ret = b->method->ctrl(b, cmd, larg, parg); |
447 | 559 | ||
448 | if (cb != NULL) | 560 | if (b->callback != NULL || b->callback_ex != NULL) { |
449 | ret = cb(b, BIO_CB_CTRL|BIO_CB_RETURN, parg, cmd, larg, ret); | 561 | ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, |
562 | cmd, larg, ret, NULL); | ||
563 | } | ||
564 | |||
450 | return (ret); | 565 | return (ret); |
451 | } | 566 | } |
452 | 567 | ||
453 | long | 568 | long |
454 | BIO_callback_ctrl(BIO *b, int cmd, | 569 | BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) |
455 | void (*fp)(struct bio_st *, int, const char *, int, long, long)) | ||
456 | { | 570 | { |
457 | long ret; | 571 | long ret; |
458 | long (*cb)(BIO *, int, const char *, int, long, long); | ||
459 | 572 | ||
460 | if (b == NULL) | 573 | if (b == NULL) |
461 | return (0); | 574 | return (0); |
462 | 575 | ||
463 | if ((b->method == NULL) || (b->method->callback_ctrl == NULL)) { | 576 | if (b->method == NULL || b->method->callback_ctrl == NULL || |
577 | cmd != BIO_CTRL_SET_CALLBACK) { | ||
464 | BIOerror(BIO_R_UNSUPPORTED_METHOD); | 578 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
465 | return (-2); | 579 | return (-2); |
466 | } | 580 | } |
467 | 581 | ||
468 | cb = b->callback; | 582 | if (b->callback != NULL || b->callback_ex != NULL) { |
469 | 583 | if ((ret = bio_call_callback(b, BIO_CB_CTRL, (void *)&fp, 0, | |
470 | if ((cb != NULL) && | 584 | cmd, 0, 1L, NULL)) <= 0) |
471 | ((ret = cb(b, BIO_CB_CTRL, (void *)&fp, cmd, 0, 1L)) <= 0)) | 585 | return (ret); |
472 | return (ret); | 586 | } |
473 | 587 | ||
474 | ret = b->method->callback_ctrl(b, cmd, fp); | 588 | ret = b->method->callback_ctrl(b, cmd, fp); |
475 | 589 | ||
476 | if (cb != NULL) | 590 | if (b->callback != NULL || b->callback_ex != NULL) { |
477 | ret = cb(b, BIO_CB_CTRL|BIO_CB_RETURN, (void *)&fp, cmd, 0, ret); | 591 | ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, |
592 | (void *)&fp, 0, cmd, 0, ret, NULL); | ||
593 | } | ||
594 | |||
478 | return (ret); | 595 | return (ret); |
479 | } | 596 | } |
480 | 597 | ||
@@ -628,6 +745,7 @@ BIO_dup_chain(BIO *in) | |||
628 | if ((new_bio = BIO_new(bio->method)) == NULL) | 745 | if ((new_bio = BIO_new(bio->method)) == NULL) |
629 | goto err; | 746 | goto err; |
630 | new_bio->callback = bio->callback; | 747 | new_bio->callback = bio->callback; |
748 | new_bio->callback_ex = bio->callback_ex; | ||
631 | new_bio->cb_arg = bio->cb_arg; | 749 | new_bio->cb_arg = bio->cb_arg; |
632 | new_bio->init = bio->init; | 750 | new_bio->init = bio->init; |
633 | new_bio->shutdown = bio->shutdown; | 751 | new_bio->shutdown = bio->shutdown; |