diff options
author | jsing <> | 2015-02-10 05:43:09 +0000 |
---|---|---|
committer | jsing <> | 2015-02-10 05:43:09 +0000 |
commit | 893f871bcdd3e19e2a9e5ce38182898ff50684a9 (patch) | |
tree | 252e1b3a1811f5247783160ad31b867fe39af0e4 /src/lib/libcrypto/x509v3 | |
parent | 2eecb536a9b8f1c8c2ea5f485be1748d475a131c (diff) | |
download | openbsd-893f871bcdd3e19e2a9e5ce38182898ff50684a9.tar.gz openbsd-893f871bcdd3e19e2a9e5ce38182898ff50684a9.tar.bz2 openbsd-893f871bcdd3e19e2a9e5ce38182898ff50684a9.zip |
Expand the IMPLEMENT_ASN1_ALLOC_FUNCTIONS macro so that the code is visible
and functions can be readily located.
Change has been scripted and the generated assembly only differs by changes
to line numbers.
Discussed with beck@ miod@ tedu@
Diffstat (limited to 'src/lib/libcrypto/x509v3')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_ncons.c | 28 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_pcons.c | 15 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_pmaps.c | 15 |
3 files changed, 51 insertions, 7 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_ncons.c b/src/lib/libcrypto/x509v3/v3_ncons.c index 7768dabb1f..7cb272a58f 100644 --- a/src/lib/libcrypto/x509v3/v3_ncons.c +++ b/src/lib/libcrypto/x509v3/v3_ncons.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_ncons.c,v 1.5 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: v3_ncons.c,v 1.6 2015/02/10 05:43:09 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project. | 3 | * project. |
4 | */ | 4 | */ |
@@ -103,8 +103,30 @@ ASN1_SEQUENCE(NAME_CONSTRAINTS) = { | |||
103 | } ASN1_SEQUENCE_END(NAME_CONSTRAINTS) | 103 | } ASN1_SEQUENCE_END(NAME_CONSTRAINTS) |
104 | 104 | ||
105 | 105 | ||
106 | IMPLEMENT_ASN1_ALLOC_FUNCTIONS(GENERAL_SUBTREE) | 106 | |
107 | IMPLEMENT_ASN1_ALLOC_FUNCTIONS(NAME_CONSTRAINTS) | 107 | GENERAL_SUBTREE * |
108 | GENERAL_SUBTREE_new(void) | ||
109 | { | ||
110 | return (GENERAL_SUBTREE*)ASN1_item_new(&GENERAL_SUBTREE_it); | ||
111 | } | ||
112 | |||
113 | void | ||
114 | GENERAL_SUBTREE_free(GENERAL_SUBTREE *a) | ||
115 | { | ||
116 | ASN1_item_free((ASN1_VALUE *)a, &GENERAL_SUBTREE_it); | ||
117 | } | ||
118 | |||
119 | NAME_CONSTRAINTS * | ||
120 | NAME_CONSTRAINTS_new(void) | ||
121 | { | ||
122 | return (NAME_CONSTRAINTS*)ASN1_item_new(&NAME_CONSTRAINTS_it); | ||
123 | } | ||
124 | |||
125 | void | ||
126 | NAME_CONSTRAINTS_free(NAME_CONSTRAINTS *a) | ||
127 | { | ||
128 | ASN1_item_free((ASN1_VALUE *)a, &NAME_CONSTRAINTS_it); | ||
129 | } | ||
108 | 130 | ||
109 | static void * | 131 | static void * |
110 | v2i_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | 132 | v2i_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, |
diff --git a/src/lib/libcrypto/x509v3/v3_pcons.c b/src/lib/libcrypto/x509v3/v3_pcons.c index 64e1f44b21..075efd8851 100644 --- a/src/lib/libcrypto/x509v3/v3_pcons.c +++ b/src/lib/libcrypto/x509v3/v3_pcons.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_pcons.c,v 1.5 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: v3_pcons.c,v 1.6 2015/02/10 05:43:09 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project. | 3 | * project. |
4 | */ | 4 | */ |
@@ -88,7 +88,18 @@ ASN1_SEQUENCE(POLICY_CONSTRAINTS) = { | |||
88 | ASN1_IMP_OPT(POLICY_CONSTRAINTS, inhibitPolicyMapping, ASN1_INTEGER, 1) | 88 | ASN1_IMP_OPT(POLICY_CONSTRAINTS, inhibitPolicyMapping, ASN1_INTEGER, 1) |
89 | } ASN1_SEQUENCE_END(POLICY_CONSTRAINTS) | 89 | } ASN1_SEQUENCE_END(POLICY_CONSTRAINTS) |
90 | 90 | ||
91 | IMPLEMENT_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS) | 91 | |
92 | POLICY_CONSTRAINTS * | ||
93 | POLICY_CONSTRAINTS_new(void) | ||
94 | { | ||
95 | return (POLICY_CONSTRAINTS*)ASN1_item_new(&POLICY_CONSTRAINTS_it); | ||
96 | } | ||
97 | |||
98 | void | ||
99 | POLICY_CONSTRAINTS_free(POLICY_CONSTRAINTS *a) | ||
100 | { | ||
101 | ASN1_item_free((ASN1_VALUE *)a, &POLICY_CONSTRAINTS_it); | ||
102 | } | ||
92 | 103 | ||
93 | static STACK_OF(CONF_VALUE) * | 104 | static STACK_OF(CONF_VALUE) * |
94 | i2v_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD *method, void *a, | 105 | i2v_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD *method, void *a, |
diff --git a/src/lib/libcrypto/x509v3/v3_pmaps.c b/src/lib/libcrypto/x509v3/v3_pmaps.c index 073d03973c..84c105892d 100644 --- a/src/lib/libcrypto/x509v3/v3_pmaps.c +++ b/src/lib/libcrypto/x509v3/v3_pmaps.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_pmaps.c,v 1.5 2014/10/05 18:30:13 miod Exp $ */ | 1 | /* $OpenBSD: v3_pmaps.c,v 1.6 2015/02/10 05:43:09 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project. | 3 | * project. |
4 | */ | 4 | */ |
@@ -90,7 +90,18 @@ ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, POLICY_MAPPINGS, | |||
90 | POLICY_MAPPING) | 90 | POLICY_MAPPING) |
91 | ASN1_ITEM_TEMPLATE_END(POLICY_MAPPINGS) | 91 | ASN1_ITEM_TEMPLATE_END(POLICY_MAPPINGS) |
92 | 92 | ||
93 | IMPLEMENT_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING) | 93 | |
94 | POLICY_MAPPING * | ||
95 | POLICY_MAPPING_new(void) | ||
96 | { | ||
97 | return (POLICY_MAPPING*)ASN1_item_new(&POLICY_MAPPING_it); | ||
98 | } | ||
99 | |||
100 | void | ||
101 | POLICY_MAPPING_free(POLICY_MAPPING *a) | ||
102 | { | ||
103 | ASN1_item_free((ASN1_VALUE *)a, &POLICY_MAPPING_it); | ||
104 | } | ||
94 | 105 | ||
95 | static STACK_OF(CONF_VALUE) * | 106 | static STACK_OF(CONF_VALUE) * |
96 | i2v_POLICY_MAPPINGS(const X509V3_EXT_METHOD *method, void *a, | 107 | i2v_POLICY_MAPPINGS(const X509V3_EXT_METHOD *method, void *a, |