diff options
author | schwarze <> | 2019-08-26 07:59:02 +0000 |
---|---|---|
committer | schwarze <> | 2019-08-26 07:59:02 +0000 |
commit | 5bb49af83968021539009be436f8ab8309213e7d (patch) | |
tree | a367617517a7675267d689fdf70b828d107794f6 /src | |
parent | 778a6d338bf2610d12d814b4a503d2638cfc8d1d (diff) | |
download | openbsd-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.3 | 57 |
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 | |||
129 | structures. | 147 | structures. |
130 | .Pp | 148 | .Pp |
131 | .Fn ASN1_STRING_cmp | 149 | .Fn ASN1_STRING_cmp |
132 | compares the type, the length, and the content of | 150 | and |
151 | .Fn ASN1_OCTET_STRING_cmp | ||
152 | compare the type, the length, and the content of | ||
133 | .Fa a | 153 | .Fa a |
134 | and | 154 | and |
135 | .Fa b . | 155 | .Fa b . |
@@ -144,7 +164,9 @@ Applications should use | |||
144 | instead. | 164 | instead. |
145 | .Pp | 165 | .Pp |
146 | .Fn ASN1_STRING_dup | 166 | .Fn ASN1_STRING_dup |
147 | copies | 167 | and |
168 | .Fn ASN1_OCTET_STRING_dup | ||
169 | copy | ||
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 | |||
167 | into an inconsistent internal state. | 189 | into an inconsistent internal state. |
168 | .Pp | 190 | .Pp |
169 | .Fn ASN1_STRING_set | 191 | .Fn ASN1_STRING_set |
170 | sets the length attribute of | 192 | and |
193 | .Fn ASN1_OCTET_STRING_set | ||
194 | set the length attribute of | ||
171 | .Fa str | 195 | .Fa str |
172 | to | 196 | to |
173 | .Fa len | 197 | .Fa len |
174 | and copies that number of bytes from | 198 | and copy that number of bytes from |
175 | .Fa data | 199 | .Fa data |
176 | into | 200 | into |
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 |
254 | returns 0 if the type, the length, and the content of | 278 | and |
279 | .Fn ASN1_OCTET_STRING_cmp | ||
280 | return 0 if the type, the length, and the content of | ||
255 | .Fa a | 281 | .Fa a |
256 | and | 282 | and |
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 |
270 | returns a pointer to a newly allocated | 296 | and |
297 | .Fn ASN1_OCTET_STRING_dup | ||
298 | return a pointer to a newly allocated | ||
271 | .Vt ASN1_STRING | 299 | .Vt ASN1_STRING |
272 | structure or | 300 | structure or |
273 | .Dv NULL | 301 | .Dv NULL |
@@ -277,7 +305,9 @@ if an error occurred. | |||
277 | returns a number of bytes. | 305 | returns a number of bytes. |
278 | .Pp | 306 | .Pp |
279 | .Fn ASN1_STRING_set | 307 | .Fn ASN1_STRING_set |
280 | returns 1 on success or 0 on failure. | 308 | and |
309 | .Fn ASN1_OCTET_STRING_set | ||
310 | return 1 on success or 0 on failure. | ||
281 | .Pp | 311 | .Pp |
282 | .Fn ASN1_STRING_to_UTF8 | 312 | .Fn ASN1_STRING_to_UTF8 |
283 | returns the number of bytes in the output buffer | 313 | returns 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 , | ||
303 | and | 334 | and |
304 | .Fn ASN1_STRING_set | 335 | .Fn ASN1_OCTET_STRING_set |
305 | first appeared in SSLeay 0.6.5. | 336 | first 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 , | ||
307 | and | 340 | and |
308 | .Fn ASN1_STRING_type | 341 | .Fn ASN1_STRING_type |
309 | first appeared in SSLeay 0.8.0. | 342 | first appeared in SSLeay 0.8.0. |