• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/OpenSSL098-52/src/crypto/bio/

Lines Matching refs:bio

1 /* crypto/bio/bio_lib.c */
63 #include <openssl/bio.h>
84 int BIO_set(BIO *bio, BIO_METHOD *method)
86 bio->method=method;
87 bio->callback=NULL;
88 bio->cb_arg=NULL;
89 bio->init=0;
90 bio->shutdown=1;
91 bio->flags=0;
92 bio->retry_reason=0;
93 bio->num=0;
94 bio->ptr=NULL;
95 bio->prev_bio=NULL;
96 bio->next_bio=NULL;
97 bio->references=1;
98 bio->num_read=0L;
99 bio->num_write=0L;
100 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data);
102 if (!method->create(bio))
104 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio,
105 &bio->ex_data);
408 size_t BIO_ctrl_pending(BIO *bio)
410 return BIO_ctrl(bio, BIO_CTRL_PENDING, 0, NULL);
413 size_t BIO_ctrl_wpending(BIO *bio)
415 return BIO_ctrl(bio, BIO_CTRL_WPENDING, 0, NULL);
419 /* put the 'bio' on the end of b's list of operators */
420 BIO *BIO_push(BIO *b, BIO *bio)
424 if (b == NULL) return(bio);
428 lb->next_bio=bio;
429 if (bio != NULL)
430 bio->prev_bio=lb;
456 BIO *BIO_get_retry_BIO(BIO *bio, int *reason)
460 b=last=bio;
472 int BIO_get_retry_reason(BIO *bio)
474 return(bio->retry_reason);
477 BIO *BIO_find_type(BIO *bio, int type)
481 if(!bio) return NULL;
484 if (bio->method != NULL)
486 mt=bio->method->type;
490 if (mt & type) return(bio);
493 return(bio);
495 bio=bio->next_bio;
496 } while (bio != NULL);
506 void BIO_free_all(BIO *bio)
511 while (bio != NULL)
513 b=bio;
515 bio=bio->next_bio;
524 BIO *ret=NULL,*eoc=NULL,*bio,*new;
526 for (bio=in; bio != NULL; bio=bio->next_bio)
528 if ((new=BIO_new(bio->method)) == NULL) goto err;
529 new->callback=bio->callback;
530 new->cb_arg=bio->cb_arg;
531 new->init=bio->init;
532 new->shutdown=bio->shutdown;
533 new->flags=bio->flags;
536 new->num=bio->num;
538 if (!BIO_dup_state(bio,(char *)new))
546 &bio->ex_data))
580 int BIO_set_ex_data(BIO *bio, int idx, void *data)
582 return(CRYPTO_set_ex_data(&(bio->ex_data),idx,data));
585 void *BIO_get_ex_data(BIO *bio, int idx)
587 return(CRYPTO_get_ex_data(&(bio->ex_data),idx));
590 unsigned long BIO_number_read(BIO *bio)
592 if(bio) return bio->num_read;
596 unsigned long BIO_number_written(BIO *bio)
598 if(bio) return bio->num_write;