os: Darwin Kernel Version 9.5.0
Second example on man page has:
while((inlen = BIO_read(bio, inbuf, 512) > 0)
BIO_write(bio_out, inbuf, inlen);
should be:
while((inlen = BIO_read(bio, inbuf, 512)) > 0)
BIO_write(bio_out, inbuf, inlen);
while((inlen = BIO_read(bio, inbuf, 512) > 0)
BIO_write(bio_out, inbuf, inlen);
while((inlen = BIO_read(bio, inbuf, 512)) > 0)
BIO_write(bio_out, inbuf, inlen);