Encryption BIOs misbehave when used with non blocking I/O.
Two fixes: 1. If BIO_write() fails inside enc_write() it should return the total number of bytes successfully written. 2. If BIO_write() fails during BIO_flush() it should return immediately with the error code: previously it would fall through to the final encrypt, corrupting the buffer.
Showing
想要评论请 注册 或 登录