SSL_GET_FD(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

🌸 NAME 🌸

okay so welcome to the SSL_GET_FD(3ossl) page, bestie πŸ’… this is the OpenSSL manual for SSL_get_fd, SSL_get_rfd, and SSL_get_wfd β€” the girlies that get the file descriptor linked to an SSL object. no cap, that’s the whole vibe ✨


✨ SYNOPSIS ✨

#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 πŸ’–

okay so SSL_get_fd() returns the file descriptor which is linked to ssl. periodt πŸ’…

SSL_get_rfd() and SSL_get_wfd() return the file descriptors for the read or the write channel, which can be different. yes, they can lowkey be different channels πŸ‘€

if the read and the write channel are different, SSL_get_fd() will return the file descriptor of the read channel. that’s the rule, bestie, no cap ✨


πŸŽ€ 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). it’s giving wrong-type energy 😭
  • >=0 β€” the file descriptor linked to ssl. slay πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹

go read these too, iykyk 🫢


Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


kisses bestie, this iconic little page is from OpenSSL 3.5.0, dated 2026-09-25, and it’s the SSL_GET_FD(3ossl) manual page πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from