Deprecate ASN1_STRING_length_set in OpenSSL 3.0.
authorDavid Benjamin <davidben@google.com>
Fri, 18 Sep 2020 19:21:43 +0000 (15:21 -0400)
committerKurt Roeckx <kurt@roeckx.be>
Sun, 20 Sep 2020 12:20:27 +0000 (14:20 +0200)
Fixes #12885

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
GH: #12922

crypto/asn1/asn1_lib.c
include/openssl/asn1.h.in
util/libcrypto.num

index 1331f608f42bd8fe671b5522375bcd304714e72f..d6160ac9796a500d418ba762aaf4b5b7d3d8e90a 100644 (file)
@@ -387,10 +387,12 @@ int ASN1_STRING_length(const ASN1_STRING *x)
     return x->length;
 }
 
+#ifndef OPENSSL_NO_DEPRECATED_3_0
 void ASN1_STRING_length_set(ASN1_STRING *x, int len)
 {
     x->length = len;
 }
+#endif
 
 int ASN1_STRING_type(const ASN1_STRING *x)
 {
index c4d6f068ae1266ec26c1f84c9a506921d1167ab7..dfb1c9cae570502351c3c570bb311f04c8c9369c 100644 (file)
@@ -539,7 +539,7 @@ int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
 int ASN1_STRING_length(const ASN1_STRING *x);
-void ASN1_STRING_length_set(ASN1_STRING *x, int n);
+DEPRECATEDIN_3_0(void ASN1_STRING_length_set(ASN1_STRING *x, int n))
 int ASN1_STRING_type(const ASN1_STRING *x);
 DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
 const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x);
index 0be0ada89dec803a4c7318fe20919c32cc71b8b0..96fd637ba0613d7b8d162f486ad4ae892009beee 100644 (file)
@@ -1813,7 +1813,7 @@ BIO_next                                1855      3_0_0   EXIST::FUNCTION:
 ASN1_STRING_set_default_mask_asc        1856   3_0_0   EXIST::FUNCTION:
 X509_CRL_new                            1857   3_0_0   EXIST::FUNCTION:
 i2b_PrivateKey_bio                      1858   3_0_0   EXIST::FUNCTION:DSA
-ASN1_STRING_length_set                  1859   3_0_0   EXIST::FUNCTION:
+ASN1_STRING_length_set                  1859   3_0_0   EXIST::FUNCTION:DEPRECATEDIN_3_0
 PEM_write_PKCS8                         1860   3_0_0   EXIST::FUNCTION:STDIO
 PKCS7_digest_from_attributes            1861   3_0_0   EXIST::FUNCTION:
 EC_GROUP_set_curve_GFp                  1862   3_0_0   EXIST::FUNCTION:DEPRECATEDIN_3_0,EC