From 5bb49af83968021539009be436f8ab8309213e7d Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Mon, 26 Aug 2019 07:59:02 +0000 Subject: document ASN1_OCTET_STRING_cmp(3), ASN1_OCTET_STRING_dup(3), and ASN1_OCTET_STRING_set(3) --- src/lib/libcrypto/man/ASN1_STRING_length.3 | 57 +++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 12 deletions(-) (limited to 'src') 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 @@ -.\" $OpenBSD: ASN1_STRING_length.3,v 1.19 2019/06/14 13:59:32 schwarze Exp $ +.\" $OpenBSD: ASN1_STRING_length.3,v 1.20 2019/08/26 07:59:02 schwarze Exp $ .\" full merge up to: OpenSSL 4a56d2a3 Feb 25 16:49:27 2018 +0300 .\" .\" This file is a derived work. .\" The changes are covered by the following Copyright and license: .\" -.\" Copyright (c) 2018 Ingo Schwarze +.\" Copyright (c) 2018, 2019 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -66,17 +66,20 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 14 2019 $ +.Dd $Mdocdate: August 26 2019 $ .Dt ASN1_STRING_LENGTH 3 .Os .Sh NAME .Nm ASN1_STRING_cmp , +.Nm ASN1_OCTET_STRING_cmp , .Nm ASN1_STRING_data , .Nm ASN1_STRING_dup , +.Nm ASN1_OCTET_STRING_dup , .Nm ASN1_STRING_get0_data , .Nm ASN1_STRING_length , .Nm ASN1_STRING_length_set , .Nm ASN1_STRING_set , +.Nm ASN1_OCTET_STRING_set , .Nm ASN1_STRING_to_UTF8 , .Nm ASN1_STRING_type .Nd ASN1_STRING utility functions @@ -87,6 +90,11 @@ .Fa "const ASN1_STRING *a" .Fa "const ASN1_STRING *b" .Fc +.Ft int +.Fo ASN1_OCTET_STRING_cmp +.Fa "const ASN1_OCTET_STRING *a" +.Fa "const ASN1_OCTET_STRING *b" +.Fc .Ft unsigned char * .Fo ASN1_STRING_data .Fa "ASN1_STRING *x" @@ -95,6 +103,10 @@ .Fo ASN1_STRING_dup .Fa "const ASN1_STRING *a" .Fc +.Ft ASN1_OCTET_STRING * +.Fo ASN1_OCTET_STRING_dup +.Fa "const ASN1_OCTET_STRING *a" +.Fc .Ft const unsigned char * .Fo ASN1_STRING_get0_data .Fa "const ASN1_STRING *x" @@ -115,6 +127,12 @@ .Fa "int len" .Fc .Ft int +.Fo ASN1_OCTET_STRING_set +.Fa "ASN1_OCTET_STRING *str" +.Fa "const unsigned char *data" +.Fa "int len" +.Fc +.Ft int .Fo ASN1_STRING_to_UTF8 .Fa "unsigned char **out" .Fa "const ASN1_STRING *in" @@ -129,7 +147,9 @@ These functions manipulate structures. .Pp .Fn ASN1_STRING_cmp -compares the type, the length, and the content of +and +.Fn ASN1_OCTET_STRING_cmp +compare the type, the length, and the content of .Fa a and .Fa b . @@ -144,7 +164,9 @@ Applications should use instead. .Pp .Fn ASN1_STRING_dup -copies +and +.Fn ASN1_OCTET_STRING_dup +copy .Fa a . .Pp .Fn ASN1_STRING_get0_data @@ -167,11 +189,13 @@ It may put into an inconsistent internal state. .Pp .Fn ASN1_STRING_set -sets the length attribute of +and +.Fn ASN1_OCTET_STRING_set +set the length attribute of .Fa str to .Fa len -and copies that number of bytes from +and copy that number of bytes from .Fa data into .Fa str . @@ -251,7 +275,9 @@ when calling .Fn ASN1_STRING_set . .Sh RETURN VALUES .Fn ASN1_STRING_cmp -returns 0 if the type, the length, and the content of +and +.Fn ASN1_OCTET_STRING_cmp +return 0 if the type, the length, and the content of .Fa a and .Fa b @@ -267,7 +293,9 @@ return an internal pointer to the data of .Fa x . .Pp .Fn ASN1_STRING_dup -returns a pointer to a newly allocated +and +.Fn ASN1_OCTET_STRING_dup +return a pointer to a newly allocated .Vt ASN1_STRING structure or .Dv NULL @@ -277,7 +305,9 @@ if an error occurred. returns a number of bytes. .Pp .Fn ASN1_STRING_set -returns 1 on success or 0 on failure. +and +.Fn ASN1_OCTET_STRING_set +return 1 on success or 0 on failure. .Pp .Fn ASN1_STRING_to_UTF8 returns the number of bytes in the output buffer @@ -300,10 +330,13 @@ the reason can be determined with .Sh HISTORY .Fn ASN1_STRING_cmp , .Fn ASN1_STRING_dup , +.Fn ASN1_STRING_set , and -.Fn ASN1_STRING_set +.Fn ASN1_OCTET_STRING_set first appeared in SSLeay 0.6.5. -.Fn ASN1_STRING_data +.Fn ASN1_OCTET_STRING_cmp , +.Fn ASN1_STRING_data , +.Fn ASN1_OCTET_STRING_dup , and .Fn ASN1_STRING_type first appeared in SSLeay 0.8.0. -- cgit v1.2.3-55-g6feb