diff options
| author | schwarze <> | 2022-12-14 20:27:28 +0000 |
|---|---|---|
| committer | schwarze <> | 2022-12-14 20:27:28 +0000 |
| commit | 6624e2e2435f60975243c1cd3a502ab91e5bb623 (patch) | |
| tree | fcd6d7ab02f707b6a280ae1335b7ee091d94b560 /src/lib/libcrypto/man | |
| parent | 3a8c6cadf51f9d7e28a7acee8bf3071e47ce6fa2 (diff) | |
| download | openbsd-6624e2e2435f60975243c1cd3a502ab91e5bb623.tar.gz openbsd-6624e2e2435f60975243c1cd3a502ab91e5bb623.tar.bz2 openbsd-6624e2e2435f60975243c1cd3a502ab91e5bb623.zip | |
In asn1.h rev. 1.71 and 1.72, jsing@ and tb@ provided ASN1_buf_print(3).
Document it.
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/ASN1_bn_print.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/ASN1_buf_print.3 | 70 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/BIO_new.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 |
4 files changed, 78 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/ASN1_bn_print.3 b/src/lib/libcrypto/man/ASN1_bn_print.3 index 75944917de..45e5721196 100644 --- a/src/lib/libcrypto/man/ASN1_bn_print.3 +++ b/src/lib/libcrypto/man/ASN1_bn_print.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: ASN1_bn_print.3,v 1.1 2021/12/08 21:52:29 schwarze Exp $ | 1 | .\" $OpenBSD: ASN1_bn_print.3,v 1.2 2022/12/14 20:27:28 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -14,7 +14,7 @@ | |||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | .\" | 16 | .\" |
| 17 | .Dd $Mdocdate: December 8 2021 $ | 17 | .Dd $Mdocdate: December 14 2022 $ |
| 18 | .Dt ASN1_BN_PRINT 3 | 18 | .Dt ASN1_BN_PRINT 3 |
| 19 | .Os | 19 | .Os |
| 20 | .Sh NAME | 20 | .Sh NAME |
| @@ -105,6 +105,7 @@ is a | |||
| 105 | pointer. | 105 | pointer. |
| 106 | It returns 0 if printing fails. | 106 | It returns 0 if printing fails. |
| 107 | .Sh SEE ALSO | 107 | .Sh SEE ALSO |
| 108 | .Xr ASN1_buf_print 3 , | ||
| 108 | .Xr BIO_new 3 , | 109 | .Xr BIO_new 3 , |
| 109 | .Xr BIO_write 3 , | 110 | .Xr BIO_write 3 , |
| 110 | .Xr BN_is_negative 3 , | 111 | .Xr BN_is_negative 3 , |
diff --git a/src/lib/libcrypto/man/ASN1_buf_print.3 b/src/lib/libcrypto/man/ASN1_buf_print.3 new file mode 100644 index 0000000000..12ee84adac --- /dev/null +++ b/src/lib/libcrypto/man/ASN1_buf_print.3 | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | .\" $OpenBSD: ASN1_buf_print.3,v 1.1 2022/12/14 20:27:28 schwarze Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 2022 Ingo Schwarze <schwarze@openbsd.org> | ||
| 4 | .\" | ||
| 5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 7 | .\" copyright notice and this permission notice appear in all copies. | ||
| 8 | .\" | ||
| 9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | .\" | ||
| 17 | .Dd $Mdocdate: December 14 2022 $ | ||
| 18 | .Dt ASN1_BUF_PRINT 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm ASN1_buf_print | ||
| 22 | .Nd pretty-print a byte array | ||
| 23 | .Sh SYNOPSIS | ||
| 24 | .In openssl/asn1.h | ||
| 25 | .Ft int | ||
| 26 | .Fo ASN1_buf_print | ||
| 27 | .Fa "BIO *bio_out" | ||
| 28 | .Fa "const unsigned char *buf" | ||
| 29 | .Fa "size_t buflen" | ||
| 30 | .Fa "int indent" | ||
| 31 | .Fc | ||
| 32 | .Sh DESCRIPTION | ||
| 33 | .Fn ASN1_buf_print | ||
| 34 | prints a hexadecimal representation of the first | ||
| 35 | .Fa buflen | ||
| 36 | bytes from | ||
| 37 | .Fa buf | ||
| 38 | to | ||
| 39 | .Fa bio_out . | ||
| 40 | Despite its name and the header file, | ||
| 41 | this function has nothing to do with ASN.1. | ||
| 42 | .Pp | ||
| 43 | Each byte from | ||
| 44 | .Fa buf | ||
| 45 | is represented by two lower-case hexadecimal digits. | ||
| 46 | Fifteen pairs of digits are printed per output line, | ||
| 47 | or at most fifteen on the last output line. | ||
| 48 | Every output line including the last one ends with a newline character. | ||
| 49 | Every pair except the last is followed by a colon | ||
| 50 | .Pq Sq \&: . | ||
| 51 | If | ||
| 52 | .Fa indent | ||
| 53 | is greater than zero, | ||
| 54 | every output line is indented by | ||
| 55 | .Fa indent | ||
| 56 | space characters, but not by more than 64 characters. | ||
| 57 | .Sh RETURN VALUES | ||
| 58 | .Fn ASN1_buf_print | ||
| 59 | returns 1 if successful or 0 if printing fails. | ||
| 60 | .Sh SEE ALSO | ||
| 61 | .Xr ASN1_bn_print 3 , | ||
| 62 | .Xr ASN1_item_print 3 , | ||
| 63 | .Xr ASN1_STRING_print_ex 3 , | ||
| 64 | .Xr ASN1_TIME_print 3 , | ||
| 65 | .Xr BIO_new 3 , | ||
| 66 | .Xr BIO_write 3 | ||
| 67 | .Sh HISTORY | ||
| 68 | .Fn ASN1_buf_print | ||
| 69 | first appeared in OpenSSL 1.1.0 and has been available since | ||
| 70 | .Ox 7.3 . | ||
diff --git a/src/lib/libcrypto/man/BIO_new.3 b/src/lib/libcrypto/man/BIO_new.3 index 17f5a708e8..53dee2c60a 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.22 2021/11/27 16:18:03 schwarze Exp $ | 1 | .\" $OpenBSD: BIO_new.3,v 1.23 2022/12/14 20:27:28 schwarze Exp $ |
| 2 | .\" full merge up to: | 2 | .\" full merge up to: |
| 3 | .\" OpenSSL man3/BIO_new.pod fb46be03 Feb 26 11:51:31 2016 +0000 | 3 | .\" OpenSSL man3/BIO_new.pod fb46be03 Feb 26 11:51:31 2016 +0000 |
| 4 | .\" OpenSSL man7/bio.pod 631c37be Dec 12 16:56:50 2017 +0100 | 4 | .\" OpenSSL man7/bio.pod 631c37be Dec 12 16:56:50 2017 +0100 |
| @@ -52,7 +52,7 @@ | |||
| 52 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 52 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 53 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 53 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 54 | .\" | 54 | .\" |
| 55 | .Dd $Mdocdate: November 27 2021 $ | 55 | .Dd $Mdocdate: December 14 2022 $ |
| 56 | .Dt BIO_NEW 3 | 56 | .Dt BIO_NEW 3 |
| 57 | .Os | 57 | .Os |
| 58 | .Sh NAME | 58 | .Sh NAME |
| @@ -228,6 +228,7 @@ Create a memory BIO: | |||
| 228 | .Pp | 228 | .Pp |
| 229 | .Dl BIO *mem = BIO_new(BIO_s_mem()); | 229 | .Dl BIO *mem = BIO_new(BIO_s_mem()); |
| 230 | .Sh SEE ALSO | 230 | .Sh SEE ALSO |
| 231 | .Xr ASN1_buf_print 3 , | ||
| 231 | .Xr BIO_ctrl 3 , | 232 | .Xr BIO_ctrl 3 , |
| 232 | .Xr BIO_dump 3 , | 233 | .Xr BIO_dump 3 , |
| 233 | .Xr BIO_f_asn1 3 , | 234 | .Xr BIO_f_asn1 3 , |
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 88f1a05f7e..12e4212215 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.238 2022/11/21 22:04:04 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.239 2022/12/14 20:27:28 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -19,6 +19,7 @@ MAN= \ | |||
| 19 | ASN1_TYPE_get.3 \ | 19 | ASN1_TYPE_get.3 \ |
| 20 | ASN1_UNIVERSALSTRING_to_string.3 \ | 20 | ASN1_UNIVERSALSTRING_to_string.3 \ |
| 21 | ASN1_bn_print.3 \ | 21 | ASN1_bn_print.3 \ |
| 22 | ASN1_buf_print.3 \ | ||
| 22 | ASN1_generate_nconf.3 \ | 23 | ASN1_generate_nconf.3 \ |
| 23 | ASN1_get_object.3 \ | 24 | ASN1_get_object.3 \ |
| 24 | ASN1_item_d2i.3 \ | 25 | ASN1_item_d2i.3 \ |
