TLS/SSL and crypto library
リビジョン | e144fd36ceb4d71a75b04503995a52ad6699fb22 (tree) |
---|---|
日時 | 2020-09-13 19:09:45 |
作者 | Matt Caswell <matt@open...> |
コミッター | Matt Caswell |
Fix safestack issues in x509v3.h
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12781)
@@ -27,6 +27,7 @@ | ||
27 | 27 | /include/openssl/fipskey.h |
28 | 28 | /include/openssl/ssl.h |
29 | 29 | /include/openssl/x509.h |
30 | +/include/openssl/x509v3.h | |
30 | 31 | |
31 | 32 | # Auto generated doc files |
32 | 33 | doc/man1/openssl-*.pod |
@@ -24,8 +24,6 @@ | ||
24 | 24 | # include <openssl/cms.h> |
25 | 25 | |
26 | 26 | DEFINE_STACK_OF(CMS_SignerInfo) |
27 | -DEFINE_STACK_OF(GENERAL_NAME) | |
28 | -DEFINE_STACK_OF(GENERAL_NAMES) | |
29 | 27 | DEFINE_STACK_OF_STRING() |
30 | 28 | |
31 | 29 | static int save_certs(char *signerfile, STACK_OF(X509) *signers); |
@@ -63,9 +63,6 @@ static int WIN32_rename(const char *from, const char *to); | ||
63 | 63 | |
64 | 64 | DEFINE_STACK_OF(CONF) |
65 | 65 | DEFINE_STACK_OF(CONF_VALUE) |
66 | -DEFINE_STACK_OF(X509_POLICY_NODE) | |
67 | -DEFINE_STACK_OF(GENERAL_NAME) | |
68 | -DEFINE_STACK_OF(DIST_POINT) | |
69 | 66 | DEFINE_STACK_OF_STRING() |
70 | 67 | |
71 | 68 | typedef struct { |
@@ -17,6 +17,7 @@ DEPEND[]=include/openssl/configuration.h include/openssl/opensslv.h \ | ||
17 | 17 | include/openssl/fipskey.h \ |
18 | 18 | include/openssl/ssl.h \ |
19 | 19 | include/openssl/x509.h \ |
20 | + include/openssl/x509v3.h \ | |
20 | 21 | include/crypto/bn_conf.h include/crypto/dso_conf.h \ |
21 | 22 | doc/man7/openssl_user_macros.pod |
22 | 23 |
@@ -25,6 +26,7 @@ GENERATE[include/openssl/opensslv.h]=include/openssl/opensslv.h.in | ||
25 | 26 | GENERATE[include/openssl/fipskey.h]=include/openssl/fipskey.h.in |
26 | 27 | GENERATE[include/openssl/ssl.h]=include/openssl/ssl.h.in |
27 | 28 | GENERATE[include/openssl/x509.h]=include/openssl/x509.h.in |
29 | +GENERATE[include/openssl/x509v3.h]=include/openssl/x509v3.h.in | |
28 | 30 | GENERATE[include/crypto/bn_conf.h]=include/crypto/bn_conf.h.in |
29 | 31 | GENERATE[include/crypto/dso_conf.h]=include/crypto/dso_conf.h.in |
30 | 32 | GENERATE[doc/man7/openssl_user_macros.pod]=doc/man7/openssl_user_macros.pod.in |
@@ -21,9 +21,7 @@ | ||
21 | 21 | #include <openssl/crmf.h> |
22 | 22 | #include <openssl/err.h> |
23 | 23 | |
24 | -DEFINE_STACK_OF(POLICYINFO) | |
25 | 24 | DEFINE_STACK_OF(ASN1_UTF8STRING) |
26 | -DEFINE_STACK_OF(GENERAL_NAME) | |
27 | 25 | DEFINE_STACK_OF(OSSL_CMP_ITAV) |
28 | 26 | |
29 | 27 | /* |
@@ -23,7 +23,6 @@ | ||
23 | 23 | |
24 | 24 | DEFINE_STACK_OF(OSSL_CMP_CERTSTATUS) |
25 | 25 | DEFINE_STACK_OF(OSSL_CMP_ITAV) |
26 | -DEFINE_STACK_OF(GENERAL_NAME) | |
27 | 26 | DEFINE_STACK_OF(OSSL_CMP_PKISI) |
28 | 27 | DEFINE_STACK_OF(OSSL_CRMF_MSG) |
29 | 28 | DEFINE_STACK_OF(OSSL_CMP_CERTRESPONSE) |
@@ -20,7 +20,6 @@ | ||
20 | 20 | #include "crypto/x509.h" |
21 | 21 | #include "cms_local.h" |
22 | 22 | |
23 | -DEFINE_STACK_OF(GENERAL_NAMES) | |
24 | 23 | DEFINE_STACK_OF(CMS_SignerInfo) |
25 | 24 | DEFINE_STACK_OF(ESS_CERT_ID) |
26 | 25 | DEFINE_STACK_OF(ESS_CERT_ID_V2) |
@@ -16,7 +16,6 @@ | ||
16 | 16 | |
17 | 17 | DEFINE_STACK_OF(ESS_CERT_ID) |
18 | 18 | DEFINE_STACK_OF(ESS_CERT_ID_V2) |
19 | -DEFINE_STACK_OF(GENERAL_NAME) | |
20 | 19 | |
21 | 20 | static ESS_CERT_ID *ESS_CERT_ID_new_init(X509 *cert, int issuer_needed); |
22 | 21 | static ESS_CERT_ID_V2 *ESS_CERT_ID_V2_new_init(const EVP_MD *hash_alg, |
@@ -17,7 +17,6 @@ | ||
17 | 17 | #include <openssl/x509v3.h> |
18 | 18 | |
19 | 19 | DEFINE_STACK_OF(ASN1_OBJECT) |
20 | -DEFINE_STACK_OF(ACCESS_DESCRIPTION) | |
21 | 20 | |
22 | 21 | /* Standard wrapper functions for extensions */ |
23 | 22 |
@@ -16,8 +16,6 @@ | ||
16 | 16 | # include <openssl/x509v3.h> |
17 | 17 | # include "../x509/ext_dat.h" |
18 | 18 | |
19 | -DEFINE_STACK_OF(ACCESS_DESCRIPTION) | |
20 | - | |
21 | 19 | /* |
22 | 20 | * OCSP extensions and a couple of CRL entry extensions |
23 | 21 | */ |
@@ -19,7 +19,6 @@ DEFINE_STACK_OF(PKCS7_SIGNER_INFO) | ||
19 | 19 | DEFINE_STACK_OF(ESS_CERT_ID) |
20 | 20 | DEFINE_STACK_OF(ESS_CERT_ID_V2) |
21 | 21 | DEFINE_STACK_OF(ASN1_UTF8STRING) |
22 | -DEFINE_STACK_OF(GENERAL_NAME) | |
23 | 22 | |
24 | 23 | static int ts_verify_cert(X509_STORE *store, STACK_OF(X509) *untrusted, |
25 | 24 | X509 *signer, STACK_OF(X509) **chain); |
@@ -14,8 +14,6 @@ | ||
14 | 14 | |
15 | 15 | #include "pcy_local.h" |
16 | 16 | |
17 | -DEFINE_STACK_OF(POLICYINFO) | |
18 | - | |
19 | 17 | static int policy_data_cmp(const X509_POLICY_DATA *const *a, |
20 | 18 | const X509_POLICY_DATA *const *b); |
21 | 19 | static int policy_cache_set_int(long *out, ASN1_INTEGER *value); |
@@ -14,7 +14,6 @@ | ||
14 | 14 | #include "pcy_local.h" |
15 | 15 | |
16 | 16 | DEFINE_STACK_OF(ASN1_OBJECT) |
17 | -DEFINE_STACK_OF(POLICYQUALINFO) | |
18 | 17 | |
19 | 18 | /* Policy Node routines */ |
20 | 19 |
@@ -13,8 +13,6 @@ | ||
13 | 13 | |
14 | 14 | #include "pcy_local.h" |
15 | 15 | |
16 | -DEFINE_STACK_OF(X509_POLICY_NODE) | |
17 | - | |
18 | 16 | /* accessor functions */ |
19 | 17 | |
20 | 18 | /* X509_POLICY_TREE stuff */ |
@@ -14,7 +14,6 @@ | ||
14 | 14 | |
15 | 15 | #include "pcy_local.h" |
16 | 16 | |
17 | -DEFINE_STACK_OF(POLICY_MAPPING) | |
18 | 17 | DEFINE_STACK_OF(ASN1_OBJECT) |
19 | 18 | |
20 | 19 | /* |
@@ -14,7 +14,6 @@ | ||
14 | 14 | |
15 | 15 | #include "pcy_local.h" |
16 | 16 | |
17 | -DEFINE_STACK_OF(X509_POLICY_NODE) | |
18 | 17 | DEFINE_STACK_OF(ASN1_OBJECT) |
19 | 18 | |
20 | 19 | static int node_cmp(const X509_POLICY_NODE *const *a, |
@@ -15,7 +15,6 @@ | ||
15 | 15 | #include "pcy_local.h" |
16 | 16 | |
17 | 17 | DEFINE_STACK_OF(ASN1_OBJECT) |
18 | -DEFINE_STACK_OF(X509_POLICY_NODE) | |
19 | 18 | |
20 | 19 | static void expected_print(BIO *channel, |
21 | 20 | X509_POLICY_LEVEL *lev, X509_POLICY_NODE *node, |
@@ -26,8 +26,6 @@ | ||
26 | 26 | |
27 | 27 | #ifndef OPENSSL_NO_RFC3779 |
28 | 28 | |
29 | -DEFINE_STACK_OF(IPAddressOrRange) | |
30 | -DEFINE_STACK_OF(IPAddressFamily) | |
31 | 29 | DEFINE_STACK_OF(CONF_VALUE) |
32 | 30 | |
33 | 31 | /* |
@@ -20,9 +20,6 @@ | ||
20 | 20 | #include "v3_admis.h" |
21 | 21 | #include "ext_dat.h" |
22 | 22 | |
23 | -DEFINE_STACK_OF(ADMISSIONS) | |
24 | -DEFINE_STACK_OF(PROFESSION_INFO) | |
25 | -DEFINE_STACK_OF(ASN1_STRING) | |
26 | 23 | DEFINE_STACK_OF(ASN1_OBJECT) |
27 | 24 | |
28 | 25 | ASN1_SEQUENCE(NAMING_AUTHORITY) = { |
@@ -16,7 +16,6 @@ | ||
16 | 16 | #include "ext_dat.h" |
17 | 17 | |
18 | 18 | DEFINE_STACK_OF(CONF_VALUE) |
19 | -DEFINE_STACK_OF(GENERAL_NAME) | |
20 | 19 | |
21 | 20 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, |
22 | 21 | AUTHORITY_KEYID *akeyid, |
@@ -15,7 +15,6 @@ | ||
15 | 15 | #include "ext_dat.h" |
16 | 16 | |
17 | 17 | DEFINE_STACK_OF(CONF_VALUE) |
18 | -DEFINE_STACK_OF(GENERAL_NAME) | |
19 | 18 | |
20 | 19 | static GENERAL_NAMES *v2i_subject_alt(X509V3_EXT_METHOD *method, |
21 | 20 | X509V3_CTX *ctx, |
@@ -56,7 +56,6 @@ IMPLEMENT_ASN1_FUNCTIONS(ASIdOrRange) | ||
56 | 56 | IMPLEMENT_ASN1_FUNCTIONS(ASIdentifierChoice) |
57 | 57 | IMPLEMENT_ASN1_FUNCTIONS(ASIdentifiers) |
58 | 58 | |
59 | -DEFINE_STACK_OF(ASIdOrRange) | |
60 | 59 | DEFINE_STACK_OF(CONF_VALUE) |
61 | 60 | |
62 | 61 | /* |
@@ -19,8 +19,6 @@ | ||
19 | 19 | #include "ext_dat.h" |
20 | 20 | |
21 | 21 | DEFINE_STACK_OF(CONF_VALUE) |
22 | -DEFINE_STACK_OF(POLICYINFO) | |
23 | -DEFINE_STACK_OF(POLICYQUALINFO) | |
24 | 22 | DEFINE_STACK_OF(ASN1_INTEGER) |
25 | 23 | |
26 | 24 | /* Certificate policies extension support: this one is a bit complex... */ |
@@ -19,8 +19,6 @@ | ||
19 | 19 | #include "x509_local.h" |
20 | 20 | |
21 | 21 | DEFINE_STACK_OF(CONF_VALUE) |
22 | -DEFINE_STACK_OF(GENERAL_NAME) | |
23 | -DEFINE_STACK_OF(DIST_POINT) | |
24 | 22 | |
25 | 23 | static void *v2i_crld(const X509V3_EXT_METHOD *method, |
26 | 24 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); |
@@ -15,7 +15,6 @@ | ||
15 | 15 | #include <openssl/x509v3.h> |
16 | 16 | #include "ext_dat.h" |
17 | 17 | |
18 | -DEFINE_STACK_OF(ACCESS_DESCRIPTION) | |
19 | 18 | DEFINE_STACK_OF(CONF_VALUE) |
20 | 19 | |
21 | 20 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD |
@@ -16,8 +16,6 @@ | ||
16 | 16 | |
17 | 17 | #include "ext_dat.h" |
18 | 18 | |
19 | -DEFINE_STACK_OF(X509V3_EXT_METHOD) | |
20 | - | |
21 | 19 | static STACK_OF(X509V3_EXT_METHOD) *ext_list = NULL; |
22 | 20 | |
23 | 21 | static int ext_cmp(const X509V3_EXT_METHOD *const *a, |
@@ -21,8 +21,6 @@ | ||
21 | 21 | #include "ext_dat.h" |
22 | 22 | |
23 | 23 | DEFINE_STACK_OF(CONF_VALUE) |
24 | -DEFINE_STACK_OF(GENERAL_NAME) | |
25 | -DEFINE_STACK_OF(GENERAL_SUBTREE) | |
26 | 24 | |
27 | 25 | static void *v2i_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method, |
28 | 26 | X509V3_CTX *ctx, |
@@ -14,7 +14,6 @@ | ||
14 | 14 | #include <openssl/x509v3.h> |
15 | 15 | #include "ext_dat.h" |
16 | 16 | |
17 | -DEFINE_STACK_OF(POLICY_MAPPING) | |
18 | 17 | DEFINE_STACK_OF(CONF_VALUE) |
19 | 18 | |
20 | 19 | static void *v2i_POLICY_MAPPINGS(const X509V3_EXT_METHOD *method, |
@@ -16,9 +16,6 @@ | ||
16 | 16 | #include "internal/tsan_assist.h" |
17 | 17 | #include "x509_local.h" |
18 | 18 | |
19 | -DEFINE_STACK_OF(GENERAL_NAME) | |
20 | -DEFINE_STACK_OF(DIST_POINT) | |
21 | -DEFINE_STACK_OF(X509_PURPOSE) | |
22 | 19 | DEFINE_STACK_OF(ASN1_OBJECT) |
23 | 20 | |
24 | 21 | static int check_ssl_ca(const X509 *x); |
@@ -15,7 +15,6 @@ | ||
15 | 15 | #include <openssl/x509v3.h> |
16 | 16 | #include "ext_dat.h" |
17 | 17 | |
18 | -DEFINE_STACK_OF(SXNETID) | |
19 | 18 | DEFINE_STACK_OF(CONF_VALUE) |
20 | 19 | |
21 | 20 | /* Support for Thawte strong extranet extension */ |
@@ -22,8 +22,6 @@ | ||
22 | 22 | #include "x509_local.h" |
23 | 23 | |
24 | 24 | DEFINE_STACK_OF(CONF_VALUE) |
25 | -DEFINE_STACK_OF(GENERAL_NAME) | |
26 | -DEFINE_STACK_OF(ACCESS_DESCRIPTION) | |
27 | 25 | DEFINE_STACK_OF_STRING() |
28 | 26 | |
29 | 27 | static char *strip_spaces(char *name); |
@@ -25,8 +25,6 @@ | ||
25 | 25 | #include "crypto/x509.h" |
26 | 26 | #include "x509_local.h" |
27 | 27 | |
28 | -DEFINE_STACK_OF(GENERAL_NAME) | |
29 | -DEFINE_STACK_OF(DIST_POINT) | |
30 | 28 | DEFINE_STACK_OF_STRING() |
31 | 29 | |
32 | 30 | /* CRL score values */ |
@@ -15,9 +15,6 @@ | ||
15 | 15 | #include <openssl/x509v3.h> |
16 | 16 | #include "x509_local.h" |
17 | 17 | |
18 | -DEFINE_STACK_OF(GENERAL_NAME) | |
19 | -DEFINE_STACK_OF(GENERAL_NAMES) | |
20 | - | |
21 | 18 | static int X509_REVOKED_cmp(const X509_REVOKED *const *a, |
22 | 19 | const X509_REVOKED *const *b); |
23 | 20 | static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp); |
@@ -15,10 +15,6 @@ | ||
15 | 15 | #include <openssl/x509v3.h> |
16 | 16 | #include "crypto/x509.h" |
17 | 17 | |
18 | -#ifndef OPENSSL_NO_RFC3779 | |
19 | -DEFINE_STACK_OF(IPAddressFamily) | |
20 | -#endif | |
21 | - | |
22 | 18 | ASN1_SEQUENCE_enc(X509_CINF, enc, 0) = { |
23 | 19 | ASN1_EXP_OPT(X509_CINF, version, ASN1_INTEGER, 0), |
24 | 20 | ASN1_EMBED(X509_CINF, serialNumber, ASN1_INTEGER), |
@@ -11,7 +11,7 @@ | ||
11 | 11 | */ |
12 | 12 | |
13 | 13 | {- |
14 | -use OpenSSL::stackhash qw(generate_stack_macros generate_const_stack_macros); | |
14 | +use OpenSSL::stackhash qw(generate_stack_macros); | |
15 | 15 | -} |
16 | 16 | |
17 | 17 | #ifndef OPENSSL_X509_H |
@@ -1,4 +1,6 @@ | ||
1 | 1 | /* |
2 | + * {- join("\n * ", @autowarntext) -} | |
3 | + * | |
2 | 4 | * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. |
3 | 5 | * |
4 | 6 | * Licensed under the Apache License 2.0 (the "License"). You may not use |
@@ -7,6 +9,10 @@ | ||
7 | 9 | * https://www.openssl.org/source/license.html |
8 | 10 | */ |
9 | 11 | |
12 | +{- | |
13 | +use OpenSSL::stackhash qw(generate_stack_macros); | |
14 | +-} | |
15 | + | |
10 | 16 | #ifndef OPENSSL_X509V3_H |
11 | 17 | # define OPENSSL_X509V3_H |
12 | 18 | # pragma once |
@@ -97,7 +103,9 @@ struct v3_ext_ctx { | ||
97 | 103 | |
98 | 104 | typedef struct v3_ext_method X509V3_EXT_METHOD; |
99 | 105 | |
100 | -DEFINE_OR_DECLARE_STACK_OF(X509V3_EXT_METHOD) | |
106 | +{- | |
107 | + generate_stack_macros("X509V3_EXT_METHOD"); | |
108 | +-} | |
101 | 109 | |
102 | 110 | /* ext_flags values */ |
103 | 111 | # define X509V3_EXT_DYNAMIC 0x1 |
@@ -163,15 +171,19 @@ typedef struct ACCESS_DESCRIPTION_st { | ||
163 | 171 | GENERAL_NAME *location; |
164 | 172 | } ACCESS_DESCRIPTION; |
165 | 173 | |
166 | -DEFINE_OR_DECLARE_STACK_OF(ACCESS_DESCRIPTION) | |
167 | -DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAME) | |
174 | +{- | |
175 | + generate_stack_macros("ACCESS_DESCRIPTION") | |
176 | + .generate_stack_macros("GENERAL_NAME"); | |
177 | +-} | |
168 | 178 | |
169 | 179 | typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS; |
170 | 180 | typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE; |
171 | 181 | typedef STACK_OF(ASN1_INTEGER) TLS_FEATURE; |
172 | 182 | typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES; |
173 | 183 | |
174 | -DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAMES) | |
184 | +{- | |
185 | + generate_stack_macros("GENERAL_NAMES"); | |
186 | +-} | |
175 | 187 | |
176 | 188 | typedef struct DIST_POINT_NAME_st { |
177 | 189 | int type; |
@@ -204,7 +216,9 @@ struct DIST_POINT_st { | ||
204 | 216 | int dp_reasons; |
205 | 217 | }; |
206 | 218 | |
207 | -DEFINE_OR_DECLARE_STACK_OF(DIST_POINT) | |
219 | +{- | |
220 | + generate_stack_macros("DIST_POINT"); | |
221 | +-} | |
208 | 222 | |
209 | 223 | typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS; |
210 | 224 |
@@ -221,7 +235,10 @@ typedef struct SXNET_ID_st { | ||
221 | 235 | ASN1_OCTET_STRING *user; |
222 | 236 | } SXNETID; |
223 | 237 | |
224 | -DEFINE_OR_DECLARE_STACK_OF(SXNETID) | |
238 | +{- | |
239 | + generate_stack_macros("SXNETID"); | |
240 | +-} | |
241 | + | |
225 | 242 | |
226 | 243 | typedef struct SXNET_st { |
227 | 244 | ASN1_INTEGER *version; |
@@ -254,14 +271,19 @@ typedef struct POLICYQUALINFO_st { | ||
254 | 271 | } d; |
255 | 272 | } POLICYQUALINFO; |
256 | 273 | |
257 | -DEFINE_OR_DECLARE_STACK_OF(POLICYQUALINFO) | |
274 | +{- | |
275 | + generate_stack_macros("POLICYQUALINFO"); | |
276 | +-} | |
277 | + | |
258 | 278 | |
259 | 279 | typedef struct POLICYINFO_st { |
260 | 280 | ASN1_OBJECT *policyid; |
261 | 281 | STACK_OF(POLICYQUALINFO) *qualifiers; |
262 | 282 | } POLICYINFO; |
263 | 283 | |
264 | -DEFINE_OR_DECLARE_STACK_OF(POLICYINFO) | |
284 | +{- | |
285 | + generate_stack_macros("POLICYINFO"); | |
286 | +-} | |
265 | 287 | |
266 | 288 | typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES; |
267 | 289 |
@@ -270,7 +292,9 @@ typedef struct POLICY_MAPPING_st { | ||
270 | 292 | ASN1_OBJECT *subjectDomainPolicy; |
271 | 293 | } POLICY_MAPPING; |
272 | 294 | |
273 | -DEFINE_OR_DECLARE_STACK_OF(POLICY_MAPPING) | |
295 | +{- | |
296 | + generate_stack_macros("POLICY_MAPPING"); | |
297 | +-} | |
274 | 298 | |
275 | 299 | typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS; |
276 | 300 |
@@ -280,7 +304,9 @@ typedef struct GENERAL_SUBTREE_st { | ||
280 | 304 | ASN1_INTEGER *maximum; |
281 | 305 | } GENERAL_SUBTREE; |
282 | 306 | |
283 | -DEFINE_OR_DECLARE_STACK_OF(GENERAL_SUBTREE) | |
307 | +{- | |
308 | + generate_stack_macros("GENERAL_SUBTREE"); | |
309 | +-} | |
284 | 310 | |
285 | 311 | struct NAME_CONSTRAINTS_st { |
286 | 312 | STACK_OF(GENERAL_SUBTREE) *permittedSubtrees; |
@@ -423,7 +449,10 @@ typedef struct x509_purpose_st { | ||
423 | 449 | void *usr_data; |
424 | 450 | } X509_PURPOSE; |
425 | 451 | |
426 | -DEFINE_OR_DECLARE_STACK_OF(X509_PURPOSE) | |
452 | +{- | |
453 | + generate_stack_macros("X509_PURPOSE"); | |
454 | +-} | |
455 | + | |
427 | 456 | |
428 | 457 | # define X509_PURPOSE_SSL_CLIENT 1 |
429 | 458 | # define X509_PURPOSE_SSL_SERVER 2 |
@@ -735,7 +764,10 @@ int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE) *dn_sk, | ||
735 | 764 | unsigned long chtype); |
736 | 765 | |
737 | 766 | void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent); |
738 | -DEFINE_OR_DECLARE_STACK_OF(X509_POLICY_NODE) | |
767 | +{- | |
768 | + generate_stack_macros("X509_POLICY_NODE"); | |
769 | +-} | |
770 | + | |
739 | 771 | |
740 | 772 | #ifndef OPENSSL_NO_RFC3779 |
741 | 773 | typedef struct ASRange_st { |
@@ -753,7 +785,9 @@ typedef struct ASIdOrRange_st { | ||
753 | 785 | } u; |
754 | 786 | } ASIdOrRange; |
755 | 787 | |
756 | -DEFINE_OR_DECLARE_STACK_OF(ASIdOrRange) | |
788 | +{- | |
789 | + generate_stack_macros("ASIdOrRange"); | |
790 | +-} | |
757 | 791 | |
758 | 792 | typedef STACK_OF(ASIdOrRange) ASIdOrRanges; |
759 | 793 |
@@ -792,7 +826,9 @@ typedef struct IPAddressOrRange_st { | ||
792 | 826 | } u; |
793 | 827 | } IPAddressOrRange; |
794 | 828 | |
795 | -DEFINE_OR_DECLARE_STACK_OF(IPAddressOrRange) | |
829 | +{- | |
830 | + generate_stack_macros("IPAddressOrRange"); | |
831 | +-} | |
796 | 832 | |
797 | 833 | typedef STACK_OF(IPAddressOrRange) IPAddressOrRanges; |
798 | 834 |
@@ -812,7 +848,10 @@ typedef struct IPAddressFamily_st { | ||
812 | 848 | IPAddressChoice *ipAddressChoice; |
813 | 849 | } IPAddressFamily; |
814 | 850 | |
815 | -DEFINE_OR_DECLARE_STACK_OF(IPAddressFamily) | |
851 | +{- | |
852 | + generate_stack_macros("IPAddressFamily"); | |
853 | +-} | |
854 | + | |
816 | 855 | |
817 | 856 | typedef STACK_OF(IPAddressFamily) IPAddrBlocks; |
818 | 857 |
@@ -886,7 +925,9 @@ int X509v3_addr_validate_resource_set(STACK_OF(X509) *chain, | ||
886 | 925 | |
887 | 926 | #endif /* OPENSSL_NO_RFC3779 */ |
888 | 927 | |
889 | -DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING) | |
928 | +{- | |
929 | + generate_stack_macros("ASN1_STRING"); | |
930 | +-} | |
890 | 931 | |
891 | 932 | /* |
892 | 933 | * Admission Syntax |
@@ -899,8 +940,10 @@ DECLARE_ASN1_FUNCTIONS(NAMING_AUTHORITY) | ||
899 | 940 | DECLARE_ASN1_FUNCTIONS(PROFESSION_INFO) |
900 | 941 | DECLARE_ASN1_FUNCTIONS(ADMISSIONS) |
901 | 942 | DECLARE_ASN1_FUNCTIONS(ADMISSION_SYNTAX) |
902 | -DEFINE_OR_DECLARE_STACK_OF(PROFESSION_INFO) | |
903 | -DEFINE_OR_DECLARE_STACK_OF(ADMISSIONS) | |
943 | +{- | |
944 | + generate_stack_macros("PROFESSION_INFO") | |
945 | + .generate_stack_macros("ADMISSIONS"); | |
946 | +-} | |
904 | 947 | typedef STACK_OF(PROFESSION_INFO) PROFESSION_INFOS; |
905 | 948 | |
906 | 949 | const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId( |
@@ -15,7 +15,6 @@ | ||
15 | 15 | |
16 | 16 | DEFINE_STACK_OF(ASN1_UTF8STRING) |
17 | 17 | DEFINE_STACK_OF(OSSL_CMP_ITAV) |
18 | -DEFINE_STACK_OF(POLICYINFO) | |
19 | 18 | |
20 | 19 | typedef struct test_fixture { |
21 | 20 | const char *test_case_name; |
@@ -19,8 +19,6 @@ | ||
19 | 19 | # define strcasecmp _stricmp |
20 | 20 | #endif |
21 | 21 | |
22 | -DEFINE_STACK_OF(GENERAL_NAME) | |
23 | - | |
24 | 22 | static const char *const names[] = { |
25 | 23 | "a", "b", ".", "*", "@", |
26 | 24 | ".a", "a.", ".b", "b.", ".*", "*.", "*@", "@*", "a@", "@a", "b@", "..", |