blob: b66b5f1044e8f4836e2a573ccea2b6d00ea177cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
.\"
.\" $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
|