SSL_PENDING(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

πŸ’… SSL_PENDING(3) πŸ’…

okay bestie, this is the SSL_PENDING(3) page from the Library Functions Manual, and it’s literally about checking how many readable bytes are already buffered in an SSL object. no cap.

🌸 NAME 🌸

SSL_pending β€” obtain number of readable bytes buffered in an SSL object.

✨ SYNOPSIS ✨

library β€œlibssl” libcrypto #include <openssl/ssl.h>

int
SSL_pending(const SSL *ssl);

πŸŽ€ DESCRIPTION πŸŽ€

Data comes in from the peer in whole blocks called records. A whole record gets processed β€” like decrypted β€” all in one go, and then it’s buffered until your app reads it by calling SSL_read(3).

SSL_pending() returns the number of bytes of application data that are available for immediate read.

Vibe check, bestie: SSL_pending() only takes into account bytes from the TLS/SSL record that is currently being processed, if there is one. it’s not out here counting every byte in the universe.

πŸ‘‘ RETURN VALUES πŸ‘‘

SSL_pending() returns the number of buffered and processed application data bytes that are pending and are available for immediate read.

🫢 SEE ALSO 🫢

🌈 HISTORY 🌈

SSL_pending() appeared in SSLeay 0.4 or earlier and has been available since OpenBSD 2.4. iconic longevity honestly.

πŸ’€ BUGS πŸ’€

Up to OpenSSL 0.9.6, SSL_pending() did not check if the record type of pending data is application data. yeah. noted.


Debian Β· June 8, 2025 Β· SSL_PENDING(3) β€” bye bestie, go read those bytes πŸ’–

πŸ“¦ where this page comes from