SSL_GET_FD(3)

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

πŸ’– NAME πŸ’–

okay so bestie, welcome to SSL_GET_FD(3) from the Library Functions Manual β€” this is the page for SSL_get_fd, SSL_get_rfd, and SSL_get_wfd, aka the little functions that get you the file descriptor linked to an SSL object. slay. πŸ’…

✨ SYNOPSIS ✨

the synopsis is giving library-and-header energy, and it goes exactly like this:

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

int
SSL_get_fd(const SSL *ssl);

int
SSL_get_rfd(const SSL *ssl);

int
SSL_get_wfd(const SSL *ssl);

πŸ¦‹ DESCRIPTION πŸ¦‹

so SSL_get_fd() returns the file descriptor which is linked to ssl. iconic.

SSL_get_rfd() and SSL_get_wfd() return the file descriptors for the read or the write channel, which can be different. no cap.

if the read and the write channel are different, SSL_get_fd() will return the file descriptor of the read channel. periodt. πŸŽ€

πŸŽ€ RETURN VALUES πŸŽ€

the following return values can occur:

  • βˆ’1 β€” the operation failed, because the underlying BIO is not of the correct type (suitable for file descriptors). oof. πŸ’€
  • β‰₯0 β€” the file descriptor linked to ssl. yay. 🌸

🌈 SEE ALSO 🌈

πŸ‘‘ HISTORY πŸ‘‘

SSL_get_fd() appeared in SSLeay 0.4 or earlier and has been available since OpenBSD 2.4. fr fr. 🫢

SSL_get_rfd() and SSL_get_wfd() first appeared in OpenSSL 0.9.6c and have been available since OpenBSD 3.2. πŸ’«


and that's the whole vibe, bestie πŸ’– β€” this page is from Debian, dated June 8, 2025, under the SSL_GET_FD(3) name. byeee πŸ¦‹

πŸ“¦ where this page comes from