Add a few more scopers.
Conscrypt uses these types. Note that BORINGSSL_MAKE_STACK_DELETER
requires DECLARE_STACK_OF to work. Otherwise the compiler gives some
really confusing error.
Change-Id: I8d194067ea6450937e4a8fcb4acbbf98a2550bce
Reviewed-on: https://boringssl-review.googlesource.com/11082
Reviewed-by: Kenny Root <kroot@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h
index 391be81..c8b32e7 100644
--- a/include/openssl/asn1.h
+++ b/include/openssl/asn1.h
@@ -205,6 +205,8 @@
int flags; /* Should we free this one */
};
+DECLARE_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
@@ -928,6 +930,8 @@
namespace bssl {
+BORINGSSL_MAKE_STACK_DELETER(ASN1_OBJECT, ASN1_OBJECT_free)
+
BORINGSSL_MAKE_DELETER(ASN1_OBJECT, ASN1_OBJECT_free)
BORINGSSL_MAKE_DELETER(ASN1_STRING, ASN1_STRING_free)
BORINGSSL_MAKE_DELETER(ASN1_TYPE, ASN1_TYPE_free)
diff --git a/include/openssl/x509.h b/include/openssl/x509.h
index b45dd3b..667e894 100644
--- a/include/openssl/x509.h
+++ b/include/openssl/x509.h
@@ -1230,6 +1230,10 @@
namespace bssl {
BORINGSSL_MAKE_STACK_DELETER(X509, X509_free)
+BORINGSSL_MAKE_STACK_DELETER(X509_CRL, X509_CRL_free)
+BORINGSSL_MAKE_STACK_DELETER(X509_EXTENSION, X509_EXTENSION_free)
+BORINGSSL_MAKE_STACK_DELETER(X509_NAME, X509_NAME_free)
+
BORINGSSL_MAKE_DELETER(X509, X509_free)
BORINGSSL_MAKE_DELETER(X509_ALGOR, X509_ALGOR_free)
BORINGSSL_MAKE_DELETER(X509_CRL, X509_CRL_free)
diff --git a/include/openssl/x509v3.h b/include/openssl/x509v3.h
index 67063bc..c39cf1b 100644
--- a/include/openssl/x509v3.h
+++ b/include/openssl/x509v3.h
@@ -732,7 +732,20 @@
#ifdef __cplusplus
}
+
+extern "C++" {
+
+namespace bssl {
+
+BORINGSSL_MAKE_STACK_DELETER(GENERAL_NAME, GENERAL_NAME_free)
+
+BORINGSSL_MAKE_DELETER(GENERAL_NAME, GENERAL_NAME_free)
+
+} // namespace bssl
+
+} /* extern C++ */
#endif
+
#define X509V3_R_BAD_IP_ADDRESS 100
#define X509V3_R_BAD_OBJECT 101
#define X509V3_R_BN_DEC2BN_ERROR 102