From d07aee2c7a33e77d97d8e13811af3637e3849cb2 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 5 Sep 2016 17:26:58 +0100 Subject: Create BIO_read_ex() which handles size_t arguments Also extend BIO_METHOD to be able to supply an implementation for the new BIO_read function. Reviewed-by: Richard Levitte --- include/internal/bio.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/internal') diff --git a/include/internal/bio.h b/include/internal/bio.h index 3b6a6ac4d2..f840bcd32c 100644 --- a/include/internal/bio.h +++ b/include/internal/bio.h @@ -13,7 +13,8 @@ struct bio_method_st { int type; const char *name; int (*bwrite) (BIO *, const char *, int); - int (*bread) (BIO *, char *, int); + int (*bread) (BIO *, char *, size_t, size_t *); + int (*bread_old) (BIO *, char *, int); int (*bputs) (BIO *, const char *); int (*bgets) (BIO *, char *, int); long (*ctrl) (BIO *, int, long, void *); @@ -24,3 +25,7 @@ struct bio_method_st { void bio_free_ex_data(BIO *bio); void bio_cleanup(void); + + +/* Old style to new style BIO_METHOD conversion functions */ +int bread_conv(BIO *bio, char *out, size_t outl, size_t *read); -- cgit v1.2.3