From e3c116b2009753a1be6fac98f5252a78f2cc3a6a Mon Sep 17 00:00:00 2001 From: schwarze Date: Thu, 15 Feb 2018 00:15:29 +0000 Subject: [PATCH] In asn1.h rev. 1.44 2018/02/14 16:46:04, jsing@ provided ASN1_STRING_get0_data(3). Merge the corresponding documentation from OpenSSL. --- lib/libcrypto/man/ASN1_STRING_length.3 | 33 +++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/lib/libcrypto/man/ASN1_STRING_length.3 b/lib/libcrypto/man/ASN1_STRING_length.3 index 398d49eee47..255daec9c6f 100644 --- a/lib/libcrypto/man/ASN1_STRING_length.3 +++ b/lib/libcrypto/man/ASN1_STRING_length.3 @@ -1,6 +1,5 @@ -.\" $OpenBSD: ASN1_STRING_length.3,v 1.7 2018/02/12 15:45:12 schwarze Exp $ -.\" full merge up to: OpenSSL 99d63d46 Tue Jun 21 07:03:34 2016 -0400 -.\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 +.\" $OpenBSD: ASN1_STRING_length.3,v 1.8 2018/02/15 00:15:29 schwarze Exp $ +.\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 .\" .\" This file is a derived work. .\" The changes are covered by the following Copyright and license: @@ -67,13 +66,14 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: February 12 2018 $ +.Dd $Mdocdate: February 15 2018 $ .Dt ASN1_STRING_LENGTH 3 .Os .Sh NAME .Nm ASN1_STRING_cmp , .Nm ASN1_STRING_data , .Nm ASN1_STRING_dup , +.Nm ASN1_STRING_get0_data , .Nm ASN1_STRING_length , .Nm ASN1_STRING_length_set , .Nm ASN1_STRING_set , @@ -95,6 +95,10 @@ .Fo ASN1_STRING_dup .Fa "ASN1_STRING *a" .Fc +.Ft const unsigned char * +.Fo ASN1_STRING_get0_data +.Fa "const ASN1_STRING *x" +.Fc .Ft int .Fo ASN1_STRING_length .Fa "ASN1_STRING *x" @@ -131,14 +135,23 @@ and .Fa b . .Pp .Fn ASN1_STRING_data -returns an internal pointer to the data of -.Fa x . -It should not be freed or modified in any way. +is similar to +.Fn ASN1_STRING_get0_data +except that the returned value is not constant. +This function is deprecated. +Applications should use +.Fn ASN1_STRING_get0_data +instead. .Pp .Fn ASN1_STRING_dup copies .Fa a . .Pp +.Fn ASN1_STRING_get0_data +returns an internal pointer to the data of +.Fa x . +It should not be freed or modified in any way. +.Pp .Fn ASN1_STRING_length returns the length attribute of .Fa x , @@ -220,6 +233,8 @@ types: the relevant INTEGER or ENUMERATED utility functions should be used instead. .Pp In general it cannot be assumed that the data returned by +.Fn ASN1_STRING_get0_data +and .Fn ASN1_STRING_data is NUL terminated, and it may contain embedded NUL characters. The format of the data depends on the string type: @@ -246,7 +261,9 @@ In contrast to the sign of the return value does not indicate lexicographical ordering. .Pp .Fn ASN1_STRING_data -returns an internal pointer to the data of +and +.Fn ASN1_STRING_get0_data +return an internal pointer to the data of .Fa x . .Pp .Fn ASN1_STRING_dup -- 2.20.1