moved structure bio_buf_mem_st from headers to bss_mem.c
[openssl.git] / crypto / bio / bss_mem.c
index 02fa28d7333b77b450b7e6a4ea12135c454f86eb..46bd0343d547bae2e564fa7096a1da32438465d4 100644 (file)
@@ -70,6 +70,7 @@ static int secmem_new(BIO *h);
 static int mem_free(BIO *data);
 static int mem_buf_free(BIO *data, int free_all);
 static int mem_buf_sync(BIO *h);
+
 static const BIO_METHOD mem_method = {
     BIO_TYPE_MEM,
     "memory buffer",
@@ -82,6 +83,7 @@ static const BIO_METHOD mem_method = {
     mem_free,
     NULL,
 };
+
 static const BIO_METHOD secmem_method = {
     BIO_TYPE_MEM,
     "secure memory buffer",
@@ -95,6 +97,12 @@ static const BIO_METHOD secmem_method = {
     NULL,
 };
 
+/* BIO memory stores buffer and read pointer  */
+typedef struct bio_buf_mem_st {
+    struct buf_mem_st *buf;   /* allocated buffer */
+    struct buf_mem_st *readp; /* read pointer */
+} BIO_BUF_MEM;
+
 /*
  * bio->num is used to hold the value to return on 'empty', if it is 0,
  * should_retry is not set