1 /* c/zx-wst-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-wst-data.h"
36 #define TPF zx_
37 #include "zx_ext_pt.h"
38
39
40
zx_DEC_ATTR_wst_Authenticator(struct zx_ctx * c,struct zx_wst_Authenticator_s * x)41 int zx_DEC_ATTR_wst_Authenticator(struct zx_ctx* c, struct zx_wst_Authenticator_s* x)
42 {
43 switch (x->gg.attr->g.tok) {
44
45 default: return 0;
46 }
47 }
48
zx_DEC_ELEM_wst_Authenticator(struct zx_ctx * c,struct zx_wst_Authenticator_s * x)49 int zx_DEC_ELEM_wst_Authenticator(struct zx_ctx* c, struct zx_wst_Authenticator_s* x)
50 {
51 struct zx_elem_s* el = x->gg.kids;
52 switch (el->g.tok) {
53 case zx_wst_CombinedHash_ELEM:
54 if (!x->CombinedHash)
55 x->CombinedHash = el;
56 return 1;
57
58 default: return 0;
59 }
60 }
61
62
63
64
zx_DEC_ATTR_wst_BinaryExchange(struct zx_ctx * c,struct zx_wst_BinaryExchange_s * x)65 int zx_DEC_ATTR_wst_BinaryExchange(struct zx_ctx* c, struct zx_wst_BinaryExchange_s* x)
66 {
67 switch (x->gg.attr->g.tok) {
68 case zx_EncodingType_ATTR: x->EncodingType = x->gg.attr; return 1;
69 case zx_ValueType_ATTR: x->ValueType = x->gg.attr; return 1;
70
71 default: return 0;
72 }
73 }
74
zx_DEC_ELEM_wst_BinaryExchange(struct zx_ctx * c,struct zx_wst_BinaryExchange_s * x)75 int zx_DEC_ELEM_wst_BinaryExchange(struct zx_ctx* c, struct zx_wst_BinaryExchange_s* x)
76 {
77 struct zx_elem_s* el = x->gg.kids;
78 switch (el->g.tok) {
79
80 default: return 0;
81 }
82 }
83
84
85
86
zx_DEC_ATTR_wst_BinarySecret(struct zx_ctx * c,struct zx_wst_BinarySecret_s * x)87 int zx_DEC_ATTR_wst_BinarySecret(struct zx_ctx* c, struct zx_wst_BinarySecret_s* x)
88 {
89 switch (x->gg.attr->g.tok) {
90 case zx_Type_ATTR: x->Type = x->gg.attr; return 1;
91
92 default: return 0;
93 }
94 }
95
zx_DEC_ELEM_wst_BinarySecret(struct zx_ctx * c,struct zx_wst_BinarySecret_s * x)96 int zx_DEC_ELEM_wst_BinarySecret(struct zx_ctx* c, struct zx_wst_BinarySecret_s* x)
97 {
98 struct zx_elem_s* el = x->gg.kids;
99 switch (el->g.tok) {
100
101 default: return 0;
102 }
103 }
104
105
106
107
zx_DEC_ATTR_wst_CancelTarget(struct zx_ctx * c,struct zx_wst_CancelTarget_s * x)108 int zx_DEC_ATTR_wst_CancelTarget(struct zx_ctx* c, struct zx_wst_CancelTarget_s* x)
109 {
110 switch (x->gg.attr->g.tok) {
111
112 default: return 0;
113 }
114 }
115
zx_DEC_ELEM_wst_CancelTarget(struct zx_ctx * c,struct zx_wst_CancelTarget_s * x)116 int zx_DEC_ELEM_wst_CancelTarget(struct zx_ctx* c, struct zx_wst_CancelTarget_s* x)
117 {
118 struct zx_elem_s* el = x->gg.kids;
119 switch (el->g.tok) {
120
121 default: return 0;
122 }
123 }
124
125
126
127
zx_DEC_ATTR_wst_Claims(struct zx_ctx * c,struct zx_wst_Claims_s * x)128 int zx_DEC_ATTR_wst_Claims(struct zx_ctx* c, struct zx_wst_Claims_s* x)
129 {
130 switch (x->gg.attr->g.tok) {
131 case zx_Dialect_ATTR: x->Dialect = x->gg.attr; return 1;
132
133 default: return 0;
134 }
135 }
136
zx_DEC_ELEM_wst_Claims(struct zx_ctx * c,struct zx_wst_Claims_s * x)137 int zx_DEC_ELEM_wst_Claims(struct zx_ctx* c, struct zx_wst_Claims_s* x)
138 {
139 struct zx_elem_s* el = x->gg.kids;
140 switch (el->g.tok) {
141
142 default: return 0;
143 }
144 }
145
146
147
148
zx_DEC_ATTR_wst_DelegateTo(struct zx_ctx * c,struct zx_wst_DelegateTo_s * x)149 int zx_DEC_ATTR_wst_DelegateTo(struct zx_ctx* c, struct zx_wst_DelegateTo_s* x)
150 {
151 switch (x->gg.attr->g.tok) {
152
153 default: return 0;
154 }
155 }
156
zx_DEC_ELEM_wst_DelegateTo(struct zx_ctx * c,struct zx_wst_DelegateTo_s * x)157 int zx_DEC_ELEM_wst_DelegateTo(struct zx_ctx* c, struct zx_wst_DelegateTo_s* x)
158 {
159 struct zx_elem_s* el = x->gg.kids;
160 switch (el->g.tok) {
161
162 default: return 0;
163 }
164 }
165
166
167
168
zx_DEC_ATTR_wst_Encryption(struct zx_ctx * c,struct zx_wst_Encryption_s * x)169 int zx_DEC_ATTR_wst_Encryption(struct zx_ctx* c, struct zx_wst_Encryption_s* x)
170 {
171 switch (x->gg.attr->g.tok) {
172
173 default: return 0;
174 }
175 }
176
zx_DEC_ELEM_wst_Encryption(struct zx_ctx * c,struct zx_wst_Encryption_s * x)177 int zx_DEC_ELEM_wst_Encryption(struct zx_ctx* c, struct zx_wst_Encryption_s* x)
178 {
179 struct zx_elem_s* el = x->gg.kids;
180 switch (el->g.tok) {
181
182 default: return 0;
183 }
184 }
185
186
187
188
zx_DEC_ATTR_wst_Entropy(struct zx_ctx * c,struct zx_wst_Entropy_s * x)189 int zx_DEC_ATTR_wst_Entropy(struct zx_ctx* c, struct zx_wst_Entropy_s* x)
190 {
191 switch (x->gg.attr->g.tok) {
192
193 default: return 0;
194 }
195 }
196
zx_DEC_ELEM_wst_Entropy(struct zx_ctx * c,struct zx_wst_Entropy_s * x)197 int zx_DEC_ELEM_wst_Entropy(struct zx_ctx* c, struct zx_wst_Entropy_s* x)
198 {
199 struct zx_elem_s* el = x->gg.kids;
200 switch (el->g.tok) {
201
202 default: return 0;
203 }
204 }
205
206
207
208
zx_DEC_ATTR_wst_IssuedTokens(struct zx_ctx * c,struct zx_wst_IssuedTokens_s * x)209 int zx_DEC_ATTR_wst_IssuedTokens(struct zx_ctx* c, struct zx_wst_IssuedTokens_s* x)
210 {
211 switch (x->gg.attr->g.tok) {
212
213 default: return 0;
214 }
215 }
216
zx_DEC_ELEM_wst_IssuedTokens(struct zx_ctx * c,struct zx_wst_IssuedTokens_s * x)217 int zx_DEC_ELEM_wst_IssuedTokens(struct zx_ctx* c, struct zx_wst_IssuedTokens_s* x)
218 {
219 struct zx_elem_s* el = x->gg.kids;
220 switch (el->g.tok) {
221 case zx_wst_RequestSecurityTokenResponse_ELEM:
222 if (!x->RequestSecurityTokenResponse)
223 x->RequestSecurityTokenResponse = (struct zx_wst_RequestSecurityTokenResponse_s*)el;
224 return 1;
225
226 default: return 0;
227 }
228 }
229
230
231
232
zx_DEC_ATTR_wst_Issuer(struct zx_ctx * c,struct zx_wst_Issuer_s * x)233 int zx_DEC_ATTR_wst_Issuer(struct zx_ctx* c, struct zx_wst_Issuer_s* x)
234 {
235 switch (x->gg.attr->g.tok) {
236 case zx_ID_ATTR: x->ID = x->gg.attr; return 1;
237 case zx_id_ATTR: x->id = x->gg.attr; return 1;
238 case zx_notOnOrAfter_ATTR: x->notOnOrAfter = x->gg.attr; return 1;
239 case zx_Id_ATTR|zx_wsu_NS: x->Id = x->gg.attr; return 1;
240 case zx_actor_ATTR|zx_e_NS: x->actor = x->gg.attr; return 1;
241 case zx_mustUnderstand_ATTR|zx_e_NS: x->mustUnderstand = x->gg.attr; return 1;
242
243 default: return 0;
244 }
245 }
246
zx_DEC_ELEM_wst_Issuer(struct zx_ctx * c,struct zx_wst_Issuer_s * x)247 int zx_DEC_ELEM_wst_Issuer(struct zx_ctx* c, struct zx_wst_Issuer_s* x)
248 {
249 struct zx_elem_s* el = x->gg.kids;
250 switch (el->g.tok) {
251 case zx_a_Address_ELEM:
252 if (!x->Address)
253 x->Address = (struct zx_a_Address_s*)el;
254 return 1;
255 case zx_a_ReferenceParameters_ELEM:
256 if (!x->ReferenceParameters)
257 x->ReferenceParameters = (struct zx_a_ReferenceParameters_s*)el;
258 return 1;
259 case zx_a_Metadata_ELEM:
260 if (!x->Metadata)
261 x->Metadata = (struct zx_a_Metadata_s*)el;
262 return 1;
263 case zx_tas3_AltAddress_ELEM:
264 if (!x->AltAddress)
265 x->AltAddress = el;
266 return 1;
267
268 default: return 0;
269 }
270 }
271
272
273
274
zx_DEC_ATTR_wst_KeyExchangeToken(struct zx_ctx * c,struct zx_wst_KeyExchangeToken_s * x)275 int zx_DEC_ATTR_wst_KeyExchangeToken(struct zx_ctx* c, struct zx_wst_KeyExchangeToken_s* x)
276 {
277 switch (x->gg.attr->g.tok) {
278
279 default: return 0;
280 }
281 }
282
zx_DEC_ELEM_wst_KeyExchangeToken(struct zx_ctx * c,struct zx_wst_KeyExchangeToken_s * x)283 int zx_DEC_ELEM_wst_KeyExchangeToken(struct zx_ctx* c, struct zx_wst_KeyExchangeToken_s* x)
284 {
285 struct zx_elem_s* el = x->gg.kids;
286 switch (el->g.tok) {
287
288 default: return 0;
289 }
290 }
291
292
293
294
zx_DEC_ATTR_wst_Lifetime(struct zx_ctx * c,struct zx_wst_Lifetime_s * x)295 int zx_DEC_ATTR_wst_Lifetime(struct zx_ctx* c, struct zx_wst_Lifetime_s* x)
296 {
297 switch (x->gg.attr->g.tok) {
298
299 default: return 0;
300 }
301 }
302
zx_DEC_ELEM_wst_Lifetime(struct zx_ctx * c,struct zx_wst_Lifetime_s * x)303 int zx_DEC_ELEM_wst_Lifetime(struct zx_ctx* c, struct zx_wst_Lifetime_s* x)
304 {
305 struct zx_elem_s* el = x->gg.kids;
306 switch (el->g.tok) {
307 case zx_wsu_Created_ELEM:
308 if (!x->Created)
309 x->Created = (struct zx_wsu_Created_s*)el;
310 return 1;
311 case zx_wsu_Expires_ELEM:
312 if (!x->Expires)
313 x->Expires = (struct zx_wsu_Expires_s*)el;
314 return 1;
315
316 default: return 0;
317 }
318 }
319
320
321
322
zx_DEC_ATTR_wst_OnBehalfOf(struct zx_ctx * c,struct zx_wst_OnBehalfOf_s * x)323 int zx_DEC_ATTR_wst_OnBehalfOf(struct zx_ctx* c, struct zx_wst_OnBehalfOf_s* x)
324 {
325 switch (x->gg.attr->g.tok) {
326
327 default: return 0;
328 }
329 }
330
zx_DEC_ELEM_wst_OnBehalfOf(struct zx_ctx * c,struct zx_wst_OnBehalfOf_s * x)331 int zx_DEC_ELEM_wst_OnBehalfOf(struct zx_ctx* c, struct zx_wst_OnBehalfOf_s* x)
332 {
333 struct zx_elem_s* el = x->gg.kids;
334 switch (el->g.tok) {
335
336 default: return 0;
337 }
338 }
339
340
341
342
zx_DEC_ATTR_wst_Participant(struct zx_ctx * c,struct zx_wst_Participant_s * x)343 int zx_DEC_ATTR_wst_Participant(struct zx_ctx* c, struct zx_wst_Participant_s* x)
344 {
345 switch (x->gg.attr->g.tok) {
346
347 default: return 0;
348 }
349 }
350
zx_DEC_ELEM_wst_Participant(struct zx_ctx * c,struct zx_wst_Participant_s * x)351 int zx_DEC_ELEM_wst_Participant(struct zx_ctx* c, struct zx_wst_Participant_s* x)
352 {
353 struct zx_elem_s* el = x->gg.kids;
354 switch (el->g.tok) {
355
356 default: return 0;
357 }
358 }
359
360
361
362
zx_DEC_ATTR_wst_Participants(struct zx_ctx * c,struct zx_wst_Participants_s * x)363 int zx_DEC_ATTR_wst_Participants(struct zx_ctx* c, struct zx_wst_Participants_s* x)
364 {
365 switch (x->gg.attr->g.tok) {
366
367 default: return 0;
368 }
369 }
370
zx_DEC_ELEM_wst_Participants(struct zx_ctx * c,struct zx_wst_Participants_s * x)371 int zx_DEC_ELEM_wst_Participants(struct zx_ctx* c, struct zx_wst_Participants_s* x)
372 {
373 struct zx_elem_s* el = x->gg.kids;
374 switch (el->g.tok) {
375 case zx_wst_Primary_ELEM:
376 if (!x->Primary)
377 x->Primary = (struct zx_wst_Primary_s*)el;
378 return 1;
379 case zx_wst_Participant_ELEM:
380 if (!x->Participant)
381 x->Participant = (struct zx_wst_Participant_s*)el;
382 return 1;
383
384 default: return 0;
385 }
386 }
387
388
389
390
zx_DEC_ATTR_wst_Primary(struct zx_ctx * c,struct zx_wst_Primary_s * x)391 int zx_DEC_ATTR_wst_Primary(struct zx_ctx* c, struct zx_wst_Primary_s* x)
392 {
393 switch (x->gg.attr->g.tok) {
394
395 default: return 0;
396 }
397 }
398
zx_DEC_ELEM_wst_Primary(struct zx_ctx * c,struct zx_wst_Primary_s * x)399 int zx_DEC_ELEM_wst_Primary(struct zx_ctx* c, struct zx_wst_Primary_s* x)
400 {
401 struct zx_elem_s* el = x->gg.kids;
402 switch (el->g.tok) {
403
404 default: return 0;
405 }
406 }
407
408
409
410
zx_DEC_ATTR_wst_ProofEncryption(struct zx_ctx * c,struct zx_wst_ProofEncryption_s * x)411 int zx_DEC_ATTR_wst_ProofEncryption(struct zx_ctx* c, struct zx_wst_ProofEncryption_s* x)
412 {
413 switch (x->gg.attr->g.tok) {
414
415 default: return 0;
416 }
417 }
418
zx_DEC_ELEM_wst_ProofEncryption(struct zx_ctx * c,struct zx_wst_ProofEncryption_s * x)419 int zx_DEC_ELEM_wst_ProofEncryption(struct zx_ctx* c, struct zx_wst_ProofEncryption_s* x)
420 {
421 struct zx_elem_s* el = x->gg.kids;
422 switch (el->g.tok) {
423
424 default: return 0;
425 }
426 }
427
428
429
430
zx_DEC_ATTR_wst_RenewTarget(struct zx_ctx * c,struct zx_wst_RenewTarget_s * x)431 int zx_DEC_ATTR_wst_RenewTarget(struct zx_ctx* c, struct zx_wst_RenewTarget_s* x)
432 {
433 switch (x->gg.attr->g.tok) {
434
435 default: return 0;
436 }
437 }
438
zx_DEC_ELEM_wst_RenewTarget(struct zx_ctx * c,struct zx_wst_RenewTarget_s * x)439 int zx_DEC_ELEM_wst_RenewTarget(struct zx_ctx* c, struct zx_wst_RenewTarget_s* x)
440 {
441 struct zx_elem_s* el = x->gg.kids;
442 switch (el->g.tok) {
443
444 default: return 0;
445 }
446 }
447
448
449
450
zx_DEC_ATTR_wst_Renewing(struct zx_ctx * c,struct zx_wst_Renewing_s * x)451 int zx_DEC_ATTR_wst_Renewing(struct zx_ctx* c, struct zx_wst_Renewing_s* x)
452 {
453 switch (x->gg.attr->g.tok) {
454 case zx_Allow_ATTR: x->Allow = x->gg.attr; return 1;
455 case zx_OK_ATTR: x->OK = x->gg.attr; return 1;
456
457 default: return 0;
458 }
459 }
460
zx_DEC_ELEM_wst_Renewing(struct zx_ctx * c,struct zx_wst_Renewing_s * x)461 int zx_DEC_ELEM_wst_Renewing(struct zx_ctx* c, struct zx_wst_Renewing_s* x)
462 {
463 struct zx_elem_s* el = x->gg.kids;
464 switch (el->g.tok) {
465
466 default: return 0;
467 }
468 }
469
470
471
472
zx_DEC_ATTR_wst_RequestSecurityToken(struct zx_ctx * c,struct zx_wst_RequestSecurityToken_s * x)473 int zx_DEC_ATTR_wst_RequestSecurityToken(struct zx_ctx* c, struct zx_wst_RequestSecurityToken_s* x)
474 {
475 switch (x->gg.attr->g.tok) {
476 case zx_Context_ATTR: x->Context = x->gg.attr; return 1;
477
478 default: return 0;
479 }
480 }
481
zx_DEC_ELEM_wst_RequestSecurityToken(struct zx_ctx * c,struct zx_wst_RequestSecurityToken_s * x)482 int zx_DEC_ELEM_wst_RequestSecurityToken(struct zx_ctx* c, struct zx_wst_RequestSecurityToken_s* x)
483 {
484 struct zx_elem_s* el = x->gg.kids;
485 switch (el->g.tok) {
486 case zx_wst_TokenType_ELEM:
487 if (!x->TokenType)
488 x->TokenType = el;
489 return 1;
490 case zx_wst_RequestType_ELEM:
491 if (!x->RequestType)
492 x->RequestType = el;
493 return 1;
494 case zx_wsp_AppliesTo_ELEM:
495 if (!x->AppliesTo)
496 x->AppliesTo = (struct zx_wsp_AppliesTo_s*)el;
497 return 1;
498 case zx_wst_Claims_ELEM:
499 if (!x->Claims)
500 x->Claims = (struct zx_wst_Claims_s*)el;
501 return 1;
502 case zx_wst_Entropy_ELEM:
503 if (!x->Entropy)
504 x->Entropy = (struct zx_wst_Entropy_s*)el;
505 return 1;
506 case zx_wst_Lifetime_ELEM:
507 if (!x->Lifetime)
508 x->Lifetime = (struct zx_wst_Lifetime_s*)el;
509 return 1;
510 case zx_wst_AllowPostdating_ELEM:
511 if (!x->AllowPostdating)
512 x->AllowPostdating = el;
513 return 1;
514 case zx_wst_Renewing_ELEM:
515 if (!x->Renewing)
516 x->Renewing = (struct zx_wst_Renewing_s*)el;
517 return 1;
518 case zx_wst_OnBehalfOf_ELEM:
519 if (!x->OnBehalfOf)
520 x->OnBehalfOf = (struct zx_wst_OnBehalfOf_s*)el;
521 return 1;
522 case zx_wst_Issuer_ELEM:
523 if (!x->Issuer)
524 x->Issuer = (struct zx_wst_Issuer_s*)el;
525 return 1;
526 case zx_wst_AuthenticationType_ELEM:
527 if (!x->AuthenticationType)
528 x->AuthenticationType = el;
529 return 1;
530 case zx_wst_KeyType_ELEM:
531 if (!x->KeyType)
532 x->KeyType = el;
533 return 1;
534 case zx_wst_KeySize_ELEM:
535 if (!x->KeySize)
536 x->KeySize = el;
537 return 1;
538 case zx_wst_SignatureAlgorithm_ELEM:
539 if (!x->SignatureAlgorithm)
540 x->SignatureAlgorithm = el;
541 return 1;
542 case zx_wst_Encryption_ELEM:
543 if (!x->Encryption)
544 x->Encryption = (struct zx_wst_Encryption_s*)el;
545 return 1;
546 case zx_wst_EncryptionAlgorithm_ELEM:
547 if (!x->EncryptionAlgorithm)
548 x->EncryptionAlgorithm = el;
549 return 1;
550 case zx_wst_CanonicalizationAlgorithm_ELEM:
551 if (!x->CanonicalizationAlgorithm)
552 x->CanonicalizationAlgorithm = el;
553 return 1;
554 case zx_wst_ProofEncryption_ELEM:
555 if (!x->ProofEncryption)
556 x->ProofEncryption = (struct zx_wst_ProofEncryption_s*)el;
557 return 1;
558 case zx_wst_UseKey_ELEM:
559 if (!x->UseKey)
560 x->UseKey = (struct zx_wst_UseKey_s*)el;
561 return 1;
562 case zx_wst_SignWith_ELEM:
563 if (!x->SignWith)
564 x->SignWith = el;
565 return 1;
566 case zx_wst_EncryptWith_ELEM:
567 if (!x->EncryptWith)
568 x->EncryptWith = el;
569 return 1;
570 case zx_wst_DelegateTo_ELEM:
571 if (!x->DelegateTo)
572 x->DelegateTo = (struct zx_wst_DelegateTo_s*)el;
573 return 1;
574 case zx_wst_Forwardable_ELEM:
575 if (!x->Forwardable)
576 x->Forwardable = el;
577 return 1;
578 case zx_wst_Delegatable_ELEM:
579 if (!x->Delegatable)
580 x->Delegatable = el;
581 return 1;
582 case zx_wsp_Policy_ELEM:
583 if (!x->Policy)
584 x->Policy = (struct zx_wsp_Policy_s*)el;
585 return 1;
586 case zx_wsp_PolicyReference_ELEM:
587 if (!x->PolicyReference)
588 x->PolicyReference = (struct zx_wsp_PolicyReference_s*)el;
589 return 1;
590
591 default: return 0;
592 }
593 }
594
595
596
597
zx_DEC_ATTR_wst_RequestSecurityTokenCollection(struct zx_ctx * c,struct zx_wst_RequestSecurityTokenCollection_s * x)598 int zx_DEC_ATTR_wst_RequestSecurityTokenCollection(struct zx_ctx* c, struct zx_wst_RequestSecurityTokenCollection_s* x)
599 {
600 switch (x->gg.attr->g.tok) {
601
602 default: return 0;
603 }
604 }
605
zx_DEC_ELEM_wst_RequestSecurityTokenCollection(struct zx_ctx * c,struct zx_wst_RequestSecurityTokenCollection_s * x)606 int zx_DEC_ELEM_wst_RequestSecurityTokenCollection(struct zx_ctx* c, struct zx_wst_RequestSecurityTokenCollection_s* x)
607 {
608 struct zx_elem_s* el = x->gg.kids;
609 switch (el->g.tok) {
610 case zx_wst_RequestSecurityToken_ELEM:
611 if (!x->RequestSecurityToken)
612 x->RequestSecurityToken = (struct zx_wst_RequestSecurityToken_s*)el;
613 return 1;
614
615 default: return 0;
616 }
617 }
618
619
620
621
zx_DEC_ATTR_wst_RequestSecurityTokenResponse(struct zx_ctx * c,struct zx_wst_RequestSecurityTokenResponse_s * x)622 int zx_DEC_ATTR_wst_RequestSecurityTokenResponse(struct zx_ctx* c, struct zx_wst_RequestSecurityTokenResponse_s* x)
623 {
624 switch (x->gg.attr->g.tok) {
625 case zx_Context_ATTR: x->Context = x->gg.attr; return 1;
626
627 default: return 0;
628 }
629 }
630
zx_DEC_ELEM_wst_RequestSecurityTokenResponse(struct zx_ctx * c,struct zx_wst_RequestSecurityTokenResponse_s * x)631 int zx_DEC_ELEM_wst_RequestSecurityTokenResponse(struct zx_ctx* c, struct zx_wst_RequestSecurityTokenResponse_s* x)
632 {
633 struct zx_elem_s* el = x->gg.kids;
634 switch (el->g.tok) {
635 case zx_wst_TokenType_ELEM:
636 if (!x->TokenType)
637 x->TokenType = el;
638 return 1;
639 case zx_wst_RequestType_ELEM:
640 if (!x->RequestType)
641 x->RequestType = el;
642 return 1;
643 case zx_wst_RequestedSecurityToken_ELEM:
644 if (!x->RequestedSecurityToken)
645 x->RequestedSecurityToken = (struct zx_wst_RequestedSecurityToken_s*)el;
646 return 1;
647 case zx_wsp_AppliesTo_ELEM:
648 if (!x->AppliesTo)
649 x->AppliesTo = (struct zx_wsp_AppliesTo_s*)el;
650 return 1;
651 case zx_wst_RequestedAttachedReference_ELEM:
652 if (!x->RequestedAttachedReference)
653 x->RequestedAttachedReference = (struct zx_wst_RequestedAttachedReference_s*)el;
654 return 1;
655 case zx_wst_RequestedUnattachedReference_ELEM:
656 if (!x->RequestedUnattachedReference)
657 x->RequestedUnattachedReference = (struct zx_wst_RequestedUnattachedReference_s*)el;
658 return 1;
659 case zx_wst_RequestedProofToken_ELEM:
660 if (!x->RequestedProofToken)
661 x->RequestedProofToken = (struct zx_wst_RequestedProofToken_s*)el;
662 return 1;
663 case zx_wst_Entropy_ELEM:
664 if (!x->Entropy)
665 x->Entropy = (struct zx_wst_Entropy_s*)el;
666 return 1;
667 case zx_wst_Lifetime_ELEM:
668 if (!x->Lifetime)
669 x->Lifetime = (struct zx_wst_Lifetime_s*)el;
670 return 1;
671 case zx_wst_Status_ELEM:
672 if (!x->Status)
673 x->Status = (struct zx_wst_Status_s*)el;
674 return 1;
675 case zx_wst_AllowPostdating_ELEM:
676 if (!x->AllowPostdating)
677 x->AllowPostdating = el;
678 return 1;
679 case zx_wst_Renewing_ELEM:
680 if (!x->Renewing)
681 x->Renewing = (struct zx_wst_Renewing_s*)el;
682 return 1;
683 case zx_wst_OnBehalfOf_ELEM:
684 if (!x->OnBehalfOf)
685 x->OnBehalfOf = (struct zx_wst_OnBehalfOf_s*)el;
686 return 1;
687 case zx_wst_Issuer_ELEM:
688 if (!x->Issuer)
689 x->Issuer = (struct zx_wst_Issuer_s*)el;
690 return 1;
691 case zx_wst_AuthenticationType_ELEM:
692 if (!x->AuthenticationType)
693 x->AuthenticationType = el;
694 return 1;
695 case zx_wst_Authenticator_ELEM:
696 if (!x->Authenticator)
697 x->Authenticator = (struct zx_wst_Authenticator_s*)el;
698 return 1;
699 case zx_wst_KeyType_ELEM:
700 if (!x->KeyType)
701 x->KeyType = el;
702 return 1;
703 case zx_wst_KeySize_ELEM:
704 if (!x->KeySize)
705 x->KeySize = el;
706 return 1;
707 case zx_wst_SignatureAlgorithm_ELEM:
708 if (!x->SignatureAlgorithm)
709 x->SignatureAlgorithm = el;
710 return 1;
711 case zx_wst_Encryption_ELEM:
712 if (!x->Encryption)
713 x->Encryption = (struct zx_wst_Encryption_s*)el;
714 return 1;
715 case zx_wst_EncryptionAlgorithm_ELEM:
716 if (!x->EncryptionAlgorithm)
717 x->EncryptionAlgorithm = el;
718 return 1;
719 case zx_wst_CanonicalizationAlgorithm_ELEM:
720 if (!x->CanonicalizationAlgorithm)
721 x->CanonicalizationAlgorithm = el;
722 return 1;
723 case zx_wst_ProofEncryption_ELEM:
724 if (!x->ProofEncryption)
725 x->ProofEncryption = (struct zx_wst_ProofEncryption_s*)el;
726 return 1;
727 case zx_wst_UseKey_ELEM:
728 if (!x->UseKey)
729 x->UseKey = (struct zx_wst_UseKey_s*)el;
730 return 1;
731 case zx_wst_SignWith_ELEM:
732 if (!x->SignWith)
733 x->SignWith = el;
734 return 1;
735 case zx_wst_EncryptWith_ELEM:
736 if (!x->EncryptWith)
737 x->EncryptWith = el;
738 return 1;
739 case zx_wst_DelegateTo_ELEM:
740 if (!x->DelegateTo)
741 x->DelegateTo = (struct zx_wst_DelegateTo_s*)el;
742 return 1;
743 case zx_wst_Forwardable_ELEM:
744 if (!x->Forwardable)
745 x->Forwardable = el;
746 return 1;
747 case zx_wst_Delegatable_ELEM:
748 if (!x->Delegatable)
749 x->Delegatable = el;
750 return 1;
751 case zx_wsp_Policy_ELEM:
752 if (!x->Policy)
753 x->Policy = (struct zx_wsp_Policy_s*)el;
754 return 1;
755 case zx_wsp_PolicyReference_ELEM:
756 if (!x->PolicyReference)
757 x->PolicyReference = (struct zx_wsp_PolicyReference_s*)el;
758 return 1;
759
760 default: return 0;
761 }
762 }
763
764
765
766
zx_DEC_ATTR_wst_RequestSecurityTokenResponseCollection(struct zx_ctx * c,struct zx_wst_RequestSecurityTokenResponseCollection_s * x)767 int zx_DEC_ATTR_wst_RequestSecurityTokenResponseCollection(struct zx_ctx* c, struct zx_wst_RequestSecurityTokenResponseCollection_s* x)
768 {
769 switch (x->gg.attr->g.tok) {
770
771 default: return 0;
772 }
773 }
774
zx_DEC_ELEM_wst_RequestSecurityTokenResponseCollection(struct zx_ctx * c,struct zx_wst_RequestSecurityTokenResponseCollection_s * x)775 int zx_DEC_ELEM_wst_RequestSecurityTokenResponseCollection(struct zx_ctx* c, struct zx_wst_RequestSecurityTokenResponseCollection_s* x)
776 {
777 struct zx_elem_s* el = x->gg.kids;
778 switch (el->g.tok) {
779 case zx_wst_RequestSecurityTokenResponse_ELEM:
780 if (!x->RequestSecurityTokenResponse)
781 x->RequestSecurityTokenResponse = (struct zx_wst_RequestSecurityTokenResponse_s*)el;
782 return 1;
783
784 default: return 0;
785 }
786 }
787
788
789
790
zx_DEC_ATTR_wst_RequestedAttachedReference(struct zx_ctx * c,struct zx_wst_RequestedAttachedReference_s * x)791 int zx_DEC_ATTR_wst_RequestedAttachedReference(struct zx_ctx* c, struct zx_wst_RequestedAttachedReference_s* x)
792 {
793 switch (x->gg.attr->g.tok) {
794
795 default: return 0;
796 }
797 }
798
zx_DEC_ELEM_wst_RequestedAttachedReference(struct zx_ctx * c,struct zx_wst_RequestedAttachedReference_s * x)799 int zx_DEC_ELEM_wst_RequestedAttachedReference(struct zx_ctx* c, struct zx_wst_RequestedAttachedReference_s* x)
800 {
801 struct zx_elem_s* el = x->gg.kids;
802 switch (el->g.tok) {
803 case zx_wsse_SecurityTokenReference_ELEM:
804 if (!x->SecurityTokenReference)
805 x->SecurityTokenReference = (struct zx_wsse_SecurityTokenReference_s*)el;
806 return 1;
807
808 default: return 0;
809 }
810 }
811
812
813
814
zx_DEC_ATTR_wst_RequestedProofToken(struct zx_ctx * c,struct zx_wst_RequestedProofToken_s * x)815 int zx_DEC_ATTR_wst_RequestedProofToken(struct zx_ctx* c, struct zx_wst_RequestedProofToken_s* x)
816 {
817 switch (x->gg.attr->g.tok) {
818
819 default: return 0;
820 }
821 }
822
zx_DEC_ELEM_wst_RequestedProofToken(struct zx_ctx * c,struct zx_wst_RequestedProofToken_s * x)823 int zx_DEC_ELEM_wst_RequestedProofToken(struct zx_ctx* c, struct zx_wst_RequestedProofToken_s* x)
824 {
825 struct zx_elem_s* el = x->gg.kids;
826 switch (el->g.tok) {
827
828 default: return 0;
829 }
830 }
831
832
833
834
zx_DEC_ATTR_wst_RequestedSecurityToken(struct zx_ctx * c,struct zx_wst_RequestedSecurityToken_s * x)835 int zx_DEC_ATTR_wst_RequestedSecurityToken(struct zx_ctx* c, struct zx_wst_RequestedSecurityToken_s* x)
836 {
837 switch (x->gg.attr->g.tok) {
838
839 default: return 0;
840 }
841 }
842
zx_DEC_ELEM_wst_RequestedSecurityToken(struct zx_ctx * c,struct zx_wst_RequestedSecurityToken_s * x)843 int zx_DEC_ELEM_wst_RequestedSecurityToken(struct zx_ctx* c, struct zx_wst_RequestedSecurityToken_s* x)
844 {
845 struct zx_elem_s* el = x->gg.kids;
846 switch (el->g.tok) {
847
848 default: return 0;
849 }
850 }
851
852
853
854
zx_DEC_ATTR_wst_RequestedUnattachedReference(struct zx_ctx * c,struct zx_wst_RequestedUnattachedReference_s * x)855 int zx_DEC_ATTR_wst_RequestedUnattachedReference(struct zx_ctx* c, struct zx_wst_RequestedUnattachedReference_s* x)
856 {
857 switch (x->gg.attr->g.tok) {
858
859 default: return 0;
860 }
861 }
862
zx_DEC_ELEM_wst_RequestedUnattachedReference(struct zx_ctx * c,struct zx_wst_RequestedUnattachedReference_s * x)863 int zx_DEC_ELEM_wst_RequestedUnattachedReference(struct zx_ctx* c, struct zx_wst_RequestedUnattachedReference_s* x)
864 {
865 struct zx_elem_s* el = x->gg.kids;
866 switch (el->g.tok) {
867 case zx_wsse_SecurityTokenReference_ELEM:
868 if (!x->SecurityTokenReference)
869 x->SecurityTokenReference = (struct zx_wsse_SecurityTokenReference_s*)el;
870 return 1;
871
872 default: return 0;
873 }
874 }
875
876
877
878
zx_DEC_ATTR_wst_SignChallenge(struct zx_ctx * c,struct zx_wst_SignChallenge_s * x)879 int zx_DEC_ATTR_wst_SignChallenge(struct zx_ctx* c, struct zx_wst_SignChallenge_s* x)
880 {
881 switch (x->gg.attr->g.tok) {
882
883 default: return 0;
884 }
885 }
886
zx_DEC_ELEM_wst_SignChallenge(struct zx_ctx * c,struct zx_wst_SignChallenge_s * x)887 int zx_DEC_ELEM_wst_SignChallenge(struct zx_ctx* c, struct zx_wst_SignChallenge_s* x)
888 {
889 struct zx_elem_s* el = x->gg.kids;
890 switch (el->g.tok) {
891 case zx_wst_Challenge_ELEM:
892 if (!x->Challenge)
893 x->Challenge = el;
894 return 1;
895
896 default: return 0;
897 }
898 }
899
900
901
902
zx_DEC_ATTR_wst_SignChallengeResponse(struct zx_ctx * c,struct zx_wst_SignChallengeResponse_s * x)903 int zx_DEC_ATTR_wst_SignChallengeResponse(struct zx_ctx* c, struct zx_wst_SignChallengeResponse_s* x)
904 {
905 switch (x->gg.attr->g.tok) {
906
907 default: return 0;
908 }
909 }
910
zx_DEC_ELEM_wst_SignChallengeResponse(struct zx_ctx * c,struct zx_wst_SignChallengeResponse_s * x)911 int zx_DEC_ELEM_wst_SignChallengeResponse(struct zx_ctx* c, struct zx_wst_SignChallengeResponse_s* x)
912 {
913 struct zx_elem_s* el = x->gg.kids;
914 switch (el->g.tok) {
915 case zx_wst_Challenge_ELEM:
916 if (!x->Challenge)
917 x->Challenge = el;
918 return 1;
919
920 default: return 0;
921 }
922 }
923
924
925
926
zx_DEC_ATTR_wst_Status(struct zx_ctx * c,struct zx_wst_Status_s * x)927 int zx_DEC_ATTR_wst_Status(struct zx_ctx* c, struct zx_wst_Status_s* x)
928 {
929 switch (x->gg.attr->g.tok) {
930
931 default: return 0;
932 }
933 }
934
zx_DEC_ELEM_wst_Status(struct zx_ctx * c,struct zx_wst_Status_s * x)935 int zx_DEC_ELEM_wst_Status(struct zx_ctx* c, struct zx_wst_Status_s* x)
936 {
937 struct zx_elem_s* el = x->gg.kids;
938 switch (el->g.tok) {
939 case zx_wst_Code_ELEM:
940 if (!x->Code)
941 x->Code = el;
942 return 1;
943 case zx_wst_Reason_ELEM:
944 if (!x->Reason)
945 x->Reason = el;
946 return 1;
947
948 default: return 0;
949 }
950 }
951
952
953
954
zx_DEC_ATTR_wst_UseKey(struct zx_ctx * c,struct zx_wst_UseKey_s * x)955 int zx_DEC_ATTR_wst_UseKey(struct zx_ctx* c, struct zx_wst_UseKey_s* x)
956 {
957 switch (x->gg.attr->g.tok) {
958 case zx_Sig_ATTR: x->Sig = x->gg.attr; return 1;
959
960 default: return 0;
961 }
962 }
963
zx_DEC_ELEM_wst_UseKey(struct zx_ctx * c,struct zx_wst_UseKey_s * x)964 int zx_DEC_ELEM_wst_UseKey(struct zx_ctx* c, struct zx_wst_UseKey_s* x)
965 {
966 struct zx_elem_s* el = x->gg.kids;
967 switch (el->g.tok) {
968
969 default: return 0;
970 }
971 }
972
973
974
975
zx_DEC_ATTR_wst_ValidateTarget(struct zx_ctx * c,struct zx_wst_ValidateTarget_s * x)976 int zx_DEC_ATTR_wst_ValidateTarget(struct zx_ctx* c, struct zx_wst_ValidateTarget_s* x)
977 {
978 switch (x->gg.attr->g.tok) {
979
980 default: return 0;
981 }
982 }
983
zx_DEC_ELEM_wst_ValidateTarget(struct zx_ctx * c,struct zx_wst_ValidateTarget_s * x)984 int zx_DEC_ELEM_wst_ValidateTarget(struct zx_ctx* c, struct zx_wst_ValidateTarget_s* x)
985 {
986 struct zx_elem_s* el = x->gg.kids;
987 switch (el->g.tok) {
988
989 default: return 0;
990 }
991 }
992
993
994 /* EOF -- c/zx-wst-dec.c */
995