diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/BIO_s_fd.3 | 45 | ||||
-rw-r--r-- | src/lib/libcrypto/man/BIO_s_socket.3 | 47 |
2 files changed, 32 insertions, 60 deletions
diff --git a/src/lib/libcrypto/man/BIO_s_fd.3 b/src/lib/libcrypto/man/BIO_s_fd.3 index 004126565e..591b25d2f2 100644 --- a/src/lib/libcrypto/man/BIO_s_fd.3 +++ b/src/lib/libcrypto/man/BIO_s_fd.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: BIO_s_fd.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: BIO_s_fd.3,v 1.3 2016/11/06 16:43:53 schwarze Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 6 2016 $ |
4 | .Dt BIO_S_FD 3 | 4 | .Dt BIO_S_FD 3 |
@@ -15,8 +15,17 @@ | |||
15 | .Fo BIO_s_fd | 15 | .Fo BIO_s_fd |
16 | .Fa "void" | 16 | .Fa "void" |
17 | .Fc | 17 | .Fc |
18 | .Fd #define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) | 18 | .Ft long |
19 | .Fd #define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c) | 19 | .Fo BIO_set_fd |
20 | .Fa "BIO *b" | ||
21 | .Fa "int fd" | ||
22 | .Fa "long close_flag" | ||
23 | .Fc | ||
24 | .Ft long | ||
25 | .Fo BIO_get_fd | ||
26 | .Fa "BIO *b" | ||
27 | .Fa "int *c" | ||
28 | .Fc | ||
20 | .Ft BIO * | 29 | .Ft BIO * |
21 | .Fo BIO_new_fd | 30 | .Fo BIO_new_fd |
22 | .Fa "int fd" | 31 | .Fa "int fd" |
@@ -41,7 +50,9 @@ is not. | |||
41 | .Pp | 50 | .Pp |
42 | If the close flag is set, | 51 | If the close flag is set, |
43 | .Xr close 2 | 52 | .Xr close 2 |
44 | is called on the underlying file descriptor when the BIO is freed. | 53 | is called on the underlying file descriptor when the |
54 | .Vt BIO | ||
55 | is freed. | ||
45 | .Pp | 56 | .Pp |
46 | .Xr BIO_reset 3 | 57 | .Xr BIO_reset 3 |
47 | attempts to set the file pointer to the start of the file using | 58 | attempts to set the file pointer to the start of the file using |
@@ -58,25 +69,22 @@ returns the current file position by calling | |||
58 | .Fn lseek fd 0 1 . | 69 | .Fn lseek fd 0 1 . |
59 | .Pp | 70 | .Pp |
60 | .Fn BIO_set_fd | 71 | .Fn BIO_set_fd |
61 | sets the file descriptor of BIO | 72 | sets the file descriptor of |
73 | .Vt BIO | ||
62 | .Fa b | 74 | .Fa b |
63 | to | 75 | to |
64 | .Fa fd | 76 | .Fa fd |
65 | and the close flag to | 77 | and the close flag to |
66 | .Fa c . | 78 | .Fa close_flag . |
79 | It is currently implemented as a macro. | ||
67 | .Pp | 80 | .Pp |
68 | .Fn BIO_get_fd | 81 | .Fn BIO_get_fd |
69 | places the file descriptor in | 82 | places the file descriptor in |
70 | .Fa c | 83 | .Fa c |
71 | if it is not | 84 | if it is not |
72 | .Dv NULL , | 85 | .Dv NULL |
73 | it also returns the file descriptor. | 86 | and also returns the file descriptor. |
74 | If | 87 | It is currently implemented as a macro. |
75 | .Fa c | ||
76 | is not | ||
77 | .Dv NULL , | ||
78 | it should be of type | ||
79 | .Vt "int *" . | ||
80 | .Pp | 88 | .Pp |
81 | .Fn BIO_new_fd | 89 | .Fn BIO_new_fd |
82 | returns a file descriptor BIO using | 90 | returns a file descriptor BIO using |
@@ -120,10 +128,14 @@ behaviour. | |||
120 | always returns 1. | 128 | always returns 1. |
121 | .Pp | 129 | .Pp |
122 | .Fn BIO_get_fd | 130 | .Fn BIO_get_fd |
123 | returns the file descriptor or -1 if the BIO has not been initialized. | 131 | returns the file descriptor or -1 if the |
132 | .Vt BIO | ||
133 | has not been initialized. | ||
124 | .Pp | 134 | .Pp |
125 | .Fn BIO_new_fd | 135 | .Fn BIO_new_fd |
126 | returns the newly allocated BIO or | 136 | returns the newly allocated |
137 | .Vt BIO | ||
138 | or | ||
127 | .Dv NULL | 139 | .Dv NULL |
128 | if an error occurred. | 140 | if an error occurred. |
129 | .Sh EXAMPLES | 141 | .Sh EXAMPLES |
@@ -136,4 +148,5 @@ BIO_free(out); | |||
136 | .Ed | 148 | .Ed |
137 | .Sh SEE ALSO | 149 | .Sh SEE ALSO |
138 | .Xr BIO_read 3 , | 150 | .Xr BIO_read 3 , |
151 | .Xr BIO_s_socket 3 , | ||
139 | .Xr BIO_seek 3 | 152 | .Xr BIO_seek 3 |
diff --git a/src/lib/libcrypto/man/BIO_s_socket.3 b/src/lib/libcrypto/man/BIO_s_socket.3 index 69768bc003..8cc0243066 100644 --- a/src/lib/libcrypto/man/BIO_s_socket.3 +++ b/src/lib/libcrypto/man/BIO_s_socket.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: BIO_s_socket.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: BIO_s_socket.3,v 1.3 2016/11/06 16:43:53 schwarze Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 6 2016 $ |
4 | .Dt BIO_S_SOCKET 3 | 4 | .Dt BIO_S_SOCKET 3 |
@@ -13,17 +13,6 @@ | |||
13 | .Fo BIO_s_socket | 13 | .Fo BIO_s_socket |
14 | .Fa void | 14 | .Fa void |
15 | .Fc | 15 | .Fc |
16 | .Ft long | ||
17 | .Fo BIO_set_fd | ||
18 | .Fa "BIO *b" | ||
19 | .Fa "int fd" | ||
20 | .Fa "long close_flag" | ||
21 | .Fc | ||
22 | .Ft long | ||
23 | .Fo BIO_get_fd | ||
24 | .Fa "BIO *b" | ||
25 | .Fa "int *c" | ||
26 | .Fc | ||
27 | .Ft BIO * | 16 | .Ft BIO * |
28 | .Fo BIO_new_socket | 17 | .Fo BIO_new_socket |
29 | .Fa "int sock" | 18 | .Fa "int sock" |
@@ -46,27 +35,6 @@ is not. | |||
46 | If the close flag is set, then the socket is shut down and closed | 35 | If the close flag is set, then the socket is shut down and closed |
47 | when the BIO is freed. | 36 | when the BIO is freed. |
48 | .Pp | 37 | .Pp |
49 | .Fn BIO_set_fd | ||
50 | sets the socket of BIO | ||
51 | .Fa b | ||
52 | to | ||
53 | .Fa fd | ||
54 | and the close flag to | ||
55 | .Fa close_flag . | ||
56 | .Pp | ||
57 | .Fn BIO_get_fd | ||
58 | places the socket in | ||
59 | .Fa c | ||
60 | if it is not | ||
61 | .Dv NULL , | ||
62 | it also returns the socket. | ||
63 | If | ||
64 | .Fa c | ||
65 | is not | ||
66 | .Dv NULL | ||
67 | it should be of type | ||
68 | .Vt "int *" . | ||
69 | .Pp | ||
70 | .Fn BIO_new_socket | 38 | .Fn BIO_new_socket |
71 | returns a socket BIO using | 39 | returns a socket BIO using |
72 | .Fa sock | 40 | .Fa sock |
@@ -80,22 +48,13 @@ is that on some platforms, sockets are not file descriptors | |||
80 | and use distinct I/O routines. | 48 | and use distinct I/O routines. |
81 | Windows is one such platform. | 49 | Windows is one such platform. |
82 | Any code mixing the two will not work on all platforms. | 50 | Any code mixing the two will not work on all platforms. |
83 | .Pp | ||
84 | .Fn BIO_set_fd | ||
85 | and | ||
86 | .Fn BIO_get_fd | ||
87 | are macros. | ||
88 | .Sh RETURN VALUES | 51 | .Sh RETURN VALUES |
89 | .Fn BIO_s_socket | 52 | .Fn BIO_s_socket |
90 | returns the socket BIO method. | 53 | returns the socket BIO method. |
91 | .Pp | 54 | .Pp |
92 | .Fn BIO_set_fd | ||
93 | always returns 1. | ||
94 | .Pp | ||
95 | .Fn BIO_get_fd | ||
96 | returns the socket or -1 if the BIO has not been initialized. | ||
97 | .Pp | ||
98 | .Fn BIO_new_socket | 55 | .Fn BIO_new_socket |
99 | returns the newly allocated BIO or | 56 | returns the newly allocated BIO or |
100 | .Dv NULL | 57 | .Dv NULL |
101 | if an error occurred. | 58 | if an error occurred. |
59 | .Sh SEE ALSO | ||
60 | .Xr BIO_get_fd 3 | ||