1 /* c/zx-sa11-dec.c - WARNING: This file was auto generated by xsd2sg.pl. DO NOT EDIT!
2 * $Id$ */
3 /* Code generation design Copyright (c) 2006 Sampo Kellomaki (sampo@iki.fi),
4 * All Rights Reserved. NO WARRANTY. See file COPYING for terms and conditions
5 * of use. Some aspects of code generation were driven by schema
6 * descriptions that were used as input and may be subject to their own copyright.
7 * Code generation uses a template, whose copyright statement follows. */
8
9 /** dec-templ.c - XML decoder template, used in code generation
10 ** Copyright (c) 2010 Sampo Kellomaki (sampo@iki.fi), All Rights Reserved.
11 ** Copyright (c) 2006-2007 Symlabs (symlabs@symlabs.com), All Rights Reserved.
12 ** Author: Sampo Kellomaki (sampo@iki.fi)
13 ** This is confidential unpublished proprietary source code of the author.
14 ** NO WARRANTY, not even implied warranties. Contains trade secrets.
15 ** Distribution prohibited unless authorized in writing.
16 ** Licensed under Apache License 2.0, see file COPYING.
17 ** Id: dec-templ.c,v 1.30 2008-10-04 23:42:14 sampo Exp $
18 **
19 ** 28.5.2006, created, Sampo Kellomaki (sampo@iki.fi)
20 ** 8.8.2006, reworked namespace handling --Sampo
21 ** 12.8.2006, added special scanning of xmlns to avoid backtracking elem recognition --Sampo
22 ** 23.9.2006, added collection of WO information --Sampo
23 ** 21.6.2007, improved handling of undeclared namespace prefixes --Sampo
24 ** 27.10.2010, CSE refactoring, re-engineered namespace handling --Sampo
25 ** 21.11.2010, re-engineered to extract most code to zx_DEC_elem, leaving just switches --Sampo
26 **
27 ** N.B: This template is meant to be processed by pd/xsd2sg.pl. Beware
28 ** of special markers that xsd2sg.pl expects to find and understand.
29 **/
30
31 #include "errmac.h"
32 #include "zx.h"
33 #include "c/zx-const.h"
34 #include "c/zx-data.h"
35 #include "c/zx-sa11-data.h"
36 #define TPF zx_
37 #include "zx_ext_pt.h"
38
39
40
zx_DEC_ATTR_sa11_Action(struct zx_ctx * c,struct zx_sa11_Action_s * x)41 int zx_DEC_ATTR_sa11_Action(struct zx_ctx* c, struct zx_sa11_Action_s* x)
42 {
43 switch (x->gg.attr->g.tok) {
44 case zx_Namespace_ATTR: x->Namespace = x->gg.attr; return 1;
45
46 default: return 0;
47 }
48 }
49
zx_DEC_ELEM_sa11_Action(struct zx_ctx * c,struct zx_sa11_Action_s * x)50 int zx_DEC_ELEM_sa11_Action(struct zx_ctx* c, struct zx_sa11_Action_s* x)
51 {
52 struct zx_elem_s* el = x->gg.kids;
53 switch (el->g.tok) {
54
55 default: return 0;
56 }
57 }
58
59
60
61
zx_DEC_ATTR_sa11_Advice(struct zx_ctx * c,struct zx_sa11_Advice_s * x)62 int zx_DEC_ATTR_sa11_Advice(struct zx_ctx* c, struct zx_sa11_Advice_s* x)
63 {
64 switch (x->gg.attr->g.tok) {
65
66 default: return 0;
67 }
68 }
69
zx_DEC_ELEM_sa11_Advice(struct zx_ctx * c,struct zx_sa11_Advice_s * x)70 int zx_DEC_ELEM_sa11_Advice(struct zx_ctx* c, struct zx_sa11_Advice_s* x)
71 {
72 struct zx_elem_s* el = x->gg.kids;
73 switch (el->g.tok) {
74 case zx_sa11_AssertionIDReference_ELEM:
75 if (!x->AssertionIDReference)
76 x->AssertionIDReference = el;
77 return 1;
78 case zx_sa11_Assertion_ELEM:
79 if (!x->Assertion)
80 x->Assertion = (struct zx_sa11_Assertion_s*)el;
81 return 1;
82 case zx_ff12_Assertion_ELEM:
83 if (!x->ff12_Assertion)
84 x->ff12_Assertion = (struct zx_ff12_Assertion_s*)el;
85 return 1;
86 case zx_sa_Assertion_ELEM:
87 if (!x->sa_Assertion)
88 x->sa_Assertion = (struct zx_sa_Assertion_s*)el;
89 return 1;
90
91 default: return 0;
92 }
93 }
94
95
96
97
zx_DEC_ATTR_sa11_Assertion(struct zx_ctx * c,struct zx_sa11_Assertion_s * x)98 int zx_DEC_ATTR_sa11_Assertion(struct zx_ctx* c, struct zx_sa11_Assertion_s* x)
99 {
100 switch (x->gg.attr->g.tok) {
101 case zx_AssertionID_ATTR: x->AssertionID = x->gg.attr; return 1;
102 case zx_IssueInstant_ATTR: x->IssueInstant = x->gg.attr; return 1;
103 case zx_Issuer_ATTR: x->Issuer = x->gg.attr; return 1;
104 case zx_MajorVersion_ATTR: x->MajorVersion = x->gg.attr; return 1;
105 case zx_MinorVersion_ATTR: x->MinorVersion = x->gg.attr; return 1;
106
107 default: return 0;
108 }
109 }
110
zx_DEC_ELEM_sa11_Assertion(struct zx_ctx * c,struct zx_sa11_Assertion_s * x)111 int zx_DEC_ELEM_sa11_Assertion(struct zx_ctx* c, struct zx_sa11_Assertion_s* x)
112 {
113 struct zx_elem_s* el = x->gg.kids;
114 switch (el->g.tok) {
115 case zx_sa11_Conditions_ELEM:
116 if (!x->Conditions)
117 x->Conditions = (struct zx_sa11_Conditions_s*)el;
118 return 1;
119 case zx_sa11_Advice_ELEM:
120 if (!x->Advice)
121 x->Advice = (struct zx_sa11_Advice_s*)el;
122 return 1;
123 case zx_sa11_Statement_ELEM:
124 if (!x->Statement)
125 x->Statement = el;
126 return 1;
127 case zx_sa11_SubjectStatement_ELEM:
128 if (!x->SubjectStatement)
129 x->SubjectStatement = (struct zx_sa11_SubjectStatement_s*)el;
130 return 1;
131 case zx_sa11_AuthenticationStatement_ELEM:
132 if (!x->AuthenticationStatement)
133 x->AuthenticationStatement = (struct zx_sa11_AuthenticationStatement_s*)el;
134 return 1;
135 case zx_sa11_AuthorizationDecisionStatement_ELEM:
136 if (!x->AuthorizationDecisionStatement)
137 x->AuthorizationDecisionStatement = (struct zx_sa11_AuthorizationDecisionStatement_s*)el;
138 return 1;
139 case zx_sa11_AttributeStatement_ELEM:
140 if (!x->AttributeStatement)
141 x->AttributeStatement = (struct zx_sa11_AttributeStatement_s*)el;
142 return 1;
143 case zx_xasa_XACMLAuthzDecisionStatement_ELEM:
144 if (!x->XACMLAuthzDecisionStatement)
145 x->XACMLAuthzDecisionStatement = (struct zx_xasa_XACMLAuthzDecisionStatement_s*)el;
146 return 1;
147 case zx_xasa_XACMLPolicyStatement_ELEM:
148 if (!x->XACMLPolicyStatement)
149 x->XACMLPolicyStatement = (struct zx_xasa_XACMLPolicyStatement_s*)el;
150 return 1;
151 case zx_xasacd1_XACMLAuthzDecisionStatement_ELEM:
152 if (!x->xasacd1_XACMLAuthzDecisionStatement)
153 x->xasacd1_XACMLAuthzDecisionStatement = (struct zx_xasacd1_XACMLAuthzDecisionStatement_s*)el;
154 return 1;
155 case zx_xasacd1_XACMLPolicyStatement_ELEM:
156 if (!x->xasacd1_XACMLPolicyStatement)
157 x->xasacd1_XACMLPolicyStatement = (struct zx_xasacd1_XACMLPolicyStatement_s*)el;
158 return 1;
159 case zx_ds_Signature_ELEM:
160 if (!x->Signature)
161 x->Signature = (struct zx_ds_Signature_s*)el;
162 return 1;
163
164 default: return 0;
165 }
166 }
167
168
169
170
zx_DEC_ATTR_sa11_Attribute(struct zx_ctx * c,struct zx_sa11_Attribute_s * x)171 int zx_DEC_ATTR_sa11_Attribute(struct zx_ctx* c, struct zx_sa11_Attribute_s* x)
172 {
173 switch (x->gg.attr->g.tok) {
174 case zx_AttributeName_ATTR: x->AttributeName = x->gg.attr; return 1;
175 case zx_AttributeNamespace_ATTR: x->AttributeNamespace = x->gg.attr; return 1;
176
177 default: return 0;
178 }
179 }
180
zx_DEC_ELEM_sa11_Attribute(struct zx_ctx * c,struct zx_sa11_Attribute_s * x)181 int zx_DEC_ELEM_sa11_Attribute(struct zx_ctx* c, struct zx_sa11_Attribute_s* x)
182 {
183 struct zx_elem_s* el = x->gg.kids;
184 switch (el->g.tok) {
185 case zx_sa11_AttributeValue_ELEM:
186 if (!x->AttributeValue)
187 x->AttributeValue = (struct zx_sa11_AttributeValue_s*)el;
188 return 1;
189
190 default: return 0;
191 }
192 }
193
194
195
196
zx_DEC_ATTR_sa11_AttributeDesignator(struct zx_ctx * c,struct zx_sa11_AttributeDesignator_s * x)197 int zx_DEC_ATTR_sa11_AttributeDesignator(struct zx_ctx* c, struct zx_sa11_AttributeDesignator_s* x)
198 {
199 switch (x->gg.attr->g.tok) {
200 case zx_AttributeName_ATTR: x->AttributeName = x->gg.attr; return 1;
201 case zx_AttributeNamespace_ATTR: x->AttributeNamespace = x->gg.attr; return 1;
202
203 default: return 0;
204 }
205 }
206
zx_DEC_ELEM_sa11_AttributeDesignator(struct zx_ctx * c,struct zx_sa11_AttributeDesignator_s * x)207 int zx_DEC_ELEM_sa11_AttributeDesignator(struct zx_ctx* c, struct zx_sa11_AttributeDesignator_s* x)
208 {
209 struct zx_elem_s* el = x->gg.kids;
210 switch (el->g.tok) {
211
212 default: return 0;
213 }
214 }
215
216
217
218
zx_DEC_ATTR_sa11_AttributeStatement(struct zx_ctx * c,struct zx_sa11_AttributeStatement_s * x)219 int zx_DEC_ATTR_sa11_AttributeStatement(struct zx_ctx* c, struct zx_sa11_AttributeStatement_s* x)
220 {
221 switch (x->gg.attr->g.tok) {
222
223 default: return 0;
224 }
225 }
226
zx_DEC_ELEM_sa11_AttributeStatement(struct zx_ctx * c,struct zx_sa11_AttributeStatement_s * x)227 int zx_DEC_ELEM_sa11_AttributeStatement(struct zx_ctx* c, struct zx_sa11_AttributeStatement_s* x)
228 {
229 struct zx_elem_s* el = x->gg.kids;
230 switch (el->g.tok) {
231 case zx_sa11_Subject_ELEM:
232 if (!x->Subject)
233 x->Subject = (struct zx_sa11_Subject_s*)el;
234 return 1;
235 case zx_sa11_Attribute_ELEM:
236 if (!x->Attribute)
237 x->Attribute = (struct zx_sa11_Attribute_s*)el;
238 return 1;
239
240 default: return 0;
241 }
242 }
243
244
245
246
zx_DEC_ATTR_sa11_AttributeValue(struct zx_ctx * c,struct zx_sa11_AttributeValue_s * x)247 int zx_DEC_ATTR_sa11_AttributeValue(struct zx_ctx* c, struct zx_sa11_AttributeValue_s* x)
248 {
249 switch (x->gg.attr->g.tok) {
250
251 default: return 0;
252 }
253 }
254
zx_DEC_ELEM_sa11_AttributeValue(struct zx_ctx * c,struct zx_sa11_AttributeValue_s * x)255 int zx_DEC_ELEM_sa11_AttributeValue(struct zx_ctx* c, struct zx_sa11_AttributeValue_s* x)
256 {
257 struct zx_elem_s* el = x->gg.kids;
258 switch (el->g.tok) {
259 case zx_di12_ResourceOffering_ELEM:
260 if (!x->ResourceOffering)
261 x->ResourceOffering = (struct zx_di12_ResourceOffering_s*)el;
262 return 1;
263 case zx_a_EndpointReference_ELEM:
264 if (!x->EndpointReference)
265 x->EndpointReference = (struct zx_a_EndpointReference_s*)el;
266 return 1;
267
268 default: return 0;
269 }
270 }
271
272
273
274
zx_DEC_ATTR_sa11_AudienceRestrictionCondition(struct zx_ctx * c,struct zx_sa11_AudienceRestrictionCondition_s * x)275 int zx_DEC_ATTR_sa11_AudienceRestrictionCondition(struct zx_ctx* c, struct zx_sa11_AudienceRestrictionCondition_s* x)
276 {
277 switch (x->gg.attr->g.tok) {
278
279 default: return 0;
280 }
281 }
282
zx_DEC_ELEM_sa11_AudienceRestrictionCondition(struct zx_ctx * c,struct zx_sa11_AudienceRestrictionCondition_s * x)283 int zx_DEC_ELEM_sa11_AudienceRestrictionCondition(struct zx_ctx* c, struct zx_sa11_AudienceRestrictionCondition_s* x)
284 {
285 struct zx_elem_s* el = x->gg.kids;
286 switch (el->g.tok) {
287 case zx_sa11_Audience_ELEM:
288 if (!x->Audience)
289 x->Audience = el;
290 return 1;
291
292 default: return 0;
293 }
294 }
295
296
297
298
zx_DEC_ATTR_sa11_AuthenticationStatement(struct zx_ctx * c,struct zx_sa11_AuthenticationStatement_s * x)299 int zx_DEC_ATTR_sa11_AuthenticationStatement(struct zx_ctx* c, struct zx_sa11_AuthenticationStatement_s* x)
300 {
301 switch (x->gg.attr->g.tok) {
302 case zx_AuthenticationInstant_ATTR: x->AuthenticationInstant = x->gg.attr; return 1;
303 case zx_AuthenticationMethod_ATTR: x->AuthenticationMethod = x->gg.attr; return 1;
304
305 default: return 0;
306 }
307 }
308
zx_DEC_ELEM_sa11_AuthenticationStatement(struct zx_ctx * c,struct zx_sa11_AuthenticationStatement_s * x)309 int zx_DEC_ELEM_sa11_AuthenticationStatement(struct zx_ctx* c, struct zx_sa11_AuthenticationStatement_s* x)
310 {
311 struct zx_elem_s* el = x->gg.kids;
312 switch (el->g.tok) {
313 case zx_sa11_Subject_ELEM:
314 if (!x->Subject)
315 x->Subject = (struct zx_sa11_Subject_s*)el;
316 return 1;
317 case zx_sa11_SubjectLocality_ELEM:
318 if (!x->SubjectLocality)
319 x->SubjectLocality = (struct zx_sa11_SubjectLocality_s*)el;
320 return 1;
321 case zx_sa11_AuthorityBinding_ELEM:
322 if (!x->AuthorityBinding)
323 x->AuthorityBinding = (struct zx_sa11_AuthorityBinding_s*)el;
324 return 1;
325
326 default: return 0;
327 }
328 }
329
330
331
332
zx_DEC_ATTR_sa11_AuthorityBinding(struct zx_ctx * c,struct zx_sa11_AuthorityBinding_s * x)333 int zx_DEC_ATTR_sa11_AuthorityBinding(struct zx_ctx* c, struct zx_sa11_AuthorityBinding_s* x)
334 {
335 switch (x->gg.attr->g.tok) {
336 case zx_AuthorityKind_ATTR: x->AuthorityKind = x->gg.attr; return 1;
337 case zx_Binding_ATTR: x->Binding = x->gg.attr; return 1;
338 case zx_Location_ATTR: x->Location = x->gg.attr; return 1;
339
340 default: return 0;
341 }
342 }
343
zx_DEC_ELEM_sa11_AuthorityBinding(struct zx_ctx * c,struct zx_sa11_AuthorityBinding_s * x)344 int zx_DEC_ELEM_sa11_AuthorityBinding(struct zx_ctx* c, struct zx_sa11_AuthorityBinding_s* x)
345 {
346 struct zx_elem_s* el = x->gg.kids;
347 switch (el->g.tok) {
348
349 default: return 0;
350 }
351 }
352
353
354
355
zx_DEC_ATTR_sa11_AuthorizationDecisionStatement(struct zx_ctx * c,struct zx_sa11_AuthorizationDecisionStatement_s * x)356 int zx_DEC_ATTR_sa11_AuthorizationDecisionStatement(struct zx_ctx* c, struct zx_sa11_AuthorizationDecisionStatement_s* x)
357 {
358 switch (x->gg.attr->g.tok) {
359 case zx_Decision_ATTR: x->Decision = x->gg.attr; return 1;
360 case zx_Resource_ATTR: x->Resource = x->gg.attr; return 1;
361
362 default: return 0;
363 }
364 }
365
zx_DEC_ELEM_sa11_AuthorizationDecisionStatement(struct zx_ctx * c,struct zx_sa11_AuthorizationDecisionStatement_s * x)366 int zx_DEC_ELEM_sa11_AuthorizationDecisionStatement(struct zx_ctx* c, struct zx_sa11_AuthorizationDecisionStatement_s* x)
367 {
368 struct zx_elem_s* el = x->gg.kids;
369 switch (el->g.tok) {
370 case zx_sa11_Subject_ELEM:
371 if (!x->Subject)
372 x->Subject = (struct zx_sa11_Subject_s*)el;
373 return 1;
374 case zx_sa11_Action_ELEM:
375 if (!x->Action)
376 x->Action = (struct zx_sa11_Action_s*)el;
377 return 1;
378 case zx_sa11_Evidence_ELEM:
379 if (!x->Evidence)
380 x->Evidence = (struct zx_sa11_Evidence_s*)el;
381 return 1;
382
383 default: return 0;
384 }
385 }
386
387
388
389
zx_DEC_ATTR_sa11_Conditions(struct zx_ctx * c,struct zx_sa11_Conditions_s * x)390 int zx_DEC_ATTR_sa11_Conditions(struct zx_ctx* c, struct zx_sa11_Conditions_s* x)
391 {
392 switch (x->gg.attr->g.tok) {
393 case zx_NotBefore_ATTR: x->NotBefore = x->gg.attr; return 1;
394 case zx_NotOnOrAfter_ATTR: x->NotOnOrAfter = x->gg.attr; return 1;
395
396 default: return 0;
397 }
398 }
399
zx_DEC_ELEM_sa11_Conditions(struct zx_ctx * c,struct zx_sa11_Conditions_s * x)400 int zx_DEC_ELEM_sa11_Conditions(struct zx_ctx* c, struct zx_sa11_Conditions_s* x)
401 {
402 struct zx_elem_s* el = x->gg.kids;
403 switch (el->g.tok) {
404 case zx_sa11_AudienceRestrictionCondition_ELEM:
405 if (!x->AudienceRestrictionCondition)
406 x->AudienceRestrictionCondition = (struct zx_sa11_AudienceRestrictionCondition_s*)el;
407 return 1;
408 case zx_sa11_DoNotCacheCondition_ELEM:
409 if (!x->DoNotCacheCondition)
410 x->DoNotCacheCondition = (struct zx_sa11_DoNotCacheCondition_s*)el;
411 return 1;
412 case zx_sa11_Condition_ELEM:
413 if (!x->Condition)
414 x->Condition = el;
415 return 1;
416
417 default: return 0;
418 }
419 }
420
421
422
423
zx_DEC_ATTR_sa11_DoNotCacheCondition(struct zx_ctx * c,struct zx_sa11_DoNotCacheCondition_s * x)424 int zx_DEC_ATTR_sa11_DoNotCacheCondition(struct zx_ctx* c, struct zx_sa11_DoNotCacheCondition_s* x)
425 {
426 switch (x->gg.attr->g.tok) {
427
428 default: return 0;
429 }
430 }
431
zx_DEC_ELEM_sa11_DoNotCacheCondition(struct zx_ctx * c,struct zx_sa11_DoNotCacheCondition_s * x)432 int zx_DEC_ELEM_sa11_DoNotCacheCondition(struct zx_ctx* c, struct zx_sa11_DoNotCacheCondition_s* x)
433 {
434 struct zx_elem_s* el = x->gg.kids;
435 switch (el->g.tok) {
436
437 default: return 0;
438 }
439 }
440
441
442
443
zx_DEC_ATTR_sa11_Evidence(struct zx_ctx * c,struct zx_sa11_Evidence_s * x)444 int zx_DEC_ATTR_sa11_Evidence(struct zx_ctx* c, struct zx_sa11_Evidence_s* x)
445 {
446 switch (x->gg.attr->g.tok) {
447
448 default: return 0;
449 }
450 }
451
zx_DEC_ELEM_sa11_Evidence(struct zx_ctx * c,struct zx_sa11_Evidence_s * x)452 int zx_DEC_ELEM_sa11_Evidence(struct zx_ctx* c, struct zx_sa11_Evidence_s* x)
453 {
454 struct zx_elem_s* el = x->gg.kids;
455 switch (el->g.tok) {
456 case zx_sa11_AssertionIDReference_ELEM:
457 if (!x->AssertionIDReference)
458 x->AssertionIDReference = el;
459 return 1;
460 case zx_sa11_Assertion_ELEM:
461 if (!x->Assertion)
462 x->Assertion = (struct zx_sa11_Assertion_s*)el;
463 return 1;
464
465 default: return 0;
466 }
467 }
468
469
470
471
zx_DEC_ATTR_sa11_NameIdentifier(struct zx_ctx * c,struct zx_sa11_NameIdentifier_s * x)472 int zx_DEC_ATTR_sa11_NameIdentifier(struct zx_ctx* c, struct zx_sa11_NameIdentifier_s* x)
473 {
474 switch (x->gg.attr->g.tok) {
475 case zx_Format_ATTR: x->Format = x->gg.attr; return 1;
476 case zx_NameQualifier_ATTR: x->NameQualifier = x->gg.attr; return 1;
477
478 default: return 0;
479 }
480 }
481
zx_DEC_ELEM_sa11_NameIdentifier(struct zx_ctx * c,struct zx_sa11_NameIdentifier_s * x)482 int zx_DEC_ELEM_sa11_NameIdentifier(struct zx_ctx* c, struct zx_sa11_NameIdentifier_s* x)
483 {
484 struct zx_elem_s* el = x->gg.kids;
485 switch (el->g.tok) {
486
487 default: return 0;
488 }
489 }
490
491
492
493
zx_DEC_ATTR_sa11_Subject(struct zx_ctx * c,struct zx_sa11_Subject_s * x)494 int zx_DEC_ATTR_sa11_Subject(struct zx_ctx* c, struct zx_sa11_Subject_s* x)
495 {
496 switch (x->gg.attr->g.tok) {
497
498 default: return 0;
499 }
500 }
501
zx_DEC_ELEM_sa11_Subject(struct zx_ctx * c,struct zx_sa11_Subject_s * x)502 int zx_DEC_ELEM_sa11_Subject(struct zx_ctx* c, struct zx_sa11_Subject_s* x)
503 {
504 struct zx_elem_s* el = x->gg.kids;
505 switch (el->g.tok) {
506 case zx_sa11_NameIdentifier_ELEM:
507 if (!x->NameIdentifier)
508 x->NameIdentifier = (struct zx_sa11_NameIdentifier_s*)el;
509 return 1;
510 case zx_sa11_SubjectConfirmation_ELEM:
511 if (!x->SubjectConfirmation)
512 x->SubjectConfirmation = (struct zx_sa11_SubjectConfirmation_s*)el;
513 return 1;
514
515 default: return 0;
516 }
517 }
518
519
520
521
zx_DEC_ATTR_sa11_SubjectConfirmation(struct zx_ctx * c,struct zx_sa11_SubjectConfirmation_s * x)522 int zx_DEC_ATTR_sa11_SubjectConfirmation(struct zx_ctx* c, struct zx_sa11_SubjectConfirmation_s* x)
523 {
524 switch (x->gg.attr->g.tok) {
525
526 default: return 0;
527 }
528 }
529
zx_DEC_ELEM_sa11_SubjectConfirmation(struct zx_ctx * c,struct zx_sa11_SubjectConfirmation_s * x)530 int zx_DEC_ELEM_sa11_SubjectConfirmation(struct zx_ctx* c, struct zx_sa11_SubjectConfirmation_s* x)
531 {
532 struct zx_elem_s* el = x->gg.kids;
533 switch (el->g.tok) {
534 case zx_sa11_ConfirmationMethod_ELEM:
535 if (!x->ConfirmationMethod)
536 x->ConfirmationMethod = el;
537 return 1;
538 case zx_sa11_SubjectConfirmationData_ELEM:
539 if (!x->SubjectConfirmationData)
540 x->SubjectConfirmationData = el;
541 return 1;
542 case zx_ds_KeyInfo_ELEM:
543 if (!x->KeyInfo)
544 x->KeyInfo = (struct zx_ds_KeyInfo_s*)el;
545 return 1;
546
547 default: return 0;
548 }
549 }
550
551
552
553
zx_DEC_ATTR_sa11_SubjectLocality(struct zx_ctx * c,struct zx_sa11_SubjectLocality_s * x)554 int zx_DEC_ATTR_sa11_SubjectLocality(struct zx_ctx* c, struct zx_sa11_SubjectLocality_s* x)
555 {
556 switch (x->gg.attr->g.tok) {
557 case zx_DNSAddress_ATTR: x->DNSAddress = x->gg.attr; return 1;
558 case zx_IPAddress_ATTR: x->IPAddress = x->gg.attr; return 1;
559
560 default: return 0;
561 }
562 }
563
zx_DEC_ELEM_sa11_SubjectLocality(struct zx_ctx * c,struct zx_sa11_SubjectLocality_s * x)564 int zx_DEC_ELEM_sa11_SubjectLocality(struct zx_ctx* c, struct zx_sa11_SubjectLocality_s* x)
565 {
566 struct zx_elem_s* el = x->gg.kids;
567 switch (el->g.tok) {
568
569 default: return 0;
570 }
571 }
572
573
574
575
zx_DEC_ATTR_sa11_SubjectStatement(struct zx_ctx * c,struct zx_sa11_SubjectStatement_s * x)576 int zx_DEC_ATTR_sa11_SubjectStatement(struct zx_ctx* c, struct zx_sa11_SubjectStatement_s* x)
577 {
578 switch (x->gg.attr->g.tok) {
579
580 default: return 0;
581 }
582 }
583
zx_DEC_ELEM_sa11_SubjectStatement(struct zx_ctx * c,struct zx_sa11_SubjectStatement_s * x)584 int zx_DEC_ELEM_sa11_SubjectStatement(struct zx_ctx* c, struct zx_sa11_SubjectStatement_s* x)
585 {
586 struct zx_elem_s* el = x->gg.kids;
587 switch (el->g.tok) {
588 case zx_sa11_Subject_ELEM:
589 if (!x->Subject)
590 x->Subject = (struct zx_sa11_Subject_s*)el;
591 return 1;
592
593 default: return 0;
594 }
595 }
596
597
598 /* EOF -- c/zx-sa11-dec.c */
599