Lines Matching refs:b

78     BIO_LINEBUFFER_CTX *b;  in linebuffer_free()  local
82 b = (BIO_LINEBUFFER_CTX *)a->ptr; in linebuffer_free()
83 OPENSSL_free(b->obuf); in linebuffer_free()
91 static int linebuffer_read(BIO *b, char *out, int outl) in linebuffer_read() argument
97 if (b->next_bio == NULL) in linebuffer_read()
99 ret = BIO_read(b->next_bio, out, outl); in linebuffer_read()
100 BIO_clear_retry_flags(b); in linebuffer_read()
101 BIO_copy_next_retry(b); in linebuffer_read()
105 static int linebuffer_write(BIO *b, const char *in, int inl) in linebuffer_write() argument
112 ctx = (BIO_LINEBUFFER_CTX *)b->ptr; in linebuffer_write()
113 if ((ctx == NULL) || (b->next_bio == NULL)) in linebuffer_write()
116 BIO_clear_retry_flags(b); in linebuffer_write()
153 i = BIO_write(b->next_bio, ctx->obuf, ctx->obuf_len); in linebuffer_write()
156 BIO_copy_next_retry(b); in linebuffer_write()
173 i = BIO_write(b->next_bio, in, p - in); in linebuffer_write()
175 BIO_copy_next_retry(b); in linebuffer_write()
200 static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr) in linebuffer_ctrl() argument
209 ctx = (BIO_LINEBUFFER_CTX *)b->ptr; in linebuffer_ctrl()
214 if (b->next_bio == NULL) in linebuffer_ctrl()
216 ret = BIO_ctrl(b->next_bio, cmd, num, ptr); in linebuffer_ctrl()
224 if (b->next_bio == NULL) in linebuffer_ctrl()
226 ret = BIO_ctrl(b->next_bio, cmd, num, ptr); in linebuffer_ctrl()
250 if (b->next_bio == NULL) in linebuffer_ctrl()
252 BIO_clear_retry_flags(b); in linebuffer_ctrl()
253 ret = BIO_ctrl(b->next_bio, cmd, num, ptr); in linebuffer_ctrl()
254 BIO_copy_next_retry(b); in linebuffer_ctrl()
258 if (b->next_bio == NULL) in linebuffer_ctrl()
261 ret = BIO_ctrl(b->next_bio, cmd, num, ptr); in linebuffer_ctrl()
262 BIO_copy_next_retry(b); in linebuffer_ctrl()
267 BIO_clear_retry_flags(b); in linebuffer_ctrl()
269 r = BIO_write(b->next_bio, ctx->obuf, ctx->obuf_len); in linebuffer_ctrl()
270 BIO_copy_next_retry(b); in linebuffer_ctrl()
281 ret = BIO_ctrl(b->next_bio, cmd, num, ptr); in linebuffer_ctrl()
282 BIO_copy_next_retry(b); in linebuffer_ctrl()
290 if (b->next_bio == NULL) in linebuffer_ctrl()
292 ret = BIO_ctrl(b->next_bio, cmd, num, ptr); in linebuffer_ctrl()
298 static long linebuffer_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) in linebuffer_callback_ctrl() argument
300 if (b->next_bio == NULL) in linebuffer_callback_ctrl()
302 return BIO_callback_ctrl(b->next_bio, cmd, fp); in linebuffer_callback_ctrl()
305 static int linebuffer_gets(BIO *b, char *buf, int size) in linebuffer_gets() argument
307 if (b->next_bio == NULL) in linebuffer_gets()
309 return BIO_gets(b->next_bio, buf, size); in linebuffer_gets()
312 static int linebuffer_puts(BIO *b, const char *str) in linebuffer_puts() argument
314 return linebuffer_write(b, str, strlen(str)); in linebuffer_puts()