|SSL_PENDING(3)||Library Functions Manual||SSL_PENDING(3)|
SSL_pending() returns the number of bytes
which are available inside ssl for immediate read.
SSL_pending() takes into account only
bytes from the TLS/SSL record that is currently being processed (if any). If
the ssl->read_ahead flag is set (see
additional protocol bytes beyond the current record may have been read
containing more TLS/SSL records. This also applies to DTLS. These additional
bytes will be buffered but will remain unprocessed until they are needed. As
these bytes are still in an unprocessed state,
SSL_pending() will ignore them. Therefore it is
possible for no more bytes to be readable from the underlying BIO (because
the library has already read them) and for
SSL_pending() to return 0, even though readable
application data bytes are available (because the data is in unprocessed
SSL_pending() returns the number of buffered and processed application data bytes that are pending and are available for immediate read.
SSL_pending() appeared in SSLeay 0.4 or earlier and has been available since OpenBSD 2.4.
SSL_pending() did not check if the record type of pending data is application data.
|March 27, 2018||OpenBSD-current|