The documentation for Openssl memory BIO sinks is here.
I am creating a BIO chain to turn binary strings into base64 strings. The source/sink is always a memory location, and this enables me to just keep the same chain arround. However the data (should) go into a memory buffer managed by OpenSSL when I write to it, and it should come from a user supplied memory buffer when read from the chain.
BIO_set_mem_buf() is the function used to set a user supplied buffer, and I will set the BIO_NOCLOSE property as I manage my memory using new. Now in order to use the same chain for writing I need to change the memory bio into managing its own memory. My question is: " Will BIO_reset() change it back to managing its own memory after a user has supplied a custom buffer ? Are there any performance consequences of using a single chain for what I want to do ?"