-.\" $OpenBSD: BIO_read.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $
+.\" $OpenBSD: BIO_read.3,v 1.9 2021/11/14 13:40:16 schwarze Exp $
.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: March 27 2018 $
+.Dd $Mdocdate: November 14 2021 $
.Dt BIO_READ 3
.Os
.Sh NAME
.Fa buf .
Usually this operation will attempt to read a line of data
from the BIO of maximum length
-.Fa len No - 1 .
+.Fa size No \- 1 .
There are exceptions to this however, for example
.Fn BIO_gets
on a digest BIO will calculate and return the digest
.Sh RETURN VALUES
All these functions return either the amount of data successfully
read or written (if the return value is positive) or that no data
-was successfully read or written if the result is 0 or -1.
-If the return value is -2, then the operation is not implemented
+was successfully read or written if the result is 0 or \-1.
+If the return value is \-2, then the operation is not implemented
in the specific BIO type.
The trailing NUL is not included in the length returned by
.Fn BIO_gets .
.Pp
-A 0 or -1 return is not necessarily an indication of an error.
+A 0 or \-1 return is not necessarily an indication of an error.
In particular when the source/sink is non-blocking or of a certain type
it may merely be an indication that no data is currently available and that
the application should retry the operation later.