summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2019-08-26 07:59:02 +0000
committerschwarze <>2019-08-26 07:59:02 +0000
commit5bb49af83968021539009be436f8ab8309213e7d (patch)
treea367617517a7675267d689fdf70b828d107794f6 /src
parent778a6d338bf2610d12d814b4a503d2638cfc8d1d (diff)
downloadopenbsd-5bb49af83968021539009be436f8ab8309213e7d.tar.gz
openbsd-5bb49af83968021539009be436f8ab8309213e7d.tar.bz2
openbsd-5bb49af83968021539009be436f8ab8309213e7d.zip
document ASN1_OCTET_STRING_cmp(3), ASN1_OCTET_STRING_dup(3), and
ASN1_OCTET_STRING_set(3)
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/ASN1_STRING_length.357
1 files changed, 45 insertions, 12 deletions
diff --git a/src/lib/libcrypto/man/ASN1_STRING_length.3 b/src/lib/libcrypto/man/ASN1_STRING_length.3
index d4f510ea37..b87cf9987c 100644
--- a/src/lib/libcrypto/man/ASN1_STRING_length.3
+++ b/src/lib/libcrypto/man/ASN1_STRING_length.3
@@ -1,10 +1,10 @@
1.\" $OpenBSD: ASN1_STRING_length.3,v 1.19 2019/06/14 13:59:32 schwarze Exp $ 1.\" $OpenBSD: ASN1_STRING_length.3,v 1.20 2019/08/26 07:59:02 schwarze Exp $
2.\" full merge up to: OpenSSL 4a56d2a3 Feb 25 16:49:27 2018 +0300 2.\" full merge up to: OpenSSL 4a56d2a3 Feb 25 16:49:27 2018 +0300
3.\" 3.\"
4.\" This file is a derived work. 4.\" This file is a derived work.
5.\" The changes are covered by the following Copyright and license: 5.\" The changes are covered by the following Copyright and license:
6.\" 6.\"
7.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org> 7.\" Copyright (c) 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
8.\" 8.\"
9.\" Permission to use, copy, modify, and distribute this software for any 9.\" Permission to use, copy, modify, and distribute this software for any
10.\" purpose with or without fee is hereby granted, provided that the above 10.\" purpose with or without fee is hereby granted, provided that the above
@@ -66,17 +66,20 @@
66.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 66.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
67.\" OF THE POSSIBILITY OF SUCH DAMAGE. 67.\" OF THE POSSIBILITY OF SUCH DAMAGE.
68.\" 68.\"
69.Dd $Mdocdate: June 14 2019 $ 69.Dd $Mdocdate: August 26 2019 $
70.Dt ASN1_STRING_LENGTH 3 70.Dt ASN1_STRING_LENGTH 3
71.Os 71.Os
72.Sh NAME 72.Sh NAME
73.Nm ASN1_STRING_cmp , 73.Nm ASN1_STRING_cmp ,
74.Nm ASN1_OCTET_STRING_cmp ,
74.Nm ASN1_STRING_data , 75.Nm ASN1_STRING_data ,
75.Nm ASN1_STRING_dup , 76.Nm ASN1_STRING_dup ,
77.Nm ASN1_OCTET_STRING_dup ,
76.Nm ASN1_STRING_get0_data , 78.Nm ASN1_STRING_get0_data ,
77.Nm ASN1_STRING_length , 79.Nm ASN1_STRING_length ,
78.Nm ASN1_STRING_length_set , 80.Nm ASN1_STRING_length_set ,
79.Nm ASN1_STRING_set , 81.Nm ASN1_STRING_set ,
82.Nm ASN1_OCTET_STRING_set ,
80.Nm ASN1_STRING_to_UTF8 , 83.Nm ASN1_STRING_to_UTF8 ,
81.Nm ASN1_STRING_type 84.Nm ASN1_STRING_type
82.Nd ASN1_STRING utility functions 85.Nd ASN1_STRING utility functions
@@ -87,6 +90,11 @@
87.Fa "const ASN1_STRING *a" 90.Fa "const ASN1_STRING *a"
88.Fa "const ASN1_STRING *b" 91.Fa "const ASN1_STRING *b"
89.Fc 92.Fc
93.Ft int
94.Fo ASN1_OCTET_STRING_cmp
95.Fa "const ASN1_OCTET_STRING *a"
96.Fa "const ASN1_OCTET_STRING *b"
97.Fc
90.Ft unsigned char * 98.Ft unsigned char *
91.Fo ASN1_STRING_data 99.Fo ASN1_STRING_data
92.Fa "ASN1_STRING *x" 100.Fa "ASN1_STRING *x"
@@ -95,6 +103,10 @@
95.Fo ASN1_STRING_dup 103.Fo ASN1_STRING_dup
96.Fa "const ASN1_STRING *a" 104.Fa "const ASN1_STRING *a"
97.Fc 105.Fc
106.Ft ASN1_OCTET_STRING *
107.Fo ASN1_OCTET_STRING_dup
108.Fa "const ASN1_OCTET_STRING *a"
109.Fc
98.Ft const unsigned char * 110.Ft const unsigned char *
99.Fo ASN1_STRING_get0_data 111.Fo ASN1_STRING_get0_data
100.Fa "const ASN1_STRING *x" 112.Fa "const ASN1_STRING *x"
@@ -115,6 +127,12 @@
115.Fa "int len" 127.Fa "int len"
116.Fc 128.Fc
117.Ft int 129.Ft int
130.Fo ASN1_OCTET_STRING_set
131.Fa "ASN1_OCTET_STRING *str"
132.Fa "const unsigned char *data"
133.Fa "int len"
134.Fc
135.Ft int
118.Fo ASN1_STRING_to_UTF8 136.Fo ASN1_STRING_to_UTF8
119.Fa "unsigned char **out" 137.Fa "unsigned char **out"
120.Fa "const ASN1_STRING *in" 138.Fa "const ASN1_STRING *in"
@@ -129,7 +147,9 @@ These functions manipulate
129structures. 147structures.
130.Pp 148.Pp
131.Fn ASN1_STRING_cmp 149.Fn ASN1_STRING_cmp
132compares the type, the length, and the content of 150and
151.Fn ASN1_OCTET_STRING_cmp
152compare the type, the length, and the content of
133.Fa a 153.Fa a
134and 154and
135.Fa b . 155.Fa b .
@@ -144,7 +164,9 @@ Applications should use
144instead. 164instead.
145.Pp 165.Pp
146.Fn ASN1_STRING_dup 166.Fn ASN1_STRING_dup
147copies 167and
168.Fn ASN1_OCTET_STRING_dup
169copy
148.Fa a . 170.Fa a .
149.Pp 171.Pp
150.Fn ASN1_STRING_get0_data 172.Fn ASN1_STRING_get0_data
@@ -167,11 +189,13 @@ It may put
167into an inconsistent internal state. 189into an inconsistent internal state.
168.Pp 190.Pp
169.Fn ASN1_STRING_set 191.Fn ASN1_STRING_set
170sets the length attribute of 192and
193.Fn ASN1_OCTET_STRING_set
194set the length attribute of
171.Fa str 195.Fa str
172to 196to
173.Fa len 197.Fa len
174and copies that number of bytes from 198and copy that number of bytes from
175.Fa data 199.Fa data
176into 200into
177.Fa str . 201.Fa str .
@@ -251,7 +275,9 @@ when calling
251.Fn ASN1_STRING_set . 275.Fn ASN1_STRING_set .
252.Sh RETURN VALUES 276.Sh RETURN VALUES
253.Fn ASN1_STRING_cmp 277.Fn ASN1_STRING_cmp
254returns 0 if the type, the length, and the content of 278and
279.Fn ASN1_OCTET_STRING_cmp
280return 0 if the type, the length, and the content of
255.Fa a 281.Fa a
256and 282and
257.Fa b 283.Fa b
@@ -267,7 +293,9 @@ return an internal pointer to the data of
267.Fa x . 293.Fa x .
268.Pp 294.Pp
269.Fn ASN1_STRING_dup 295.Fn ASN1_STRING_dup
270returns a pointer to a newly allocated 296and
297.Fn ASN1_OCTET_STRING_dup
298return a pointer to a newly allocated
271.Vt ASN1_STRING 299.Vt ASN1_STRING
272structure or 300structure or
273.Dv NULL 301.Dv NULL
@@ -277,7 +305,9 @@ if an error occurred.
277returns a number of bytes. 305returns a number of bytes.
278.Pp 306.Pp
279.Fn ASN1_STRING_set 307.Fn ASN1_STRING_set
280returns 1 on success or 0 on failure. 308and
309.Fn ASN1_OCTET_STRING_set
310return 1 on success or 0 on failure.
281.Pp 311.Pp
282.Fn ASN1_STRING_to_UTF8 312.Fn ASN1_STRING_to_UTF8
283returns the number of bytes in the output buffer 313returns the number of bytes in the output buffer
@@ -300,10 +330,13 @@ the reason can be determined with
300.Sh HISTORY 330.Sh HISTORY
301.Fn ASN1_STRING_cmp , 331.Fn ASN1_STRING_cmp ,
302.Fn ASN1_STRING_dup , 332.Fn ASN1_STRING_dup ,
333.Fn ASN1_STRING_set ,
303and 334and
304.Fn ASN1_STRING_set 335.Fn ASN1_OCTET_STRING_set
305first appeared in SSLeay 0.6.5. 336first appeared in SSLeay 0.6.5.
306.Fn ASN1_STRING_data 337.Fn ASN1_OCTET_STRING_cmp ,
338.Fn ASN1_STRING_data ,
339.Fn ASN1_OCTET_STRING_dup ,
307and 340and
308.Fn ASN1_STRING_type 341.Fn ASN1_STRING_type
309first appeared in SSLeay 0.8.0. 342first appeared in SSLeay 0.8.0.