.\" .\" $OpenBSD: SSL_get_fd.3,v 1.2 2014/12/02 14:11:01 jmc Exp $ .\" .Dd $Mdocdate: December 2 2014 $ .Dt SSL_GET_FD 3 .Os .Sh NAME .Nm SSL_get_fd , .Nm SSL_get_rfd , .Nm SSL_get_wfd .Nd get file descriptor linked to an SSL object .Sh SYNOPSIS .In openssl/ssl.h .Ft int .Fn SSL_get_fd "const SSL *ssl" .Ft int .Fn SSL_get_rfd "const SSL *ssl" .Ft int .Fn SSL_get_wfd "const SSL *ssl" .Sh DESCRIPTION .Fn SSL_get_fd returns the file descriptor which is linked to .Fa ssl . .Fn SSL_get_rfd and .Fn SSL_get_wfd return the file descriptors for the read or the write channel, which can be different. If the read and the write channel are different, .Fn SSL_get_fd will return the file descriptor of the read channel. .Sh RETURN VALUES The following return values can occur: .Bl -tag -width Ds .It \(mi1 The operation failed, because the underlying .Vt BIO is not of the correct type (suitable for file descriptors). .It \(>=0 The file descriptor linked to .Fa ssl . .El .Sh SEE ALSO .Xr bio 3 , .Xr ssl 3 , .Xr SSL_set_fd 3