summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_set_fd.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/doc/SSL_set_fd.3')
-rw-r--r--src/lib/libssl/doc/SSL_set_fd.370
1 files changed, 70 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_set_fd.3 b/src/lib/libssl/doc/SSL_set_fd.3
new file mode 100644
index 0000000000..94345ae236
--- /dev/null
+++ b/src/lib/libssl/doc/SSL_set_fd.3
@@ -0,0 +1,70 @@
1.Dd $Mdocdate: October 12 2014 $
2.Dt SSL_SET_FD 3
3.Os
4.Sh NAME
5.Nm SSL_set_fd ,
6.Nm SSL_set_rfd ,
7.Nm SSL_set_wfd
8.Nd connect the SSL object with a file descriptor
9.Sh SYNOPSIS
10.In openssl/ssl.h
11.Ft int
12.Fn SSL_set_fd "SSL *ssl" "int fd"
13.Ft int
14.Fn SSL_set_rfd "SSL *ssl" "int fd"
15.Ft int
16.Fn SSL_set_wfd "SSL *ssl" "int fd"
17.Sh DESCRIPTION
18.Fn SSL_set_fd
19sets the file descriptor
20.Fa fd
21as the input/output facility for the TLS/SSL (encrypted) side of
22.Fa ssl .
23.Fa fd
24will typically be the socket file descriptor of a network connection.
25.Pp
26When performing the operation, a socket
27.Vt BIO
28is automatically created to interface between the
29.Fa ssl
30and
31.Fa fd .
32The
33.Vt BIO
34and hence the SSL engine inherit the behaviour of
35.Fa fd .
36If
37.Fa fd
38is non-blocking, the
39.Fa ssl
40will also have non-blocking behaviour.
41.Pp
42If there was already a
43.Vt BIO
44connected to
45.Fa ssl ,
46.Xr BIO_free 3
47will be called (for both the reading and writing side, if different).
48.Pp
49.Fn SSL_set_rfd
50and
51.Fn SSL_set_wfd
52perform the respective action, but only for the read channel or the write
53channel, which can be set independently.
54.Sh RETURN VALUES
55The following return values can occur:
56.Bl -tag -width Ds
57.It 0
58The operation failed.
59Check the error stack to find out why.
60.It 1
61The operation succeeded.
62.El
63.Sh SEE ALSO
64.Xr bio 3 ,
65.Xr ssl 3 ,
66.Xr SSL_accept 3 ,
67.Xr SSL_connect 3 ,
68.Xr SSL_get_fd 3 ,
69.Xr SSL_set_bio 3 ,
70.Xr SSL_shutdown 3