diff options
author | schwarze <> | 2017-03-25 17:15:59 +0000 |
---|---|---|
committer | schwarze <> | 2017-03-25 17:15:59 +0000 |
commit | 9c3ad2c9faadea9f56fc1bd8b254fc2fa40558eb (patch) | |
tree | 85acbd22ecfe0006911765431748d7857b1d6c0e | |
parent | 880f4156816f562cb91df4affd1f3510f10d1431 (diff) | |
download | openbsd-9c3ad2c9faadea9f56fc1bd8b254fc2fa40558eb.tar.gz openbsd-9c3ad2c9faadea9f56fc1bd8b254fc2fa40558eb.tar.bz2 openbsd-9c3ad2c9faadea9f56fc1bd8b254fc2fa40558eb.zip |
OpenSSL documented the public function BIO_printf(3) (and friends)
in commit 2ca2e917. Document it here, too, but do not use their
text. Be more concise and more precise at the same time.
-rw-r--r-- | src/lib/libcrypto/man/BIO_new.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/BIO_printf.3 | 86 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 |
3 files changed, 91 insertions, 3 deletions
diff --git a/src/lib/libcrypto/man/BIO_new.3 b/src/lib/libcrypto/man/BIO_new.3 index 991f159886..356986d76d 100644 --- a/src/lib/libcrypto/man/BIO_new.3 +++ b/src/lib/libcrypto/man/BIO_new.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: BIO_new.3,v 1.7 2016/12/06 13:43:52 jmc Exp $ | 1 | .\" $OpenBSD: BIO_new.3,v 1.8 2017/03/25 17:15:59 schwarze Exp $ |
2 | .\" OpenSSL doc/man3/BIO_new.pod ca3a82c3 Mar 25 11:31:18 2015 -0400 | 2 | .\" OpenSSL doc/man3/BIO_new.pod ca3a82c3 Mar 25 11:31:18 2015 -0400 |
3 | .\" OpenSSL doc/man7/bio.pod a9c85cea Nov 11 09:33:55 2016 +0100 | 3 | .\" OpenSSL doc/man7/bio.pod a9c85cea Nov 11 09:33:55 2016 +0100 |
4 | .\" | 4 | .\" |
@@ -49,7 +49,7 @@ | |||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
51 | .\" | 51 | .\" |
52 | .Dd $Mdocdate: December 6 2016 $ | 52 | .Dd $Mdocdate: March 25 2017 $ |
53 | .Dt BIO_NEW 3 | 53 | .Dt BIO_NEW 3 |
54 | .Os | 54 | .Os |
55 | .Sh NAME | 55 | .Sh NAME |
@@ -192,6 +192,7 @@ Create a memory BIO: | |||
192 | .Xr BIO_f_ssl 3 , | 192 | .Xr BIO_f_ssl 3 , |
193 | .Xr BIO_find_type 3 , | 193 | .Xr BIO_find_type 3 , |
194 | .Xr BIO_get_ex_new_index 3 , | 194 | .Xr BIO_get_ex_new_index 3 , |
195 | .Xr BIO_printf 3 , | ||
195 | .Xr BIO_push 3 , | 196 | .Xr BIO_push 3 , |
196 | .Xr BIO_read 3 , | 197 | .Xr BIO_read 3 , |
197 | .Xr BIO_s_accept 3 , | 198 | .Xr BIO_s_accept 3 , |
diff --git a/src/lib/libcrypto/man/BIO_printf.3 b/src/lib/libcrypto/man/BIO_printf.3 new file mode 100644 index 0000000000..ebc1cc726e --- /dev/null +++ b/src/lib/libcrypto/man/BIO_printf.3 | |||
@@ -0,0 +1,86 @@ | |||
1 | .\" $OpenBSD: BIO_printf.3,v 1.1 2017/03/25 17:15:59 schwarze Exp $ | ||
2 | .\" OpenSSL 2ca2e917 Mon Mar 20 16:25:22 2017 -0400 | ||
3 | .\" | ||
4 | .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> | ||
5 | .\" | ||
6 | .\" Permission to use, copy, modify, and distribute this software for any | ||
7 | .\" purpose with or without fee is hereby granted, provided that the above | ||
8 | .\" copyright notice and this permission notice appear in all copies. | ||
9 | .\" | ||
10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | .\" | ||
18 | .Dd $Mdocdate: March 25 2017 $ | ||
19 | .Dt BIO_PRINTF 3 | ||
20 | .Os | ||
21 | .Sh NAME | ||
22 | .Nm BIO_printf , | ||
23 | .Nm BIO_vprintf , | ||
24 | .Nm BIO_snprintf , | ||
25 | .Nm BIO_vsnprintf | ||
26 | .Nd formatted output to a BIO | ||
27 | .Sh SYNOPSIS | ||
28 | .In openssl/bio.h | ||
29 | .Ft int | ||
30 | .Fo BIO_printf | ||
31 | .Fa "BIO *bio" | ||
32 | .Fa "const char *format" | ||
33 | .Fa ... | ||
34 | .Fc | ||
35 | .Ft int | ||
36 | .Fo BIO_vprintf | ||
37 | .Fa "BIO *bio" | ||
38 | .Fa "const char *format" | ||
39 | .Fa "va_list args" | ||
40 | .Fc | ||
41 | .Ft int | ||
42 | .Fo BIO_snprintf | ||
43 | .Fa "char *buf" | ||
44 | .Fa "size_t n" | ||
45 | .Fa "const char *format" | ||
46 | .Fa ... | ||
47 | .Fc | ||
48 | .Ft int | ||
49 | .Fo BIO_vsnprintf | ||
50 | .Fa "char *buf" | ||
51 | .Fa "size_t n" | ||
52 | .Fa "const char *format" | ||
53 | .Fa "va_list args" | ||
54 | .Fc | ||
55 | .Sh DESCRIPTION | ||
56 | .Fn BIO_vprintf | ||
57 | is a wrapper around | ||
58 | .Xr vfprintf 3 , | ||
59 | sending the output to the specified | ||
60 | .Fa bio . | ||
61 | .Pp | ||
62 | .Fn BIO_printf | ||
63 | is a wrapper around | ||
64 | .Fn BIO_vprintf . | ||
65 | .Pp | ||
66 | .Fn BIO_snprintf | ||
67 | and | ||
68 | .Fn BIO_vsnprintf | ||
69 | are wrappers around | ||
70 | .Xr vsnprintf 3 . | ||
71 | .Sh RETURN VALUES | ||
72 | These functions return the number of bytes written, | ||
73 | or -1 if an error occurs. | ||
74 | .Pp | ||
75 | In contrast to | ||
76 | .Xr snprintf 3 | ||
77 | and | ||
78 | .Xr vsnprintf 3 , | ||
79 | .Fn BIO_snprintf | ||
80 | and | ||
81 | .Fn BIO_vsnprintf | ||
82 | also return -1 if | ||
83 | .Fa n | ||
84 | is too small to hold the complete output. | ||
85 | .Sh SEE ALSO | ||
86 | .Xr BIO_new 3 | ||
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 75239dc387..70a73799c6 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.115 2017/02/20 23:21:19 beck Exp $ | 1 | # $OpenBSD: Makefile,v 1.116 2017/03/25 17:15:59 schwarze Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -26,6 +26,7 @@ MAN= \ | |||
26 | BIO_find_type.3 \ | 26 | BIO_find_type.3 \ |
27 | BIO_get_ex_new_index.3 \ | 27 | BIO_get_ex_new_index.3 \ |
28 | BIO_new.3 \ | 28 | BIO_new.3 \ |
29 | BIO_printf.3 \ | ||
29 | BIO_push.3 \ | 30 | BIO_push.3 \ |
30 | BIO_read.3 \ | 31 | BIO_read.3 \ |
31 | BIO_s_accept.3 \ | 32 | BIO_s_accept.3 \ |