summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2021-11-13 17:12:18 +0000
committerschwarze <>2021-11-13 17:12:18 +0000
commit89aa3af8a0fb42b0e35d7005c011d5aa3af3c2cc (patch)
tree0744ea11bd8a7cc1a42402daf8c60280fb8ecbc8 /src/lib
parent9ed9dccfc01e224fbb432e3681fc22a9085d7180 (diff)
downloadopenbsd-89aa3af8a0fb42b0e35d7005c011d5aa3af3c2cc.tar.gz
openbsd-89aa3af8a0fb42b0e35d7005c011d5aa3af3c2cc.tar.bz2
openbsd-89aa3af8a0fb42b0e35d7005c011d5aa3af3c2cc.zip
document ASN1_STRING_copy(3)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/ASN1_STRING_length.347
1 files changed, 43 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/ASN1_STRING_length.3 b/src/lib/libcrypto/man/ASN1_STRING_length.3
index 27bb6632a5..9d8cbf83ce 100644
--- a/src/lib/libcrypto/man/ASN1_STRING_length.3
+++ b/src/lib/libcrypto/man/ASN1_STRING_length.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ASN1_STRING_length.3,v 1.22 2021/10/25 10:26:21 schwarze Exp $ 1.\" $OpenBSD: ASN1_STRING_length.3,v 1.23 2021/11/13 17:12:18 schwarze Exp $
2.\" full merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 2.\" full merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100
3.\" 3.\"
4.\" This file is a derived work. 4.\" This file is a derived work.
@@ -66,7 +66,7 @@
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: October 25 2021 $ 69.Dd $Mdocdate: November 13 2021 $
70.Dt ASN1_STRING_LENGTH 3 70.Dt ASN1_STRING_LENGTH 3
71.Os 71.Os
72.Sh NAME 72.Sh NAME
@@ -81,6 +81,7 @@
81.Nm ASN1_STRING_set0 , 81.Nm ASN1_STRING_set0 ,
82.Nm ASN1_STRING_set , 82.Nm ASN1_STRING_set ,
83.Nm ASN1_OCTET_STRING_set , 83.Nm ASN1_OCTET_STRING_set ,
84.Nm ASN1_STRING_copy ,
84.Nm ASN1_STRING_to_UTF8 , 85.Nm ASN1_STRING_to_UTF8 ,
85.Nm ASN1_STRING_type 86.Nm ASN1_STRING_type
86.Nd ASN1_STRING utility functions 87.Nd ASN1_STRING utility functions
@@ -140,6 +141,11 @@
140.Fa "int len" 141.Fa "int len"
141.Fc 142.Fc
142.Ft int 143.Ft int
144.Fo ASN1_STRING_copy
145.Fa "ASN1_STRING *dst"
146.Fa "const ASN1_STRING *src"
147.Fc
148.Ft int
143.Fo ASN1_STRING_to_UTF8 149.Fo ASN1_STRING_to_UTF8
144.Fa "unsigned char **out" 150.Fa "unsigned char **out"
145.Fa "const ASN1_STRING *in" 151.Fa "const ASN1_STRING *in"
@@ -218,7 +224,7 @@ into
218overwriting any previous data. 224overwriting any previous data.
219If 225If
220.Fa len 226.Fa len
221is -1, then 227is \-1, then
222.Fn strlen data 228.Fn strlen data
223is used instead of 229is used instead of
224.Fa len . 230.Fa len .
@@ -232,6 +238,18 @@ remains uninitialized; that is not considered an error unless
232.Fa len 238.Fa len
233is negative. 239is negative.
234.Pp 240.Pp
241.Fn ASN1_STRING_copy
242copies the length and data of
243.Fa src
244into
245.Fa dst
246using
247.Fn ASN1_STRING_set
248and changes the type and flags of
249.Fa dst
250to match the type and flags of
251.Fa src .
252.Pp
235.Fn ASN1_STRING_to_UTF8 253.Fn ASN1_STRING_to_UTF8
236converts the string 254converts the string
237.Fa in 255.Fa in
@@ -323,10 +341,27 @@ if an error occurred.
323.Fn ASN1_STRING_length 341.Fn ASN1_STRING_length
324returns a number of bytes. 342returns a number of bytes.
325.Pp 343.Pp
344.Fn ASN1_STRING_set ,
345.Fn ASN1_OCTET_STRING_set ,
346and
347.Fn ASN1_STRING_copy
348return 1 on success or 0 on failure.
349They fail is memory allocation fails.
326.Fn ASN1_STRING_set 350.Fn ASN1_STRING_set
327and 351and
328.Fn ASN1_OCTET_STRING_set 352.Fn ASN1_OCTET_STRING_set
329return 1 on success or 0 on failure. 353also fail if
354.Fa data
355is
356.Dv NULL
357and
358.Fa len
359is \-1 in the same call.
360.Fn ASN1_STRING_copy
361also fails if
362.Fa src
363is
364.Dv NULL .
330.Pp 365.Pp
331.Fn ASN1_STRING_to_UTF8 366.Fn ASN1_STRING_to_UTF8
332returns the number of bytes in the output buffer 367returns the number of bytes in the output buffer
@@ -377,6 +412,10 @@ first appeared in OpenSSL 0.9.6 and has been available since
377first appeared in OpenSSL 0.9.8h and has been available since 412first appeared in OpenSSL 0.9.8h and has been available since
378.Ox 4.5 . 413.Ox 4.5 .
379.Pp 414.Pp
415.Fn ASN1_STRING_copy
416first appeared in OpenSSL 1.0.0 and has been available since
417.Ox 4.9 .
418.Pp
380.Fn ASN1_STRING_get0_data 419.Fn ASN1_STRING_get0_data
381first appeared in OpenSSL 1.1.0 and has been available since 420first appeared in OpenSSL 1.1.0 and has been available since
382.Ox 6.3 . 421.Ox 6.3 .