More secure storage of key material.
[openssl.git] / doc / crypto / BIO_s_mem.pod
index 9eb1fc056a74e70cfe5ac447666e6f778ba12c02..1aa7e6ebf9190551e6fc9152a28d1eae7d6ac147 100644 (file)
@@ -2,13 +2,15 @@
 
 =head1 NAME
 
-       BIO_s_mem - memory BIO
+BIO_s_mem, BIO_set_mem_eof_return, BIO_get_mem_data, BIO_set_mem_buf,
+BIO_get_mem_ptr, BIO_new_mem_buf - memory BIO
 
 =head1 SYNOPSIS
 
  #include <openssl/bio.h>
 
  BIO_METHOD *  BIO_s_mem(void);
+ BIO_METHOD *  BIO_s_secmem(void);
 
  BIO_set_mem_eof_return(BIO *b,int v)
  long BIO_get_mem_data(BIO *b, char **pp)
@@ -25,6 +27,9 @@ A memory BIO is a source/sink BIO which uses memory for its I/O. Data
 written to a memory BIO is stored in a BUF_MEM structure which is extended
 as appropriate to accommodate the stored data.
 
+BIO_s_secmem() is like BIO_s_mem() except that the secure heap is used
+for buffer storage.
+
 Any data written to a memory BIO can be recalled by reading from it.
 Unless the memory BIO is read only any data read from it is deleted from
 the BIO.
@@ -73,11 +78,14 @@ Writes to memory BIOs will always succeed if memory is available: that is
 their size can grow indefinitely.
 
 Every read from a read write memory BIO will remove the data just read with
-an internal copy operation, if a BIO contains a lots of data and it is
+an internal copy operation, if a BIO contains a lot of data and it is
 read in small chunks the operation can be very slow. The use of a read only
 memory BIO avoids this problem. If the BIO must be read write then adding
 a buffering BIO to the chain will speed up the process.
 
+Calling BIO_set_mem_buf() on a BIO created with BIO_new_secmem() will
+give undefined results, including perhaps a program crash.
+
 =head1 BUGS
 
 There should be an option to set the maximum size of a memory BIO.
@@ -86,9 +94,7 @@ There should be a way to "rewind" a read write BIO without destroying
 its contents.
 
 The copying operation should not occur after every small read of a large BIO
-to improve efficieny.
-
-There shoy
+to improve efficiency.
 
 =head1 EXAMPLE