Change license header, remove stale pkg files.
[shibboleth/cpp-opensaml.git] / saml / saml1 / core / impl / AssertionsImpl.cpp
1 /**
2  * Licensed to the University Corporation for Advanced Internet
3  * Development, Inc. (UCAID) under one or more contributor license
4  * agreements. See the NOTICE file distributed with this work for
5  * additional information regarding copyright ownership.
6  *
7  * UCAID licenses this file to you under the Apache License,
8  * Version 2.0 (the "License"); you may not use this file except
9  * in compliance with the License. You may obtain a copy of the
10  * License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17  * either express or implied. See the License for the specific
18  * language governing permissions and limitations under the License.
19  */
20
21 /**
22  * AssertionsImpl.cpp
23  *
24  * Implementation classes for SAML 1.x Assertions schema.
25  */
26
27 #include "internal.h"
28 #include "exceptions.h"
29 #include "saml1/core/Assertions.h"
30 #include "signature/ContentReference.h"
31
32 #include <xmltooling/AbstractComplexElement.h>
33 #include <xmltooling/AbstractSimpleElement.h>
34 #include <xmltooling/impl/AnyElement.h>
35 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
36 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
37 #include <xmltooling/signature/KeyInfo.h>
38 #include <xmltooling/signature/Signature.h>
39 #include <xmltooling/util/DateTime.h>
40 #include <xmltooling/util/XMLHelper.h>
41
42 #include <ctime>
43 #include <limits.h>
44 #include <xercesc/util/XMLUniDefs.hpp>
45
46 using namespace opensaml::saml1;
47 using namespace xmlsignature;
48 using namespace xmltooling;
49 using namespace std;
50 using xmlconstants::XMLSIG_NS;
51 using xmlconstants::XML_ONE;
52 using samlconstants::SAML1_NS;
53
54 #if defined (_MSC_VER)
55     #pragma warning( push )
56     #pragma warning( disable : 4250 4251 )
57 #endif
58
59 namespace opensaml {
60     namespace saml1 {
61
62         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
63         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
64         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
65
66         class SAML_DLLLOCAL ConditionImpl : public virtual Condition, public AnyElementImpl
67         {
68         public:
69             virtual ~ConditionImpl() {}
70
71             ConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
72                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
73             }
74
75             ConditionImpl(const ConditionImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
76
77             IMPL_XMLOBJECT_CLONE(Condition);
78         };
79
80         class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
81             public AbstractComplexElement,
82             public AbstractDOMCachingXMLObject,
83             public AbstractXMLObjectMarshaller,
84             public AbstractXMLObjectUnmarshaller
85         {
86         public:
87             virtual ~AudienceRestrictionConditionImpl() {}
88
89             AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
90                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
91             }
92
93             AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
94                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
95                 VectorOf(Audience) v=getAudiences();
96                 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
97                     if (*i) {
98                         v.push_back((*i)->cloneAudience());
99                     }
100                 }
101             }
102
103             IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
104             Condition* cloneCondition() const {
105                 return cloneAudienceRestrictionCondition();
106             }
107             IMPL_TYPED_CHILDREN(Audience,m_children.end());
108
109         protected:
110             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
111                 PROC_TYPED_CHILDREN(Audience,SAML1_NS,false);
112                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
113             }
114         };
115
116         class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
117             public AbstractSimpleElement,
118             public AbstractDOMCachingXMLObject,
119             public AbstractXMLObjectMarshaller,
120             public AbstractXMLObjectUnmarshaller
121         {
122         public:
123             virtual ~DoNotCacheConditionImpl() {}
124
125             DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
126                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
127             }
128
129             DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src)
130                 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
131             }
132
133             IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
134             Condition* cloneCondition() const {
135                 return cloneDoNotCacheCondition();
136             }
137         };
138
139         class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
140             public AbstractComplexElement,
141             public AbstractDOMCachingXMLObject,
142             public AbstractXMLObjectMarshaller,
143             public AbstractXMLObjectUnmarshaller
144         {
145         public:
146             virtual ~ConditionsImpl() {
147                 delete m_NotBefore;
148                 delete m_NotOnOrAfter;
149             }
150
151             ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
152                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
153                 init();
154             }
155
156             ConditionsImpl(const ConditionsImpl& src)
157                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
158                 init();
159                 setNotBefore(src.getNotBefore());
160                 setNotOnOrAfter(src.getNotOnOrAfter());
161
162                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
163                     if (*i) {
164                         AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
165                         if (arc) {
166                             getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
167                             continue;
168                         }
169
170                         DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
171                         if (dncc) {
172                             getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
173                             continue;
174                         }
175
176                         Condition* c=dynamic_cast<Condition*>(*i);
177                         if (c) {
178                             getConditions().push_back(c->cloneCondition());
179                             continue;
180                         }
181                     }
182                 }
183             }
184
185             void init() {
186                 m_NotBefore=m_NotOnOrAfter=nullptr;
187             }
188
189             IMPL_XMLOBJECT_CLONE(Conditions);
190             IMPL_DATETIME_ATTRIB(NotBefore,0);
191             IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
192             IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
193             IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
194             IMPL_TYPED_CHILDREN(Condition,m_children.end());
195
196         protected:
197             void marshallAttributes(DOMElement* domElement) const {
198                 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,nullptr);
199                 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
200             }
201
202             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
203                 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAML1_NS,true);
204                 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAML1_NS,true);
205                 PROC_TYPED_CHILDREN(Condition,SAML1_NS,true);
206                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
207             }
208
209             void processAttribute(const DOMAttr* attribute) {
210                 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,nullptr);
211                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
212             }
213         };
214
215         class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
216             public AbstractSimpleElement,
217             public AbstractDOMCachingXMLObject,
218             public AbstractXMLObjectMarshaller,
219             public AbstractXMLObjectUnmarshaller
220         {
221         public:
222             virtual ~NameIdentifierImpl() {
223                 XMLString::release(&m_Format);
224                 XMLString::release(&m_NameQualifier);
225             }
226
227             NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
228                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
229                 init();
230             }
231
232             NameIdentifierImpl(const NameIdentifierImpl& src)
233                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
234                 init();
235                 setFormat(src.getFormat());
236                 setNameQualifier(src.getNameQualifier());
237             }
238
239             void init() {
240                 m_Format=m_NameQualifier=nullptr;
241             }
242
243             IMPL_XMLOBJECT_CLONE(NameIdentifier);
244             IMPL_STRING_ATTRIB(Format);
245             IMPL_STRING_ATTRIB(NameQualifier);
246
247         protected:
248             void marshallAttributes(DOMElement* domElement) const {
249                 MARSHALL_STRING_ATTRIB(Format,FORMAT,nullptr);
250                 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,nullptr);
251             }
252
253             void processAttribute(const DOMAttr* attribute) {
254                 PROC_STRING_ATTRIB(Format,FORMAT,nullptr);
255                 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,nullptr);
256             }
257         };
258
259         class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
260         {
261         public:
262             virtual ~SubjectConfirmationDataImpl() {}
263
264             SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
265                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
266             }
267
268             SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {
269             }
270
271             IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
272         };
273
274         class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
275             public AbstractComplexElement,
276             public AbstractDOMCachingXMLObject,
277             public AbstractXMLObjectMarshaller,
278             public AbstractXMLObjectUnmarshaller
279         {
280         public:
281             virtual ~SubjectConfirmationImpl() {}
282
283             SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
284                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
285                 init();
286             }
287
288             SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
289                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
290                 init();
291                 if (src.getSubjectConfirmationData())
292                     setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
293                 if (src.getKeyInfo())
294                     setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
295                 VectorOf(ConfirmationMethod) v=getConfirmationMethods();
296                 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
297                     if (*i) {
298                         v.push_back((*i)->cloneConfirmationMethod());
299                     }
300                 }
301             }
302
303             void init() {
304                 m_SubjectConfirmationData=nullptr;
305                 m_KeyInfo=nullptr;
306                 m_children.push_back(nullptr);
307                 m_children.push_back(nullptr);
308                 m_pos_SubjectConfirmationData=m_children.begin();
309                 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
310                 ++m_pos_KeyInfo;
311             }
312
313             IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
314             IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
315             IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
316             IMPL_TYPED_CHILD(KeyInfo);
317
318         protected:
319             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
320                 PROC_TYPED_CHILDREN(ConfirmationMethod,SAML1_NS,false);
321                 PROC_TYPED_CHILD(KeyInfo,XMLSIG_NS,false);
322
323                 // Anything else we'll assume is the data.
324                 if (getSubjectConfirmationData())
325                     throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
326                 setSubjectConfirmationData(childXMLObject);
327             }
328         };
329
330         class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
331             public AbstractComplexElement,
332             public AbstractDOMCachingXMLObject,
333             public AbstractXMLObjectMarshaller,
334             public AbstractXMLObjectUnmarshaller
335         {
336         public:
337             virtual ~SubjectImpl() {}
338
339             SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
340                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
341                 init();
342             }
343
344             SubjectImpl(const SubjectImpl& src)
345                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
346                 init();
347                 if (src.getNameIdentifier())
348                     setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
349                 if (src.getSubjectConfirmation())
350                     setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
351             }
352
353             void init() {
354                 m_NameIdentifier=nullptr;
355                 m_SubjectConfirmation=nullptr;
356                 m_children.push_back(nullptr);
357                 m_children.push_back(nullptr);
358                 m_pos_NameIdentifier=m_children.begin();
359                 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
360                 ++m_pos_SubjectConfirmation;
361             }
362
363             IMPL_XMLOBJECT_CLONE(Subject);
364             IMPL_TYPED_CHILD(NameIdentifier);
365             IMPL_TYPED_CHILD(SubjectConfirmation);
366
367         protected:
368             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
369                 PROC_TYPED_CHILD(NameIdentifier,SAML1_NS,true);
370                 PROC_TYPED_CHILD(SubjectConfirmation,SAML1_NS,true);
371                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
372             }
373         };
374
375         class SAML_DLLLOCAL StatementImpl : public virtual Statement, public AnyElementImpl
376         {
377         public:
378             virtual ~StatementImpl() {}
379
380             StatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
381                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
382             }
383
384             StatementImpl(const StatementImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
385
386             IMPL_XMLOBJECT_CLONE(Statement);
387         };
388
389         class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
390             public AbstractComplexElement,
391             public AbstractDOMCachingXMLObject,
392             public AbstractXMLObjectMarshaller,
393             public AbstractXMLObjectUnmarshaller
394         {
395             void init() {
396                 m_Subject=nullptr;
397                 m_children.push_back(nullptr);
398                 m_pos_Subject=m_children.begin();
399             }
400         protected:
401             SubjectStatementImpl() {
402                 init();
403             }
404         public:
405             virtual ~SubjectStatementImpl() {}
406
407             SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
408                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
409                 init();
410             }
411
412             SubjectStatementImpl(const SubjectStatementImpl& src)
413                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
414                 init();
415                 if (src.getSubject())
416                     setSubject(src.getSubject()->cloneSubject());
417             }
418
419             IMPL_TYPED_CHILD(Subject);
420
421         protected:
422             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
423                 PROC_TYPED_CHILD(Subject,SAML1_NS,true);
424                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
425             }
426         };
427
428         class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
429             public AbstractSimpleElement,
430             public AbstractDOMCachingXMLObject,
431             public AbstractXMLObjectMarshaller,
432             public AbstractXMLObjectUnmarshaller
433         {
434         public:
435             virtual ~SubjectLocalityImpl() {
436                 XMLString::release(&m_IPAddress);
437                 XMLString::release(&m_DNSAddress);
438             }
439
440             SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
441                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
442                 init();
443             }
444
445             SubjectLocalityImpl(const SubjectLocalityImpl& src)
446                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
447                 init();
448                 setIPAddress(src.getIPAddress());
449                 setDNSAddress(src.getDNSAddress());
450             }
451
452             void init() {
453                 m_IPAddress=m_DNSAddress=nullptr;
454             }
455
456             IMPL_XMLOBJECT_CLONE(SubjectLocality);
457             IMPL_STRING_ATTRIB(IPAddress);
458             IMPL_STRING_ATTRIB(DNSAddress);
459
460         protected:
461             void marshallAttributes(DOMElement* domElement) const {
462                 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,nullptr);
463                 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,nullptr);
464             }
465
466             void processAttribute(const DOMAttr* attribute) {
467                 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,nullptr);
468                 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,nullptr);
469             }
470         };
471
472         class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
473             public AbstractSimpleElement,
474             public AbstractDOMCachingXMLObject,
475             public AbstractXMLObjectMarshaller,
476             public AbstractXMLObjectUnmarshaller
477         {
478         public:
479             virtual ~AuthorityBindingImpl() {
480                 delete m_AuthorityKind;
481                 XMLString::release(&m_Location);
482                 XMLString::release(&m_Binding);
483             }
484
485             AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
486                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
487                 init();
488             }
489
490             AuthorityBindingImpl(const AuthorityBindingImpl& src)
491                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
492                 init();
493                 setAuthorityKind(src.getAuthorityKind());
494                 setLocation(src.getLocation());
495                 setBinding(src.getBinding());
496             }
497
498             void init() {
499                 m_AuthorityKind=nullptr;
500                 m_Location=m_Binding=nullptr;
501             }
502
503             IMPL_XMLOBJECT_CLONE(AuthorityBinding);
504             IMPL_XMLOBJECT_ATTRIB(AuthorityKind,xmltooling::QName);
505             IMPL_STRING_ATTRIB(Location);
506             IMPL_STRING_ATTRIB(Binding);
507
508         protected:
509             void marshallAttributes(DOMElement* domElement) const {
510                 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,nullptr);
511                 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
512                 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
513             }
514
515             void processAttribute(const DOMAttr* attribute) {
516                 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,nullptr);
517                 PROC_STRING_ATTRIB(Location,LOCATION,nullptr);
518                 PROC_STRING_ATTRIB(Binding,BINDING,nullptr);
519             }
520         };
521
522         class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
523         {
524         public:
525             virtual ~AuthenticationStatementImpl() {
526                 XMLString::release(&m_AuthenticationMethod);
527                 delete m_AuthenticationInstant;
528             }
529
530             AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
531                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
532                 init();
533             }
534
535             AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
536                 init();
537                 setAuthenticationMethod(src.getAuthenticationMethod());
538                 setAuthenticationInstant(src.getAuthenticationInstant());
539                 if (src.getSubjectLocality())
540                     setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
541                 VectorOf(AuthorityBinding) v=getAuthorityBindings();
542                 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
543                     if (*i) {
544                         v.push_back((*i)->cloneAuthorityBinding());
545                     }
546                 }
547             }
548
549             void init() {
550                 m_AuthenticationMethod=nullptr;
551                 m_AuthenticationInstant=nullptr;
552                 m_SubjectLocality=nullptr;
553                 m_children.push_back(nullptr);
554                 m_pos_SubjectLocality=m_pos_Subject;
555                 ++m_pos_SubjectLocality;
556             }
557
558             IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
559             SubjectStatement* cloneSubjectStatement() const {
560                 return cloneAuthenticationStatement();
561             }
562             Statement* cloneStatement() const {
563                 return cloneAuthenticationStatement();
564             }
565             IMPL_STRING_ATTRIB(AuthenticationMethod);
566             IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
567             IMPL_TYPED_CHILD(SubjectLocality);
568             IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
569
570         protected:
571             void marshallAttributes(DOMElement* domElement) const {
572                 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,nullptr);
573                 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,nullptr);
574                 SubjectStatementImpl::marshallAttributes(domElement);
575             }
576
577             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
578                 PROC_TYPED_CHILD(SubjectLocality,SAML1_NS,false);
579                 PROC_TYPED_CHILDREN(AuthorityBinding,SAML1_NS,false);
580                 SubjectStatementImpl::processChildElement(childXMLObject,root);
581             }
582
583             void processAttribute(const DOMAttr* attribute) {
584                 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,nullptr);
585                 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,nullptr);
586                 SubjectStatementImpl::processAttribute(attribute);
587             }
588         };
589
590         class SAML_DLLLOCAL ActionImpl : public virtual Action,
591             public AbstractSimpleElement,
592             public AbstractDOMCachingXMLObject,
593             public AbstractXMLObjectMarshaller,
594             public AbstractXMLObjectUnmarshaller
595         {
596         public:
597             virtual ~ActionImpl() {
598                 XMLString::release(&m_Namespace);
599             }
600
601             ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
602                     : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(nullptr) {
603             }
604
605             ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
606                 setNamespace(src.getNamespace());
607             }
608
609             IMPL_XMLOBJECT_CLONE(Action);
610             IMPL_STRING_ATTRIB(Namespace);
611
612         protected:
613             void marshallAttributes(DOMElement* domElement) const {
614                 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
615             }
616
617             void processAttribute(const DOMAttr* attribute) {
618                 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
619             }
620         };
621
622         class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
623             public AbstractComplexElement,
624             public AbstractDOMCachingXMLObject,
625             public AbstractXMLObjectMarshaller,
626             public AbstractXMLObjectUnmarshaller
627         {
628         public:
629             virtual ~EvidenceImpl() {}
630
631             EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
632                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
633             }
634
635             EvidenceImpl(const EvidenceImpl& src)
636                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
637                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
638                     if (*i) {
639                         AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
640                         if (ref) {
641                             getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
642                             continue;
643                         }
644
645                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
646                         if (assertion) {
647                             getAssertions().push_back(assertion->cloneAssertion());
648                             continue;
649                         }
650                     }
651                 }
652             }
653
654             IMPL_XMLOBJECT_CLONE(Evidence);
655             IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
656             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
657
658         protected:
659             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
660                 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
661                 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
662                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
663             }
664         };
665
666         class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
667             : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
668         {
669         public:
670             virtual ~AuthorizationDecisionStatementImpl() {
671                 XMLString::release(&m_Resource);
672                 XMLString::release(&m_Decision);
673             }
674
675             AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
676                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
677                 init();
678             }
679
680             AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
681                     : AbstractXMLObject(src), SubjectStatementImpl(src) {
682                 init();
683                 setResource(src.getResource());
684                 setDecision(src.getDecision());
685                 if (src.getEvidence())
686                     setEvidence(src.getEvidence()->cloneEvidence());
687                 VectorOf(Action) v=getActions();
688                 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
689                     if (*i) {
690                         v.push_back((*i)->cloneAction());
691                     }
692                 }
693             }
694
695             void init() {
696                 m_Resource=nullptr;
697                 m_Decision=nullptr;
698                 m_Evidence=nullptr;
699                 m_children.push_back(nullptr);
700                 m_pos_Evidence=m_pos_Subject;
701                 ++m_pos_Evidence;
702             }
703
704             IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
705             SubjectStatement* cloneSubjectStatement() const {
706                 return cloneAuthorizationDecisionStatement();
707             }
708             Statement* cloneStatement() const {
709                 return cloneAuthorizationDecisionStatement();
710             }
711             IMPL_STRING_ATTRIB(Resource);
712             IMPL_STRING_ATTRIB(Decision);
713             IMPL_TYPED_CHILD(Evidence);
714             IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
715
716         protected:
717             void marshallAttributes(DOMElement* domElement) const {
718                 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,nullptr);
719                 MARSHALL_STRING_ATTRIB(Decision,DECISION,nullptr);
720                 SubjectStatementImpl::marshallAttributes(domElement);
721             }
722
723             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
724                 PROC_TYPED_CHILD(Evidence,SAML1_NS,false);
725                 PROC_TYPED_CHILDREN(Action,SAML1_NS,false);
726                 SubjectStatementImpl::processChildElement(childXMLObject,root);
727             }
728
729             void processAttribute(const DOMAttr* attribute) {
730                 PROC_STRING_ATTRIB(Resource,RESOURCE,nullptr);
731                 PROC_STRING_ATTRIB(Decision,DECISION,nullptr);
732                 SubjectStatementImpl::processAttribute(attribute);
733             }
734         };
735
736         class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
737             public AbstractSimpleElement,
738             public AbstractDOMCachingXMLObject,
739             public AbstractXMLObjectMarshaller,
740             public AbstractXMLObjectUnmarshaller
741         {
742         public:
743             virtual ~AttributeDesignatorImpl() {
744                 XMLString::release(&m_AttributeName);
745                 XMLString::release(&m_AttributeNamespace);
746             }
747
748             AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
749                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
750                 init();
751             }
752
753             AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
754                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
755                 init();
756                 setAttributeName(src.getAttributeName());
757                 setAttributeNamespace(src.getAttributeNamespace());
758             }
759
760             void init() {
761                 m_AttributeName=m_AttributeNamespace=nullptr;
762             }
763
764             IMPL_XMLOBJECT_CLONE(AttributeDesignator);
765             IMPL_STRING_ATTRIB(AttributeName);
766             IMPL_STRING_ATTRIB(AttributeNamespace);
767
768         protected:
769             void marshallAttributes(DOMElement* domElement) const {
770                 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
771                 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
772             }
773
774             void processAttribute(const DOMAttr* attribute) {
775                 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
776                 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
777             }
778         };
779
780         class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
781             public AbstractComplexElement,
782             public AbstractDOMCachingXMLObject,
783             public AbstractXMLObjectMarshaller,
784             public AbstractXMLObjectUnmarshaller
785         {
786         public:
787             virtual ~AttributeImpl() {
788                 XMLString::release(&m_AttributeName);
789                 XMLString::release(&m_AttributeNamespace);
790             }
791
792             AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
793                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
794                 init();
795             }
796
797             AttributeImpl(const AttributeImpl& src)
798                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
799                 init();
800                 setAttributeName(src.getAttributeName());
801                 setAttributeNamespace(src.getAttributeNamespace());
802                 VectorOf(XMLObject) v=getAttributeValues();
803                 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
804                     if (*i) {
805                         v.push_back((*i)->clone());
806                     }
807                 }
808             }
809
810             void init() {
811                 m_AttributeName=m_AttributeNamespace=nullptr;
812             }
813
814             IMPL_XMLOBJECT_CLONE(Attribute);
815             AttributeDesignator* cloneAttributeDesignator() const {
816                 return cloneAttribute();
817             }
818             IMPL_STRING_ATTRIB(AttributeName);
819             IMPL_STRING_ATTRIB(AttributeNamespace);
820             IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
821
822         protected:
823             void marshallAttributes(DOMElement* domElement) const {
824                 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
825                 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
826             }
827
828             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
829                 getAttributeValues().push_back(childXMLObject);
830             }
831
832             void processAttribute(const DOMAttr* attribute) {
833                 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
834                 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
835             }
836         };
837
838         class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
839         {
840         public:
841             virtual ~AttributeValueImpl() {}
842
843             AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
844                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
845             }
846
847             AttributeValueImpl(const AttributeValueImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
848
849             IMPL_XMLOBJECT_CLONE(AttributeValue);
850         };
851
852         class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
853         {
854         public:
855             virtual ~AttributeStatementImpl() {}
856
857             AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
858                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
859             }
860
861             AttributeStatementImpl(const AttributeStatementImpl& src)
862                     : AbstractXMLObject(src), SubjectStatementImpl(src) {
863                 VectorOf(Attribute) v=getAttributes();
864                 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
865                     if (*i) {
866                         v.push_back((*i)->cloneAttribute());
867                     }
868                 }
869             }
870
871             IMPL_XMLOBJECT_CLONE(AttributeStatement);
872             SubjectStatement* cloneSubjectStatement() const {
873                 return cloneAttributeStatement();
874             }
875             Statement* cloneStatement() const {
876                 return cloneAttributeStatement();
877             }
878             IMPL_TYPED_CHILDREN(Attribute, m_children.end());
879
880         protected:
881             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
882                 PROC_TYPED_CHILDREN(Attribute,SAML1_NS,true);
883                 SubjectStatementImpl::processChildElement(childXMLObject,root);
884             }
885         };
886
887         class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
888             public AbstractComplexElement,
889             public AbstractDOMCachingXMLObject,
890             public AbstractXMLObjectMarshaller,
891             public AbstractXMLObjectUnmarshaller
892         {
893         public:
894             virtual ~AdviceImpl() {}
895
896             AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
897                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
898             }
899
900             AdviceImpl(const AdviceImpl& src)
901                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
902                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
903                     if (*i) {
904                         AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
905                         if (ref) {
906                             getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
907                             continue;
908                         }
909
910                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
911                         if (assertion) {
912                             getAssertions().push_back(assertion->cloneAssertion());
913                             continue;
914                         }
915
916                         getUnknownXMLObjects().push_back((*i)->clone());
917                     }
918                 }
919             }
920
921             IMPL_XMLOBJECT_CLONE(Advice);
922             IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
923             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
924             IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
925
926         protected:
927             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
928                 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
929                 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
930
931                 // Unknown child.
932                 const XMLCh* nsURI=root->getNamespaceURI();
933                 if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
934                     getUnknownXMLObjects().push_back(childXMLObject);
935                     return;
936                 }
937
938                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
939             }
940         };
941
942         class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
943             public AbstractComplexElement,
944             public AbstractDOMCachingXMLObject,
945             public AbstractXMLObjectMarshaller,
946             public AbstractXMLObjectUnmarshaller
947         {
948             void init() {
949                 m_MinorVersion=nullptr;
950                 m_AssertionID=nullptr;
951                 m_Issuer=nullptr;
952                 m_IssueInstant=nullptr;
953                 m_children.push_back(nullptr);
954                 m_children.push_back(nullptr);
955                 m_children.push_back(nullptr);
956                 m_Conditions=nullptr;
957                 m_Advice=nullptr;
958                 m_Signature=nullptr;
959                 m_pos_Conditions=m_children.begin();
960                 m_pos_Advice=m_pos_Conditions;
961                 ++m_pos_Advice;
962                 m_pos_Signature=m_pos_Advice;
963                 ++m_pos_Signature;
964             }
965         public:
966             virtual ~AssertionImpl() {
967                 XMLString::release(&m_MinorVersion);
968                 XMLString::release(&m_AssertionID);
969                 XMLString::release(&m_Issuer);
970                 delete m_IssueInstant;
971             }
972
973             AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
974                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
975                 init();
976             }
977
978             AssertionImpl(const AssertionImpl& src)
979                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
980                 init();
981                 setMinorVersion(src.m_MinorVersion);
982                 setAssertionID(src.getAssertionID());
983                 setIssuer(src.getIssuer());
984                 setIssueInstant(src.getIssueInstant());
985                 if (src.getConditions())
986                     setConditions(src.getConditions()->cloneConditions());
987                 if (src.getAdvice())
988                     setAdvice(src.getAdvice()->cloneAdvice());
989                 if (src.getSignature())
990                     setSignature(src.getSignature()->cloneSignature());
991                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
992                     if (*i) {
993                         AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
994                         if (authst) {
995                             getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
996                             continue;
997                         }
998
999                         AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1000                         if (attst) {
1001                             getAttributeStatements().push_back(attst->cloneAttributeStatement());
1002                             continue;
1003                         }
1004
1005                         AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
1006                         if (authzst) {
1007                             getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
1008                             continue;
1009                         }
1010
1011                         SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
1012                         if (subst) {
1013                             getSubjectStatements().push_back(subst->cloneSubjectStatement());
1014                             continue;
1015                         }
1016
1017                         Statement* st=dynamic_cast<Statement*>(*i);
1018                         if (st) {
1019                             getStatements().push_back(st->cloneStatement());
1020                             continue;
1021                         }
1022                     }
1023                 }
1024             }
1025
1026             //IMPL_TYPED_CHILD(Signature);
1027             // Need customized setter.
1028         protected:
1029             Signature* m_Signature;
1030             list<XMLObject*>::iterator m_pos_Signature;
1031         public:
1032             Signature* getSignature() const {
1033                 return m_Signature;
1034             }
1035
1036             void setSignature(Signature* sig) {
1037                 prepareForAssignment(m_Signature,sig);
1038                 *m_pos_Signature=m_Signature=sig;
1039                 // Sync content reference back up.
1040                 if (m_Signature)
1041                     m_Signature->setContentReference(new opensaml::ContentReference(*this));
1042             }
1043
1044             IMPL_XMLOBJECT_CLONE(Assertion);
1045             IMPL_INTEGER_ATTRIB(MinorVersion);
1046             IMPL_STRING_ATTRIB(AssertionID);    // have to special-case getXMLID
1047             const XMLCh* getXMLID() const {
1048                 pair<bool,int> v = getMinorVersion();
1049                 return (!v.first || v.second > 0) ? m_AssertionID : nullptr;
1050             }
1051             const XMLCh* getID() const {
1052                 return getAssertionID();
1053             }
1054             void releaseDOM() const {
1055                 if (getDOM())
1056                     getDOM()->removeAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1057                 AbstractDOMCachingXMLObject::releaseDOM();
1058             }
1059             IMPL_STRING_ATTRIB(Issuer);
1060             IMPL_DATETIME_ATTRIB(IssueInstant,0);
1061             IMPL_TYPED_CHILD(Conditions);
1062             IMPL_TYPED_CHILD(Advice);
1063             IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1064             IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1065             IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1066             IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1067             IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1068
1069         protected:
1070             void prepareForMarshalling() const {
1071                 if (m_Signature)
1072                     declareNonVisibleNamespaces();
1073             }
1074
1075             void marshallAttributes(DOMElement* domElement) const {
1076                 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1077                 domElement->setAttributeNS(nullptr,MAJORVERSION,XML_ONE);
1078                 if (!m_MinorVersion)
1079                     const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XML_ONE);
1080                 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,nullptr);
1081                 if (!m_AssertionID)
1082                     const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1083                 domElement->setAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, m_AssertionID);
1084                 if (*m_MinorVersion!=chDigit_0) {
1085 #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
1086                     domElement->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, true);
1087 #else
1088                     domElement->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1089 #endif
1090                 }
1091                 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,nullptr);
1092                 if (!m_IssueInstant) {
1093                     const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
1094                     const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1095                 }
1096                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1097             }
1098
1099             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1100                 PROC_TYPED_CHILD(Conditions,SAML1_NS,false);
1101                 PROC_TYPED_CHILD(Advice,SAML1_NS,false);
1102                 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1103                 PROC_TYPED_CHILDREN(AuthenticationStatement,SAML1_NS,false);
1104                 PROC_TYPED_CHILDREN(AttributeStatement,SAML1_NS,false);
1105                 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAML1_NS,false);
1106                 PROC_TYPED_CHILDREN(SubjectStatement,SAML1_NS,true);
1107                 PROC_TYPED_CHILDREN(Statement,SAML1_NS,true);
1108                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1109             }
1110
1111             void unmarshallAttributes(const DOMElement* domElement) {
1112                 // Standard processing, but then we check IDness.
1113                 AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
1114                 if (m_AssertionID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0)) {
1115 #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
1116                     const_cast<DOMElement*>(domElement)->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, true);
1117 #else
1118                     const_cast<DOMElement*>(domElement)->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1119 #endif
1120                 }
1121             }
1122
1123             void processAttribute(const DOMAttr* attribute) {
1124                 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1125                 if (XMLHelper::isNodeNamed(attribute,nullptr,MAJORVERSION)) {
1126                     if (!XMLString::equals(attribute->getValue(),XML_ONE))
1127                         throw UnmarshallingException("Assertion has invalid major version.");
1128                 }
1129                 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,nullptr);
1130                 PROC_STRING_ATTRIB(AssertionID,ASSERTIONID,nullptr);
1131                 PROC_STRING_ATTRIB(Issuer,ISSUER,nullptr);
1132                 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1133             }
1134         };
1135
1136     };
1137 };
1138
1139 #if defined (_MSC_VER)
1140     #pragma warning( pop )
1141 #endif
1142
1143 // Builder Implementations
1144
1145 IMPL_XMLOBJECTBUILDER(Action);
1146 IMPL_XMLOBJECTBUILDER(Advice);
1147 IMPL_XMLOBJECTBUILDER(Assertion);
1148 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1149 IMPL_XMLOBJECTBUILDER(Attribute);
1150 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1151 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1152 IMPL_XMLOBJECTBUILDER(AttributeValue);
1153 IMPL_XMLOBJECTBUILDER(Audience);
1154 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1155 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1156 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1157 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1158 IMPL_XMLOBJECTBUILDER(Condition);
1159 IMPL_XMLOBJECTBUILDER(Conditions);
1160 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1161 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1162 IMPL_XMLOBJECTBUILDER(Evidence);
1163 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1164 IMPL_XMLOBJECTBUILDER(Statement);
1165 IMPL_XMLOBJECTBUILDER(Subject);
1166 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1167 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1168 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1169
1170 // Unicode literals
1171 const XMLCh Action::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,c,t,i,o,n);
1172 const XMLCh Action::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1173 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] =       UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1174 const XMLCh Advice::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,d,v,i,c,e);
1175 const XMLCh Advice::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1176 const XMLCh Assertion::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1177 const XMLCh Assertion::TYPE_NAME[] =                UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1178 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1179 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] =  UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1180 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] =       UNICODE_LITERAL_6(I,s,s,u,e,r);
1181 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1182 const XMLCh AssertionIDReference::LOCAL_NAME[] =    UNICODE_LITERAL_20(A,s,s,e,r,t,i,o,n,I,D,R,e,f,e,r,e,n,c,e);
1183 const XMLCh Attribute::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1184 const XMLCh Attribute::TYPE_NAME[] =                UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1185 const XMLCh AttributeDesignator::LOCAL_NAME[] =     UNICODE_LITERAL_19(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r);
1186 const XMLCh AttributeDesignator::TYPE_NAME[] =      UNICODE_LITERAL_23(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r,T,y,p,e);
1187 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] =              UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1188 const XMLCh AttributeDesignator::ATTRIBUTENAMESPACE_ATTRIB_NAME[] =         UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,N,a,m,e,s,p,a,c,e);
1189 const XMLCh AttributeStatement::LOCAL_NAME[] =      UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t);
1190 const XMLCh AttributeStatement::TYPE_NAME[] =       UNICODE_LITERAL_22(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t,T,y,p,e);
1191 const XMLCh AttributeValue::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1192 const XMLCh Audience::LOCAL_NAME[] =                UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1193 const XMLCh AudienceRestrictionCondition::LOCAL_NAME[] =    UNICODE_LITERAL_28(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n);
1194 const XMLCh AudienceRestrictionCondition::TYPE_NAME[] =     UNICODE_LITERAL_32(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n,T,y,p,e);
1195 const XMLCh AuthenticationStatement::LOCAL_NAME[] = UNICODE_LITERAL_23(A,u,t,h,e,n,t,i,c,a,t,i,o,n,S,t,a,t,e,m,e,n,t);
1196 const XMLCh AuthenticationStatement::TYPE_NAME[] =  UNICODE_LITERAL_27(A,u,t,h,e,n,t,i,c,a,t,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1197 const XMLCh AuthenticationStatement::AUTHENTICATIONMETHOD_ATTRIB_NAME[] =   UNICODE_LITERAL_20(A,u,t,h,e,n,t,i,c,a,t,i,o,n,M,e,t,h,o,d);
1198 const XMLCh AuthenticationStatement::AUTHENTICATIONINSTANT_ATTRIB_NAME[] =  UNICODE_LITERAL_21(A,u,t,h,e,n,t,i,c,a,t,i,o,n,I,n,s,t,a,n,t);
1199 const XMLCh AuthorityBinding::LOCAL_NAME[] =        UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1200 const XMLCh AuthorityBinding::TYPE_NAME[] =         UNICODE_LITERAL_20(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g,T,y,p,e);
1201 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1202 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] =      UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1203 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] =       UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1204 const XMLCh AuthorizationDecisionStatement::LOCAL_NAME[] =  UNICODE_LITERAL_30(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t);
1205 const XMLCh AuthorizationDecisionStatement::TYPE_NAME[] =   UNICODE_LITERAL_34(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1206 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] =        UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1207 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] =        UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1208 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] =             UNICODE_LITERAL_6(P,e,r,m,i,t);
1209 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] =               UNICODE_LITERAL_4(D,e,n,y);
1210 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] =      UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1211 const XMLCh Condition::LOCAL_NAME[] =               UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1212 const XMLCh Conditions::LOCAL_NAME[] =              UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1213 const XMLCh Conditions::TYPE_NAME[] =               UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1214 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] =   UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1215 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1216 const XMLCh ConfirmationMethod::LOCAL_NAME[] =      UNICODE_LITERAL_18(C,o,n,f,i,r,m,a,t,i,o,n,M,e,t,h,o,d);
1217 const XMLCh DoNotCacheCondition::LOCAL_NAME[] =     UNICODE_LITERAL_19(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n);
1218 const XMLCh DoNotCacheCondition::TYPE_NAME[] =      UNICODE_LITERAL_23(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n,T,y,p,e);
1219 const XMLCh Evidence::LOCAL_NAME[] =                UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1220 const XMLCh Evidence::TYPE_NAME[] =                 UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1221 const XMLCh NameIdentifier::LOCAL_NAME[] =          UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1222 const XMLCh NameIdentifier::TYPE_NAME[] =           UNICODE_LITERAL_18(N,a,m,e,I,d,e,n,t,i,f,i,e,r,T,y,p,e);
1223 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] =   UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1224 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] =  UNICODE_LITERAL_6(F,o,r,m,a,t);
1225 const XMLCh Statement::LOCAL_NAME[] =               UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1226 const XMLCh Subject::LOCAL_NAME[] =                 UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1227 const XMLCh Subject::TYPE_NAME[] =                  UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1228 const XMLCh SubjectConfirmation::LOCAL_NAME[] =     UNICODE_LITERAL_19(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n);
1229 const XMLCh SubjectConfirmation::TYPE_NAME[] =      UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,T,y,p,e);
1230 const XMLCh SubjectConfirmationData::LOCAL_NAME[] = UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a);
1231 const XMLCh SubjectLocality::LOCAL_NAME[] =         UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1232 const XMLCh SubjectLocality::TYPE_NAME[] =          UNICODE_LITERAL_19(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y,T,y,p,e);
1233 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] =      UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1234 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] =     UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1235 const XMLCh SubjectStatement::LOCAL_NAME[] =        UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1236
1237 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1238 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1239   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1240   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1241   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1242   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1243   chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chLatin_d, chNull
1244 };
1245
1246 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1247 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1248   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1249   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1250   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1251   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1252   chLatin_e, chLatin_m, chLatin_a, chLatin_i, chLatin_l, chLatin_A, chLatin_d, chLatin_d, chLatin_r, chLatin_e, chLatin_s, chLatin_s, chNull
1253 };
1254
1255 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1256 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1257   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1258   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1259   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1260   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1261   chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1262   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1263 };
1264
1265 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1266 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1267   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1268   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1269   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1270   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1271   chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1272   chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1273   chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1274   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1275 };
1276
1277 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1278 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1279   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1280   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1281   chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1282       chDash, chDigit_0, chDigit_1, chNull
1283 };
1284
1285 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1286 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1287   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1288   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1289   chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1290 };
1291
1292 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1293 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1294   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1295   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1296   chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1297 };
1298
1299 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1300 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1301   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1302   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1303   chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1304       chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1305 };
1306
1307 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1308 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1309   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1310   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1311   chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1312       chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1313 };
1314
1315 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1316 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1317   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1318   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1319   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1320   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1321 };
1322
1323 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1324 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1325   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1326   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1327   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1328   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1329   chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1330 };
1331
1332 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1333 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1334   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1335   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1336   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1337   chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1338 };
1339
1340 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1341 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1342   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1343   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1344   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1345   chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1346 };