diff options
author | Richard Levitte <levitte@openssl.org> | 2016-11-18 18:18:37 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-06-29 11:55:31 +0200 |
commit | dc10560eba147b1b6484153b424d8f715c055e2f (patch) | |
tree | 57089590e921c55ce24e9a26cfa471009204b535 /include | |
parent | Make asn1_d2i_read_bio accessible from STORE (diff) | |
download | openssl-dc10560eba147b1b6484153b424d8f715c055e2f.tar.xz openssl-dc10560eba147b1b6484153b424d8f715c055e2f.zip |
Make it possible to peek at BIO data through BIO_f_buffer()
This is needed for the upcoming "file" scheme STORE loader.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/bio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/openssl/bio.h b/include/openssl/bio.h index 5f8f83a99e..75aa88442c 100644 --- a/include/openssl/bio.h +++ b/include/openssl/bio.h @@ -88,6 +88,7 @@ extern "C" { # define BIO_CTRL_SET_CALLBACK 14/* opt - set callback function */ # define BIO_CTRL_GET_CALLBACK 15/* opt - set callback function */ +# define BIO_CTRL_PEEK 29/* BIO_f_buffer special */ # define BIO_CTRL_SET_FILENAME 30/* BIO_s_file special */ /* dgram BIO stuff */ @@ -494,6 +495,7 @@ size_t BIO_ctrl_wpending(BIO *b); /* For the BIO_f_buffer() type */ # define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL) +# define BIO_buffer_peek(b,s,l) BIO_ctrl(b,BIO_CTRL_PEEK,(l),(s)) /* For BIO_s_bio() */ # define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL) |