diff options
Diffstat (limited to 'src/lib/libssl/doc/SSL_set_fd.3')
-rw-r--r-- | src/lib/libssl/doc/SSL_set_fd.3 | 70 |
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 | ||
19 | sets the file descriptor | ||
20 | .Fa fd | ||
21 | as the input/output facility for the TLS/SSL (encrypted) side of | ||
22 | .Fa ssl . | ||
23 | .Fa fd | ||
24 | will typically be the socket file descriptor of a network connection. | ||
25 | .Pp | ||
26 | When performing the operation, a socket | ||
27 | .Vt BIO | ||
28 | is automatically created to interface between the | ||
29 | .Fa ssl | ||
30 | and | ||
31 | .Fa fd . | ||
32 | The | ||
33 | .Vt BIO | ||
34 | and hence the SSL engine inherit the behaviour of | ||
35 | .Fa fd . | ||
36 | If | ||
37 | .Fa fd | ||
38 | is non-blocking, the | ||
39 | .Fa ssl | ||
40 | will also have non-blocking behaviour. | ||
41 | .Pp | ||
42 | If there was already a | ||
43 | .Vt BIO | ||
44 | connected to | ||
45 | .Fa ssl , | ||
46 | .Xr BIO_free 3 | ||
47 | will be called (for both the reading and writing side, if different). | ||
48 | .Pp | ||
49 | .Fn SSL_set_rfd | ||
50 | and | ||
51 | .Fn SSL_set_wfd | ||
52 | perform the respective action, but only for the read channel or the write | ||
53 | channel, which can be set independently. | ||
54 | .Sh RETURN VALUES | ||
55 | The following return values can occur: | ||
56 | .Bl -tag -width Ds | ||
57 | .It 0 | ||
58 | The operation failed. | ||
59 | Check the error stack to find out why. | ||
60 | .It 1 | ||
61 | The 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 | ||