The "enc" application provides a "-bufsize number" option to control the I/O buffer size, but this does not work correctly for use in pipelines since stdin and stdout are buffered by default on most OSes. For example, on my Linux system it calls fread() to request 80 bytes, but this results in a "read" syscall requesting 4096 bytes to fill the stdin buffer, which will block and wait if this much data isn't available yet.
A separate issue is that the code imposes a minimum of 80 byte block sizes for all I/O. Based on the comment this minimum should be used only when base64 encoding is active and not for binary I/O. The attached patch fixes these issues. (I had sent the patch to the devel mailing list for this previously on May 22 and Jul 27. The only response had been a concern about availability of the setvbuf function, and since the code already uses that it should not introduce any portability issues.) ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
