summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_asid.c
diff options
context:
space:
mode:
authorjsing <>2015-02-09 16:03:11 +0000
committerjsing <>2015-02-09 16:03:11 +0000
commite8979e4da17f6d268e647d4e22aed16dad9f0666 (patch)
tree450aac9231a21230a1a136407055b6264089d1b8 /src/lib/libcrypto/x509v3/v3_asid.c
parent15dc63f9715f4f10924a705d6a4cc564afe2129e (diff)
downloadopenbsd-e8979e4da17f6d268e647d4e22aed16dad9f0666.tar.gz
openbsd-e8979e4da17f6d268e647d4e22aed16dad9f0666.tar.bz2
openbsd-e8979e4da17f6d268e647d4e22aed16dad9f0666.zip
Expand the IMPLEMENT_ASN1_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/v3_asid.c')
-rw-r--r--src/lib/libcrypto/x509v3/v3_asid.c106
1 files changed, 101 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_asid.c b/src/lib/libcrypto/x509v3/v3_asid.c
index 680eed31ec..10f82c573d 100644
--- a/src/lib/libcrypto/x509v3/v3_asid.c
+++ b/src/lib/libcrypto/x509v3/v3_asid.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_asid.c,v 1.11 2014/07/13 16:03:10 beck Exp $ */ 1/* $OpenBSD: v3_asid.c,v 1.12 2015/02/09 16:03:11 jsing Exp $ */
2/* 2/*
3 * Contributed to the OpenSSL Project by the American Registry for 3 * Contributed to the OpenSSL Project by the American Registry for
4 * Internet Numbers ("ARIN"). 4 * Internet Numbers ("ARIN").
@@ -98,10 +98,106 @@ ASN1_SEQUENCE(ASIdentifiers) = {
98 ASN1_EXP_OPT(ASIdentifiers, rdi, ASIdentifierChoice, 1) 98 ASN1_EXP_OPT(ASIdentifiers, rdi, ASIdentifierChoice, 1)
99} ASN1_SEQUENCE_END(ASIdentifiers) 99} ASN1_SEQUENCE_END(ASIdentifiers)
100 100
101IMPLEMENT_ASN1_FUNCTIONS(ASRange) 101
102IMPLEMENT_ASN1_FUNCTIONS(ASIdOrRange) 102ASRange *
103IMPLEMENT_ASN1_FUNCTIONS(ASIdentifierChoice) 103d2i_ASRange(ASRange **a, const unsigned char **in, long len)
104IMPLEMENT_ASN1_FUNCTIONS(ASIdentifiers) 104{
105 return (ASRange *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
106 &ASRange_it);
107}
108
109int
110i2d_ASRange(ASRange *a, unsigned char **out)
111{
112 return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASRange_it);
113}
114
115ASRange *
116ASRange_new(void)
117{
118 return (ASRange *)ASN1_item_new(&ASRange_it);
119}
120
121void
122ASRange_free(ASRange *a)
123{
124 ASN1_item_free((ASN1_VALUE *)a, &ASRange_it);
125}
126
127ASIdOrRange *
128d2i_ASIdOrRange(ASIdOrRange **a, const unsigned char **in, long len)
129{
130 return (ASIdOrRange *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
131 &ASIdOrRange_it);
132}
133
134int
135i2d_ASIdOrRange(ASIdOrRange *a, unsigned char **out)
136{
137 return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASIdOrRange_it);
138}
139
140ASIdOrRange *
141ASIdOrRange_new(void)
142{
143 return (ASIdOrRange *)ASN1_item_new(&ASIdOrRange_it);
144}
145
146void
147ASIdOrRange_free(ASIdOrRange *a)
148{
149 ASN1_item_free((ASN1_VALUE *)a, &ASIdOrRange_it);
150}
151
152ASIdentifierChoice *
153d2i_ASIdentifierChoice(ASIdentifierChoice **a, const unsigned char **in, long len)
154{
155 return (ASIdentifierChoice *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
156 &ASIdentifierChoice_it);
157}
158
159int
160i2d_ASIdentifierChoice(ASIdentifierChoice *a, unsigned char **out)
161{
162 return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASIdentifierChoice_it);
163}
164
165ASIdentifierChoice *
166ASIdentifierChoice_new(void)
167{
168 return (ASIdentifierChoice *)ASN1_item_new(&ASIdentifierChoice_it);
169}
170
171void
172ASIdentifierChoice_free(ASIdentifierChoice *a)
173{
174 ASN1_item_free((ASN1_VALUE *)a, &ASIdentifierChoice_it);
175}
176
177ASIdentifiers *
178d2i_ASIdentifiers(ASIdentifiers **a, const unsigned char **in, long len)
179{
180 return (ASIdentifiers *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
181 &ASIdentifiers_it);
182}
183
184int
185i2d_ASIdentifiers(ASIdentifiers *a, unsigned char **out)
186{
187 return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASIdentifiers_it);
188}
189
190ASIdentifiers *
191ASIdentifiers_new(void)
192{
193 return (ASIdentifiers *)ASN1_item_new(&ASIdentifiers_it);
194}
195
196void
197ASIdentifiers_free(ASIdentifiers *a)
198{
199 ASN1_item_free((ASN1_VALUE *)a, &ASIdentifiers_it);
200}
105 201
106/* 202/*
107 * i2r method for an ASIdentifierChoice. 203 * i2r method for an ASIdentifierChoice.