diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2003-03-20 17:58:33 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2003-03-20 17:58:33 +0000 |
commit | ea3675b5b60789f87a998bad8aab0ca53b3af4ed (patch) | |
tree | e1adc7663800410999ed7cd0f16a6cf253e85ab1 /crypto | |
parent | c554155b58f5c0dda132048bb0a68a2d1a463d98 (diff) | |
download | openssl-ea3675b5b60789f87a998bad8aab0ca53b3af4ed.tar.gz |
New ASN1 macros to just implement and declare the new and free functions
and changes to mkdef.pl so it recognises them.
Use these in policyMappings extension.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/asn1.h | 12 | ||||
-rw-r--r-- | crypto/asn1/asn1t.h | 3 | ||||
-rw-r--r-- | crypto/x509v3/v3_pmaps.c | 2 | ||||
-rw-r--r-- | crypto/x509v3/x509v3.h | 1 |
4 files changed, 13 insertions, 5 deletions
diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h index 0eb97fa62e..19414444a5 100644 --- a/crypto/asn1/asn1.h +++ b/crypto/asn1/asn1.h @@ -264,14 +264,15 @@ typedef struct ASN1_VALUE_st ASN1_VALUE; #define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type) +#define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \ + DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, type) + #define DECLARE_ASN1_FUNCTIONS_name(type, name) \ - type *name##_new(void); \ - void name##_free(type *a); \ + DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name) #define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \ - type *name##_new(void); \ - void name##_free(type *a); \ + DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) #define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \ @@ -291,6 +292,9 @@ typedef struct ASN1_VALUE_st ASN1_VALUE; name *name##_new(void); \ void name##_free(name *a); +#define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ + type *name##_new(void); \ + void name##_free(type *a); /* The following macros and typedefs allow an ASN1_ITEM * to be embedded in a structure and referenced. Since diff --git a/crypto/asn1/asn1t.h b/crypto/asn1/asn1t.h index 479225bea0..c1a4bea8f1 100644 --- a/crypto/asn1/asn1t.h +++ b/crypto/asn1/asn1t.h @@ -775,6 +775,9 @@ typedef struct ASN1_AUX_st { #define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \ IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname) +#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \ + IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname) + #define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \ stname *fname##_new(void) \ { \ diff --git a/crypto/x509v3/v3_pmaps.c b/crypto/x509v3/v3_pmaps.c index 897640fc12..137be58ad9 100644 --- a/crypto/x509v3/v3_pmaps.c +++ b/crypto/x509v3/v3_pmaps.c @@ -89,7 +89,7 @@ ASN1_ITEM_TEMPLATE(POLICY_MAPPINGS) = POLICY_MAPPING) ASN1_ITEM_TEMPLATE_END(POLICY_MAPPINGS) -IMPLEMENT_ASN1_FUNCTIONS(POLICY_MAPPING) +IMPLEMENT_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING) static STACK_OF(CONF_VALUE) *i2v_POLICY_MAPPINGS(X509V3_EXT_METHOD *method, diff --git a/crypto/x509v3/x509v3.h b/crypto/x509v3/x509v3.h index fda50c95a0..2cbe1b9632 100644 --- a/crypto/x509v3/x509v3.h +++ b/crypto/x509v3/x509v3.h @@ -465,6 +465,7 @@ DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) DECLARE_ASN1_ITEM(POLICY_MAPPING) +DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING) DECLARE_ASN1_ITEM(POLICY_MAPPINGS) #ifdef HEADER_CONF_H |