From 17ebf85abda18c3875b1ba6670fe7b393bc1f297 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 16 Aug 2016 14:06:48 +0100 Subject: Add ASN1_STRING_get0_data(), deprecate ASN1_STRING_data(). Deprecate the function ASN1_STRING_data() and replace with a new function ASN1_STRING_get0_data() which returns a constant pointer. Update library to use new function. Reviewed-by: Rich Salz --- doc/crypto/ASN1_STRING_length.pod | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/crypto/ASN1_STRING_length.pod b/doc/crypto/ASN1_STRING_length.pod index a57de1c093..26cb176142 100644 --- a/doc/crypto/ASN1_STRING_length.pod +++ b/doc/crypto/ASN1_STRING_length.pod @@ -3,14 +3,15 @@ =head1 NAME ASN1_STRING_dup, ASN1_STRING_cmp, ASN1_STRING_set, ASN1_STRING_length, -ASN1_STRING_type, ASN1_STRING_data, ASN1_STRING_to_UTF8 - -ASN1_STRING utility functions +ASN1_STRING_type, ASN1_STRING_get0_data, ASN1_STRING_data, +ASN1_STRING_to_UTF8 - ASN1_STRING utility functions =head1 SYNOPSIS #include int ASN1_STRING_length(ASN1_STRING *x); + const unsigned char * ASN1_STRING_get0_data(const ASN1_STRING *x); unsigned char * ASN1_STRING_data(ASN1_STRING *x); ASN1_STRING * ASN1_STRING_dup(ASN1_STRING *a); @@ -29,10 +30,14 @@ These functions allow an B structure to be manipulated. ASN1_STRING_length() returns the length of the content of B. -ASN1_STRING_data() returns an internal pointer to the data of B. +ASN1_STRING_get0_data() returns an internal pointer to the data of B. Since this is an internal pointer it should B be freed or modified in any way. +ASN1_STRING_data() is similar to ASN1_STRING_get0_data() except the +returned value is not constant. This function is deprecated: +applications should use ASN1_STRING_get0_data() instead. + ASN1_STRING_dup() returns a copy of the structure B. ASN1_STRING_cmp() compares B and B returning 0 if the two -- cgit v1.2.3