diff options
author | tb <> | 2022-01-12 17:54:51 +0000 |
---|---|---|
committer | tb <> | 2022-01-12 17:54:51 +0000 |
commit | 9b692fc9d338dc8a7d7ca4c5f0d99db353fd40c7 (patch) | |
tree | 6f6e554b19d49657ff6b9eba4f20e826ebea251b /src/lib | |
parent | 21c55d7a4beea4317ee0541cf743948831260260 (diff) | |
download | openbsd-9b692fc9d338dc8a7d7ca4c5f0d99db353fd40c7.tar.gz openbsd-9b692fc9d338dc8a7d7ca4c5f0d99db353fd40c7.tar.bz2 openbsd-9b692fc9d338dc8a7d7ca4c5f0d99db353fd40c7.zip |
ASN1_{,F,T}BOOLEAN_it and the encoding and decoding API will move
to internal only soon. Stop documenting them.
ok inoguchi jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/ASN1_TYPE_get.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/ASN1_item_new.3 | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/man/ASN1_put_object.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/man/d2i_ASN1_BOOLEAN.3 | 134 |
5 files changed, 7 insertions, 147 deletions
diff --git a/src/lib/libcrypto/man/ASN1_TYPE_get.3 b/src/lib/libcrypto/man/ASN1_TYPE_get.3 index 3e1bd6f3ec..03b41f8fa8 100644 --- a/src/lib/libcrypto/man/ASN1_TYPE_get.3 +++ b/src/lib/libcrypto/man/ASN1_TYPE_get.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ASN1_TYPE_get.3,v 1.17 2021/12/09 18:50:26 schwarze Exp $ | 1 | .\" $OpenBSD: ASN1_TYPE_get.3,v 1.18 2022/01/12 17:54:51 tb Exp $ |
2 | .\" selective merge up to: OpenSSL 6328d367 Jul 4 21:58:30 2020 +0200 | 2 | .\" selective merge up to: OpenSSL 6328d367 Jul 4 21:58:30 2020 +0200 |
3 | .\" | 3 | .\" |
4 | .\" This file is a derived work. | 4 | .\" This file is a derived work. |
@@ -65,7 +65,7 @@ | |||
65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
67 | .\" | 67 | .\" |
68 | .Dd $Mdocdate: December 9 2021 $ | 68 | .Dd $Mdocdate: January 12 2022 $ |
69 | .Dt ASN1_TYPE_GET 3 | 69 | .Dt ASN1_TYPE_GET 3 |
70 | .Os | 70 | .Os |
71 | .Sh NAME | 71 | .Sh NAME |
@@ -410,7 +410,6 @@ returns 0 for a match or non-zero for a mismatch. | |||
410 | .Xr ASN1_STRING_dup 3 , | 410 | .Xr ASN1_STRING_dup 3 , |
411 | .Xr ASN1_STRING_new 3 , | 411 | .Xr ASN1_STRING_new 3 , |
412 | .Xr crypto 3 , | 412 | .Xr crypto 3 , |
413 | .Xr d2i_ASN1_BOOLEAN 3 , | ||
414 | .Xr d2i_ASN1_NULL 3 , | 413 | .Xr d2i_ASN1_NULL 3 , |
415 | .Xr d2i_ASN1_SEQUENCE_ANY 3 , | 414 | .Xr d2i_ASN1_SEQUENCE_ANY 3 , |
416 | .Xr d2i_ASN1_TYPE 3 , | 415 | .Xr d2i_ASN1_TYPE 3 , |
diff --git a/src/lib/libcrypto/man/ASN1_item_new.3 b/src/lib/libcrypto/man/ASN1_item_new.3 index 7fd3405e1f..7015ed6319 100644 --- a/src/lib/libcrypto/man/ASN1_item_new.3 +++ b/src/lib/libcrypto/man/ASN1_item_new.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ASN1_item_new.3,v 1.10 2021/11/22 16:19:54 schwarze Exp $ | 1 | .\" $OpenBSD: ASN1_item_new.3,v 1.11 2022/01/12 17:54:51 tb Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2016, 2018 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2016, 2018 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: November 22 2021 $ | 17 | .Dd $Mdocdate: January 12 2022 $ |
18 | .Dt ASN1_ITEM_NEW 3 | 18 | .Dt ASN1_ITEM_NEW 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -87,8 +87,6 @@ object. | |||
87 | If | 87 | If |
88 | .Fa it | 88 | .Fa it |
89 | is | 89 | is |
90 | .Dv ASN1_BOOLEAN_it | ||
91 | or | ||
92 | .Dv LONG_it , | 90 | .Dv LONG_it , |
93 | .Fn ASN1_item_new | 91 | .Fn ASN1_item_new |
94 | does not return a pointer at all, but a | 92 | does not return a pointer at all, but a |
@@ -113,7 +111,6 @@ is returned and an error code can be retrieved with | |||
113 | .Xr ASN1_item_verify 3 , | 111 | .Xr ASN1_item_verify 3 , |
114 | .Xr ASN1_NULL_new 3 , | 112 | .Xr ASN1_NULL_new 3 , |
115 | .Xr ASN1_TYPE_new 3 , | 113 | .Xr ASN1_TYPE_new 3 , |
116 | .Xr d2i_ASN1_BOOLEAN 3 , | ||
117 | .Xr d2i_ASN1_NULL 3 , | 114 | .Xr d2i_ASN1_NULL 3 , |
118 | .Xr OBJ_nid2obj 3 | 115 | .Xr OBJ_nid2obj 3 |
119 | .Sh HISTORY | 116 | .Sh HISTORY |
diff --git a/src/lib/libcrypto/man/ASN1_put_object.3 b/src/lib/libcrypto/man/ASN1_put_object.3 index a435b5a800..97a352724c 100644 --- a/src/lib/libcrypto/man/ASN1_put_object.3 +++ b/src/lib/libcrypto/man/ASN1_put_object.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ASN1_put_object.3,v 1.4 2021/12/09 19:00:00 schwarze Exp $ | 1 | .\" $OpenBSD: ASN1_put_object.3,v 1.5 2022/01/12 17:54:51 tb Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2019, 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2019, 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 9 2021 $ | 17 | .Dd $Mdocdate: January 12 2022 $ |
18 | .Dt ASN1_PUT_OBJECT 3 | 18 | .Dt ASN1_PUT_OBJECT 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -140,7 +140,6 @@ returns the total number of bytes in the encoding of the data element. | |||
140 | .Sh SEE ALSO | 140 | .Sh SEE ALSO |
141 | .Xr ASN1_item_i2d 3 , | 141 | .Xr ASN1_item_i2d 3 , |
142 | .Xr ASN1_TYPE_get 3 , | 142 | .Xr ASN1_TYPE_get 3 , |
143 | .Xr i2d_ASN1_BOOLEAN 3 , | ||
144 | .Xr i2d_ASN1_NULL 3 , | 143 | .Xr i2d_ASN1_NULL 3 , |
145 | .Xr i2d_ASN1_OBJECT 3 , | 144 | .Xr i2d_ASN1_OBJECT 3 , |
146 | .Xr i2d_ASN1_OCTET_STRING 3 , | 145 | .Xr i2d_ASN1_OCTET_STRING 3 , |
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 79da1eb54f..780e8d6256 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.231 2021/12/18 17:47:44 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.232 2022/01/12 17:54:51 tb Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -381,7 +381,6 @@ MAN= \ | |||
381 | X509v3_get_ext_by_NID.3 \ | 381 | X509v3_get_ext_by_NID.3 \ |
382 | a2d_ASN1_OBJECT.3 \ | 382 | a2d_ASN1_OBJECT.3 \ |
383 | crypto.3 \ | 383 | crypto.3 \ |
384 | d2i_ASN1_BOOLEAN.3 \ | ||
385 | d2i_ASN1_NULL.3 \ | 384 | d2i_ASN1_NULL.3 \ |
386 | d2i_ASN1_OBJECT.3 \ | 385 | d2i_ASN1_OBJECT.3 \ |
387 | d2i_ASN1_OCTET_STRING.3 \ | 386 | d2i_ASN1_OCTET_STRING.3 \ |
diff --git a/src/lib/libcrypto/man/d2i_ASN1_BOOLEAN.3 b/src/lib/libcrypto/man/d2i_ASN1_BOOLEAN.3 deleted file mode 100644 index 3f83f3e858..0000000000 --- a/src/lib/libcrypto/man/d2i_ASN1_BOOLEAN.3 +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | .\" $OpenBSD: d2i_ASN1_BOOLEAN.3,v 1.3 2021/12/09 19:03:14 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2021 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 9 2021 $ | ||
18 | .Dt D2I_ASN1_BOOLEAN 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm d2i_ASN1_BOOLEAN , | ||
22 | .Nm i2d_ASN1_BOOLEAN | ||
23 | .Nd decode and encode an ASN.1 BOOLEAN value | ||
24 | .Sh SYNOPSIS | ||
25 | .In openssl/asn1.h | ||
26 | .Bd -unfilled | ||
27 | typedef int ASN1_BOOLEAN; | ||
28 | .Ed | ||
29 | .Pp | ||
30 | .Ft int | ||
31 | .Fo d2i_ASN1_BOOLEAN | ||
32 | .Fa "int *val_out" | ||
33 | .Fa "const unsigned char **der_in" | ||
34 | .Fa "long length" | ||
35 | .Fc | ||
36 | .Ft int | ||
37 | .Fo i2d_ASN1_BOOLEAN | ||
38 | .Fa "int val_in" | ||
39 | .Fa "unsigned char **der_out" | ||
40 | .Fc | ||
41 | .Sh DESCRIPTION | ||
42 | These functions decode and encode | ||
43 | an ASN.1 value TRUE or FALSE of the type BOOLEAN. | ||
44 | In contrast to most other ASN.1 types, | ||
45 | the library does not represent the BOOLEAN type by a structure. | ||
46 | Instead, | ||
47 | .Vt ASN1_BOOLEAN | ||
48 | is simply an alias for the type | ||
49 | .Vt int . | ||
50 | This type is also represented by the type identifier constant | ||
51 | .Dv V_ASN1_BOOLEAN . | ||
52 | .Pp | ||
53 | .Fn d2i_ASN1_BOOLEAN | ||
54 | verifies that the BER-encoded value at | ||
55 | .Pf * Fa der_in | ||
56 | is of the type BOOLEAN | ||
57 | and that the number encoded in the length octets is 1. | ||
58 | At most | ||
59 | .Fa length | ||
60 | bytes are inspected. | ||
61 | .Pp | ||
62 | Unless | ||
63 | .Fa val_out | ||
64 | is a | ||
65 | .Dv NULL | ||
66 | pointer, it copies the integer value of the single content octet to | ||
67 | .Pf * Fa val_out . | ||
68 | In case of success, | ||
69 | .Pf * Fa der_in | ||
70 | is advanced by three bytes to the byte after the content octet. | ||
71 | .Pp | ||
72 | .Fn i2d_ASN1_BOOLEAN | ||
73 | encodes an ASN.1 value of the type BOOLEAN using DER. | ||
74 | Specifically, unless | ||
75 | .Fa der_out | ||
76 | is a | ||
77 | .Dv NULL | ||
78 | pointer, it writes the identifier octet for the type BOOLEAN, | ||
79 | 0x01, the single length octet 0x01, one single content octet containing | ||
80 | .Fa val_in , | ||
81 | and no end-of-content octets to | ||
82 | .Pf * Fa der_out | ||
83 | and advances the pointer | ||
84 | .Pf * Fa der_out | ||
85 | by three bytes to the byte after the content octet. | ||
86 | Making sure that three bytes can be written to | ||
87 | .Pf * Fa der_out | ||
88 | is the responsibility of the caller. | ||
89 | .Pp | ||
90 | If | ||
91 | .Fa val_in | ||
92 | is 0, it encodes the FALSE value. | ||
93 | If | ||
94 | .Fa val_in | ||
95 | is in the range from 1 to 255 inclusive, it encodes the TRUE value. | ||
96 | .Sh RETURN VALUES | ||
97 | In case of success, | ||
98 | .Fn d2i_ASN1_BOOLEAN | ||
99 | returns the integer value of the content octet. | ||
100 | The number 0 represents the FALSE value and any number in the range | ||
101 | from 1 to 255 inclusive represents the TRUE value. | ||
102 | If the | ||
103 | .Fa length | ||
104 | argument is less than 3, if parsing fails, if the ASN.1 object at | ||
105 | .Pf * Fa der_in | ||
106 | is not of the type BOOLEAN, or if the number of content octets is not 1, | ||
107 | .Fn d2i_ASN1_BOOLEAN | ||
108 | returns \-1 to indicate the error. | ||
109 | .Pp | ||
110 | .Fn i2d_ASN1_BOOLEAN | ||
111 | always returns 3, which is the number of bytes in the BER encoding | ||
112 | of an ASN.1 BOOLEAN value. | ||
113 | .Sh SEE ALSO | ||
114 | .Xr ASN1_get_object 3 , | ||
115 | .Xr ASN1_item_d2i 3 , | ||
116 | .Xr ASN1_put_object 3 | ||
117 | .Sh STANDARDS | ||
118 | ITU-T Recommendation X.690, also known as ISO/IEC 8825-1: | ||
119 | Information technology - ASN.1 encoding rules: | ||
120 | Specification of Basic Encoding Rules (BER), Canonical Encoding | ||
121 | Rules (CER) and Distinguished Encoding Rules (DER), | ||
122 | section 8.2: Encoding of a boolean value | ||
123 | .Sh HISTORY | ||
124 | .Fn d2i_ASN1_BOOLEAN | ||
125 | and | ||
126 | .Fn i2d_ASN1_BOOLEAN | ||
127 | first appeared in SSLeay 0.6.2 and have been available since | ||
128 | .Ox 2.4 . | ||
129 | .Sh CAVEATS | ||
130 | The behaviour of | ||
131 | .Fn i2d_ASN1_BOOLEAN | ||
132 | is unspecified if | ||
133 | .Fa val_in | ||
134 | is negative or larger than 255. | ||