From d3e6d6bcdfb725a57f94330367e7b752036c7a2c Mon Sep 17 00:00:00 2001 From: Kirill Marinushkin Date: Wed, 30 Mar 2016 18:39:42 +0200 Subject: [PATCH] moved structure bio_buf_mem_st from headers to bss_mem.c Reviewed-by: Richard Levitte Reviewed-by: Rich Salz --- crypto/bio/bio_lcl.h | 6 ------ crypto/bio/bss_mem.c | 8 ++++++++ include/openssl/ossl_typ.h | 1 - 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/crypto/bio/bio_lcl.h b/crypto/bio/bio_lcl.h index ffd9e89ccd..7f3b22268a 100644 --- a/crypto/bio/bio_lcl.h +++ b/crypto/bio/bio_lcl.h @@ -76,12 +76,6 @@ union bio_addr_st { /* END BIO_ADDRINFO/BIO_ADDR stuff. */ -/* BIO_BUF_MEM */ -struct bio_buf_mem_st { - struct buf_mem_st *buf; /* allocated buffer */ - struct buf_mem_st *readp; /* read pointer */ -}; - #include "internal/cryptlib.h" #include diff --git a/crypto/bio/bss_mem.c b/crypto/bio/bss_mem.c index 02fa28d733..46bd0343d5 100644 --- a/crypto/bio/bss_mem.c +++ b/crypto/bio/bss_mem.c @@ -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 diff --git a/include/openssl/ossl_typ.h b/include/openssl/ossl_typ.h index ee2f70af13..7a8d319989 100644 --- a/include/openssl/ossl_typ.h +++ b/include/openssl/ossl_typ.h @@ -128,7 +128,6 @@ typedef struct bn_recp_ctx_st BN_RECP_CTX; typedef struct bn_gencb_st BN_GENCB; typedef struct buf_mem_st BUF_MEM; -typedef struct bio_buf_mem_st BIO_BUF_MEM; typedef struct evp_cipher_st EVP_CIPHER; typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; -- 2.25.1