diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-08-16 14:06:48 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-08-16 16:05:35 +0100 |
commit | 17ebf85abda18c3875b1ba6670fe7b393bc1f297 (patch) | |
tree | 224f98559daf13f77b4526df0a24a3ab1675f685 /doc | |
parent | 1940aa6e6b51147df10a5bffcaaa2b9904209184 (diff) | |
download | openssl-17ebf85abda18c3875b1ba6670fe7b393bc1f297.tar.gz |
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 <rsalz@openssl.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/crypto/ASN1_STRING_length.pod | 11 |
1 files changed, 8 insertions, 3 deletions
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 <openssl/asn1.h> 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<ASN1_STRING> structure to be manipulated. ASN1_STRING_length() returns the length of the content of B<x>. -ASN1_STRING_data() returns an internal pointer to the data of B<x>. +ASN1_STRING_get0_data() returns an internal pointer to the data of B<x>. Since this is an internal pointer it should B<not> 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<a>. ASN1_STRING_cmp() compares B<a> and B<b> returning 0 if the two |