Remove ASN1_STRING_FLAG_NDEF.
This is a remnant of OpenSSL's streaming PKCS#7 encoder.
Change-Id: I1fb8ac404e12c43945b27efb8d00643758baaf1e
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/43894
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c
index 481a4d7..93957ba 100644
--- a/crypto/asn1/asn1_lib.c
+++ b/crypto/asn1/asn1_lib.c
@@ -401,8 +401,7 @@
{
if (a == NULL)
return;
- if (a->data && !(a->flags & ASN1_STRING_FLAG_NDEF))
- OPENSSL_free(a->data);
+ OPENSSL_free(a->data);
OPENSSL_free(a);
}
diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h
index b6d1441..439641f 100644
--- a/include/openssl/asn1.h
+++ b/include/openssl/asn1.h
@@ -179,11 +179,6 @@
DEFINE_STACK_OF(ASN1_OBJECT)
#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
-/* This indicates that the ASN1_STRING is not a real value but just a place
- * holder for the location where indefinite length constructed data should
- * be inserted in the memory buffer
- */
-#define ASN1_STRING_FLAG_NDEF 0x010
/* This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
* type.