summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2021-12-09 18:50:26 +0000
committerschwarze <>2021-12-09 18:50:26 +0000
commited7c566d340c690dee5be5eb59e54c8f43bf4be4 (patch)
tree9893a75838831f7dd6601f31bbb706613773ad31 /src
parent3aa9811f9c99d8b0b4ceae5e5225b938a4d6e5e1 (diff)
downloadopenbsd-ed7c566d340c690dee5be5eb59e54c8f43bf4be4.tar.gz
openbsd-ed7c566d340c690dee5be5eb59e54c8f43bf4be4.tar.bz2
openbsd-ed7c566d340c690dee5be5eb59e54c8f43bf4be4.zip
Document V_ASN1_ANY.
While here, tweak some wordings a bit to make it less likely that readers confuse the type held by an ASN1_TYPE object with the type of the ASN1_TYPE object itself, which is always V_ASN1_ANY.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/ASN1_TYPE_get.327
1 files changed, 15 insertions, 12 deletions
diff --git a/src/lib/libcrypto/man/ASN1_TYPE_get.3 b/src/lib/libcrypto/man/ASN1_TYPE_get.3
index 2778936b20..3e1bd6f3ec 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.16 2021/11/26 13:48:21 jsg Exp $ 1.\" $OpenBSD: ASN1_TYPE_get.3,v 1.17 2021/12/09 18:50:26 schwarze 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: November 26 2021 $ 68.Dd $Mdocdate: December 9 2021 $
69.Dt ASN1_TYPE_GET 3 69.Dt ASN1_TYPE_GET 3
70.Os 70.Os
71.Sh NAME 71.Sh NAME
@@ -134,8 +134,11 @@
134.Fa "const ASN1_TYPE *b" 134.Fa "const ASN1_TYPE *b"
135.Fc 135.Fc
136.Sh DESCRIPTION 136.Sh DESCRIPTION
137The
137.Vt ASN1_TYPE 138.Vt ASN1_TYPE
138represents the ASN.1 ANY type. 139data type and the
140.Dv V_ASN1_ANY
141type identifier constant represent the ASN.1 ANY type.
139An 142An
140.Vt ASN1_TYPE 143.Vt ASN1_TYPE
141object can store an ASN.1 value of arbitrary type, 144object can store an ASN.1 value of arbitrary type,
@@ -158,7 +161,7 @@ is a
158pointer, no action occurs. 161pointer, no action occurs.
159.Pp 162.Pp
160.Fn ASN1_TYPE_get 163.Fn ASN1_TYPE_get
161returns the type of 164returns the type currently held by
162.Fa a , 165.Fa a ,
163represented by one of the 166represented by one of the
164.Dv V_ASN1_* 167.Dv V_ASN1_*
@@ -168,12 +171,12 @@ constants defined in
168.Fn ASN1_TYPE_set 171.Fn ASN1_TYPE_set
169frees the value contained in 172frees the value contained in
170.Fa a , 173.Fa a ,
171if any, and sets 174if any, and sets the
172.Fa a 175.Fa value
173to
174.Fa type
175and 176and
176.Fa value . 177.Fa type
178now held in
179.Fa a .
177This function uses the pointer 180This function uses the pointer
178.Fa value 181.Fa value
179internally so it must 182internally so it must
@@ -181,7 +184,7 @@ internally so it must
181be freed up after the call. 184be freed up after the call.
182.Pp 185.Pp
183.Fn ASN1_TYPE_set1 186.Fn ASN1_TYPE_set1
184sets the type of 187sets the type held by
185.Fa a 188.Fa a
186to 189to
187.Fa type 190.Fa type
@@ -312,7 +315,7 @@ checks that
312.Fa a 315.Fa a
313and 316and
314.Fa b 317.Fa b
315have the same type, the same value, and are encoded in the same way. 318hold the same type, the same value, and are encoded in the same way.
316.Pp 319.Pp
317If the types agree and the values have the same meaning but are 320If the types agree and the values have the same meaning but are
318encoded differently, they are considered different. 321encoded differently, they are considered different.
@@ -348,7 +351,7 @@ object or
348if an error occurs. 351if an error occurs.
349.Pp 352.Pp
350.Fn ASN1_TYPE_get 353.Fn ASN1_TYPE_get
351returns the type of 354returns the type currently held by
352.Fa a 355.Fa a
353or 0 if an error occurs. 356or 0 if an error occurs.
354The latter can happen if 357The latter can happen if