include/openssl/x509v3.h: restore previous stack definition arrangement
[openssl.git] / include / openssl / x509v3.h
index e4f09adfce8ba2562c93d6fec9b8458f381ee619..e7d36638b209bcc0205369d2fece182d8e082ea2 100644 (file)
 extern "C" {
 #endif
 
-DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAME)
-DEFINE_OR_DECLARE_STACK_OF(X509V3_EXT_METHOD)
-DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAMES)
-DEFINE_OR_DECLARE_STACK_OF(ACCESS_DESCRIPTION)
-DEFINE_OR_DECLARE_STACK_OF(DIST_POINT)
-DEFINE_OR_DECLARE_STACK_OF(SXNETID)
-DEFINE_OR_DECLARE_STACK_OF(POLICYQUALINFO)
-DEFINE_OR_DECLARE_STACK_OF(POLICYINFO)
-DEFINE_OR_DECLARE_STACK_OF(POLICY_MAPPING)
-DEFINE_OR_DECLARE_STACK_OF(GENERAL_SUBTREE)
-DEFINE_OR_DECLARE_STACK_OF(X509_PURPOSE)
-DEFINE_OR_DECLARE_STACK_OF(X509_POLICY_NODE)
-DEFINE_OR_DECLARE_STACK_OF(ASIdOrRange)
-DEFINE_OR_DECLARE_STACK_OF(IPAddressOrRange)
-DEFINE_OR_DECLARE_STACK_OF(IPAddressFamily)
-DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING)
-DEFINE_OR_DECLARE_STACK_OF(ADMISSIONS)
-DEFINE_OR_DECLARE_STACK_OF(PROFESSION_INFO)
-
 /* Forward reference */
 struct v3_ext_method;
 struct v3_ext_ctx;
@@ -116,6 +97,8 @@ struct v3_ext_ctx {
 
 typedef struct v3_ext_method X509V3_EXT_METHOD;
 
+DEFINE_OR_DECLARE_STACK_OF(X509V3_EXT_METHOD)
+
 /* ext_flags values */
 # define X509V3_EXT_DYNAMIC      0x1
 # define X509V3_EXT_CTX_DEP      0x2
@@ -180,14 +163,16 @@ typedef struct ACCESS_DESCRIPTION_st {
     GENERAL_NAME *location;
 } ACCESS_DESCRIPTION;
 
-typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
+DEFINE_OR_DECLARE_STACK_OF(ACCESS_DESCRIPTION)
+DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAME)
 
+typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
 typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE;
-
 typedef STACK_OF(ASN1_INTEGER) TLS_FEATURE;
-
 typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES;
 
+DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAMES)
+
 typedef struct DIST_POINT_NAME_st {
     int type;
     union {
@@ -219,6 +204,8 @@ struct DIST_POINT_st {
     int dp_reasons;
 };
 
+DEFINE_OR_DECLARE_STACK_OF(DIST_POINT)
+
 typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS;
 
 struct AUTHORITY_KEYID_st {
@@ -234,6 +221,8 @@ typedef struct SXNET_ID_st {
     ASN1_OCTET_STRING *user;
 } SXNETID;
 
+DEFINE_OR_DECLARE_STACK_OF(SXNETID)
+
 typedef struct SXNET_st {
     ASN1_INTEGER *version;
     STACK_OF(SXNETID) *ids;
@@ -265,11 +254,15 @@ typedef struct POLICYQUALINFO_st {
     } d;
 } POLICYQUALINFO;
 
+DEFINE_OR_DECLARE_STACK_OF(POLICYQUALINFO)
+
 typedef struct POLICYINFO_st {
     ASN1_OBJECT *policyid;
     STACK_OF(POLICYQUALINFO) *qualifiers;
 } POLICYINFO;
 
+DEFINE_OR_DECLARE_STACK_OF(POLICYINFO)
+
 typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES;
 
 typedef struct POLICY_MAPPING_st {
@@ -277,6 +270,8 @@ typedef struct POLICY_MAPPING_st {
     ASN1_OBJECT *subjectDomainPolicy;
 } POLICY_MAPPING;
 
+DEFINE_OR_DECLARE_STACK_OF(POLICY_MAPPING)
+
 typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS;
 
 typedef struct GENERAL_SUBTREE_st {
@@ -285,6 +280,8 @@ typedef struct GENERAL_SUBTREE_st {
     ASN1_INTEGER *maximum;
 } GENERAL_SUBTREE;
 
+DEFINE_OR_DECLARE_STACK_OF(GENERAL_SUBTREE)
+
 struct NAME_CONSTRAINTS_st {
     STACK_OF(GENERAL_SUBTREE) *permittedSubtrees;
     STACK_OF(GENERAL_SUBTREE) *excludedSubtrees;
@@ -423,6 +420,8 @@ typedef struct x509_purpose_st {
     void *usr_data;
 } X509_PURPOSE;
 
+DEFINE_OR_DECLARE_STACK_OF(X509_PURPOSE)
+
 # define X509_PURPOSE_SSL_CLIENT         1
 # define X509_PURPOSE_SSL_SERVER         2
 # define X509_PURPOSE_NS_SSL_SERVER      3
@@ -735,6 +734,7 @@ int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE) *dn_sk,
                              unsigned long chtype);
 
 void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent);
+DEFINE_OR_DECLARE_STACK_OF(X509_POLICY_NODE)
 
 #ifndef OPENSSL_NO_RFC3779
 typedef struct ASRange_st {
@@ -752,6 +752,8 @@ typedef struct ASIdOrRange_st {
     } u;
 } ASIdOrRange;
 
+DEFINE_OR_DECLARE_STACK_OF(ASIdOrRange)
+
 typedef STACK_OF(ASIdOrRange) ASIdOrRanges;
 
 # define ASIdentifierChoice_inherit              0
@@ -789,6 +791,8 @@ typedef struct IPAddressOrRange_st {
     } u;
 } IPAddressOrRange;
 
+DEFINE_OR_DECLARE_STACK_OF(IPAddressOrRange)
+
 typedef STACK_OF(IPAddressOrRange) IPAddressOrRanges;
 
 # define IPAddressChoice_inherit                 0
@@ -807,6 +811,8 @@ typedef struct IPAddressFamily_st {
     IPAddressChoice *ipAddressChoice;
 } IPAddressFamily;
 
+DEFINE_OR_DECLARE_STACK_OF(IPAddressFamily)
+
 typedef STACK_OF(IPAddressFamily) IPAddrBlocks;
 
 DECLARE_ASN1_FUNCTIONS(IPAddressRange)
@@ -879,6 +885,7 @@ int X509v3_addr_validate_resource_set(STACK_OF(X509) *chain,
 
 #endif                         /* OPENSSL_NO_RFC3779 */
 
+DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING)
 
 /*
  * Admission Syntax
@@ -891,6 +898,8 @@ DECLARE_ASN1_FUNCTIONS(NAMING_AUTHORITY)
 DECLARE_ASN1_FUNCTIONS(PROFESSION_INFO)
 DECLARE_ASN1_FUNCTIONS(ADMISSIONS)
 DECLARE_ASN1_FUNCTIONS(ADMISSION_SYNTAX)
+DEFINE_OR_DECLARE_STACK_OF(PROFESSION_INFO)
+DEFINE_OR_DECLARE_STACK_OF(ADMISSIONS)
 typedef STACK_OF(PROFESSION_INFO) PROFESSION_INFOS;
 
 const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId(