summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-02-15 00:15:30 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-02-15 00:15:30 +0000
commit7b08a7447d636a2aca1604e2f2da7c200f3b361c (patch)
tree992f3b1f3b0a31945ee02072be8b2862009c49d5
parent65a22c4087ce0566033b9d322ad40bd8cd27ad20 (diff)
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.
-rw-r--r--lib/libcrypto/man/ASN1_STRING_length.333
1 files 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