Adam Jones wrote:
Visual C++ did not complain nor did it error out when it ran, but you are correct it does take a BUF_MEM structure. I also added another BIO method to the code. I also read that section in the book you suggested. I also made the code simple, but it appears that it still does not give me the base64 encoding. Any suggestions...int main() { BIO *bmem, *b64; char message[] = "Hello World \n"; int written = 0; b64 = BIO_new(BIO_f_base64()); bmem = BIO_new(BIO_s_mem()); bmem = BIO_push(b64, bmem); written = BIO_write(b64, message, strlen(message)); cout << written << endl; BIO_flush(b64); BIO_free_all(b64); }
Take a good look at that code...you create the memory BIO, but then never bother to use it. Specifically, you probably mean:
b64 = BIO_push(b64, bmem); -- Thomas Hruska Shining Light Productions Home of BMP2AVI, Nuclear Vision, ProtoNova, and Win32 OpenSSL. http://www.slproweb.com/ Ask me about discounts on any Shining Light Productions product! ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
