2 * Copyright 2001-2006 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Implementation classes for XML Encryption schema
24 #include "AbstractAttributeExtensibleXMLObject.h"
25 #include "AbstractSimpleElement.h"
26 #include "AbstractElementProxy.h"
27 #include "exceptions.h"
28 #include "encryption/Encryption.h"
29 #include "io/AbstractXMLObjectMarshaller.h"
30 #include "io/AbstractXMLObjectUnmarshaller.h"
31 #include "util/XMLHelper.h"
33 #include <xercesc/util/XMLUniDefs.hpp>
35 using namespace xmlencryption;
36 using namespace xmltooling;
39 #if defined (_MSC_VER)
40 #pragma warning( push )
41 #pragma warning( disable : 4250 4251 )
44 namespace xmlencryption {
46 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,CarriedKeyName);
47 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,CipherValue);
48 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,KeySize);
49 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,OAEPparams);
51 class XMLTOOL_DLLLOCAL EncryptionMethodImpl : public virtual EncryptionMethod,
52 public AbstractComplexElement,
53 public AbstractDOMCachingXMLObject,
54 public AbstractXMLObjectMarshaller,
55 public AbstractXMLObjectUnmarshaller
61 m_children.push_back(NULL);
62 m_children.push_back(NULL);
63 m_pos_KeySize=m_children.begin();
64 m_pos_OAEPparams=m_pos_KeySize;
68 virtual ~EncryptionMethodImpl() {
69 XMLString::release(&m_Algorithm);
72 EncryptionMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
73 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
77 EncryptionMethodImpl(const EncryptionMethodImpl& src)
78 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
80 setAlgorithm(src.getAlgorithm());
82 setKeySize(src.getKeySize()->cloneKeySize());
83 if (src.getOAEPparams())
84 setOAEPparams(src.getOAEPparams()->cloneOAEPparams());
85 VectorOf(XMLObject) v=getOtherParameters();
86 for (vector<XMLObject*>::const_iterator i=src.m_OtherParameters.begin(); i!=src.m_OtherParameters.end(); i++) {
88 v.push_back((*i)->clone());
93 IMPL_XMLOBJECT_CLONE(EncryptionMethod);
94 IMPL_STRING_ATTRIB(Algorithm);
95 IMPL_TYPED_CHILD(KeySize);
96 IMPL_TYPED_CHILD(OAEPparams);
97 IMPL_XMLOBJECT_CHILDREN(OtherParameter,m_children.end());
100 void marshallAttributes(DOMElement* domElement) const {
101 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
104 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
105 PROC_TYPED_CHILD(KeySize,XMLConstants::XMLENC_NS,false);
106 PROC_TYPED_CHILD(OAEPparams,XMLConstants::XMLENC_NS,false);
109 const XMLCh* nsURI=root->getNamespaceURI();
110 if (!XMLString::equals(nsURI,XMLConstants::XMLENC_NS) && nsURI && *nsURI) {
111 getOtherParameters().push_back(childXMLObject);
115 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
118 void processAttribute(const DOMAttr* attribute) {
119 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
120 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
124 class XMLTOOL_DLLLOCAL TransformsImpl : public virtual Transforms,
125 public AbstractComplexElement,
126 public AbstractDOMCachingXMLObject,
127 public AbstractXMLObjectMarshaller,
128 public AbstractXMLObjectUnmarshaller
131 virtual ~TransformsImpl() {}
133 TransformsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
134 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
137 TransformsImpl(const TransformsImpl& src)
138 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
139 VectorOf(xmlsignature::Transform) v=getTransforms();
140 for (vector<xmlsignature::Transform*>::const_iterator i=src.m_Transforms.begin(); i!=src.m_Transforms.end(); i++) {
142 v.push_back((*i)->cloneTransform());
147 IMPL_XMLOBJECT_CLONE(Transforms);
148 IMPL_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,m_children.end());
151 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
152 PROC_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,XMLConstants::XMLSIG_NS,false);
153 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
157 class XMLTOOL_DLLLOCAL CipherReferenceImpl : public virtual CipherReference,
158 public AbstractComplexElement,
159 public AbstractDOMCachingXMLObject,
160 public AbstractXMLObjectMarshaller,
161 public AbstractXMLObjectUnmarshaller
166 m_children.push_back(NULL);
167 m_pos_Transforms=m_children.begin();
170 virtual ~CipherReferenceImpl() {
171 XMLString::release(&m_URI);
174 CipherReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
175 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
179 CipherReferenceImpl(const CipherReferenceImpl& src)
180 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
182 setURI(src.getURI());
183 if (src.getTransforms())
184 setTransforms(src.getTransforms()->cloneTransforms());
187 IMPL_XMLOBJECT_CLONE(CipherReference);
188 IMPL_STRING_ATTRIB(URI);
189 IMPL_TYPED_CHILD(Transforms);
192 void marshallAttributes(DOMElement* domElement) const {
193 MARSHALL_STRING_ATTRIB(URI,URI,NULL);
196 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
197 PROC_TYPED_CHILD(Transforms,XMLConstants::XMLENC_NS,false);
198 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
201 void processAttribute(const DOMAttr* attribute) {
202 PROC_STRING_ATTRIB(URI,URI,NULL);
203 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
207 class XMLTOOL_DLLLOCAL CipherDataImpl : public virtual CipherData,
208 public AbstractComplexElement,
209 public AbstractDOMCachingXMLObject,
210 public AbstractXMLObjectMarshaller,
211 public AbstractXMLObjectUnmarshaller
215 m_CipherReference=NULL;
216 m_children.push_back(NULL);
217 m_children.push_back(NULL);
218 m_pos_CipherValue=m_children.begin();
219 m_pos_CipherReference=m_pos_CipherValue;
220 ++m_pos_CipherReference;
223 virtual ~CipherDataImpl() {}
225 CipherDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
226 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
230 CipherDataImpl(const CipherDataImpl& src)
231 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
233 if (src.getCipherValue())
234 setCipherValue(src.getCipherValue()->cloneCipherValue());
235 if (src.getCipherReference())
236 setCipherReference(src.getCipherReference()->cloneCipherReference());
239 IMPL_XMLOBJECT_CLONE(CipherData);
240 IMPL_TYPED_CHILD(CipherValue);
241 IMPL_TYPED_CHILD(CipherReference);
244 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
245 PROC_TYPED_CHILD(CipherValue,XMLConstants::XMLENC_NS,false);
246 PROC_TYPED_CHILD(CipherReference,XMLConstants::XMLENC_NS,false);
247 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
251 class XMLTOOL_DLLLOCAL EncryptionPropertyImpl : public virtual EncryptionProperty,
252 public AbstractElementProxy,
253 public AbstractAttributeExtensibleXMLObject,
254 public AbstractDOMCachingXMLObject,
255 public AbstractXMLObjectMarshaller,
256 public AbstractXMLObjectUnmarshaller
262 virtual ~EncryptionPropertyImpl() {
263 XMLString::release(&m_Id);
264 XMLString::release(&m_Target);
267 EncryptionPropertyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
268 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
272 EncryptionPropertyImpl(const EncryptionPropertyImpl& src)
273 : AbstractXMLObject(src),
274 AbstractElementProxy(src),
275 AbstractAttributeExtensibleXMLObject(src),
276 AbstractDOMCachingXMLObject(src) {
279 setTarget(src.getTarget());
280 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
282 getXMLObjects().push_back((*i)->clone());
287 IMPL_XMLOBJECT_CLONE(EncryptionProperty);
289 IMPL_STRING_ATTRIB(Target);
291 void setAttribute(QName& qualifiedName, const XMLCh* value) {
292 if (!qualifiedName.hasNamespaceURI()) {
293 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
297 else if (XMLString::equals(qualifiedName.getLocalPart(),TARGET_ATTRIB_NAME)) {
302 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
306 void marshallAttributes(DOMElement* domElement) const {
307 MARSHALL_ID_ATTRIB(Id,ID,NULL);
308 MARSHALL_STRING_ATTRIB(Target,TARGET,NULL);
309 marshallExtensionAttributes(domElement);
312 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
313 getXMLObjects().push_back(childXMLObject);
316 void processAttribute(const DOMAttr* attribute) {
317 PROC_ID_ATTRIB(Id,ID,NULL);
318 unmarshallExtensionAttribute(attribute);
322 class XMLTOOL_DLLLOCAL EncryptionPropertiesImpl : public virtual EncryptionProperties,
323 public AbstractComplexElement,
324 public AbstractDOMCachingXMLObject,
325 public AbstractXMLObjectMarshaller,
326 public AbstractXMLObjectUnmarshaller
332 virtual ~EncryptionPropertiesImpl() {
333 XMLString::release(&m_Id);
336 EncryptionPropertiesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
337 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
341 EncryptionPropertiesImpl(const EncryptionPropertiesImpl& src)
342 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
345 VectorOf(EncryptionProperty) v=getEncryptionPropertys();
346 for (vector<EncryptionProperty*>::const_iterator i=src.m_EncryptionPropertys.begin(); i!=src.m_EncryptionPropertys.end(); i++) {
348 v.push_back((*i)->cloneEncryptionProperty());
353 IMPL_XMLOBJECT_CLONE(EncryptionProperties);
355 IMPL_TYPED_CHILDREN(EncryptionProperty,m_children.end());
358 void marshallAttributes(DOMElement* domElement) const {
359 MARSHALL_ID_ATTRIB(Id,ID,NULL);
362 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
363 PROC_TYPED_CHILDREN(EncryptionProperty,XMLConstants::XMLENC_NS,false);
364 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
367 void processAttribute(const DOMAttr* attribute) {
368 PROC_ID_ATTRIB(Id,ID,NULL);
369 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
373 class XMLTOOL_DLLLOCAL ReferenceTypeImpl : public virtual ReferenceType,
374 public AbstractElementProxy,
375 public AbstractDOMCachingXMLObject,
376 public AbstractXMLObjectMarshaller,
377 public AbstractXMLObjectUnmarshaller
384 ReferenceTypeImpl() {
389 virtual ~ReferenceTypeImpl() {
390 XMLString::release(&m_URI);
393 ReferenceTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
394 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
398 ReferenceTypeImpl(const ReferenceTypeImpl& src)
399 : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
401 setURI(src.getURI());
402 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
404 getXMLObjects().push_back((*i)->clone());
409 IMPL_XMLOBJECT_CLONE(ReferenceType);
410 IMPL_STRING_ATTRIB(URI);
413 void marshallAttributes(DOMElement* domElement) const {
414 MARSHALL_STRING_ATTRIB(URI,URI,NULL);
417 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
418 getXMLObjects().push_back(childXMLObject);
421 void processAttribute(const DOMAttr* attribute) {
422 PROC_STRING_ATTRIB(URI,URI,NULL);
423 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
427 class XMLTOOL_DLLLOCAL DataReferenceImpl : public virtual DataReference, public ReferenceTypeImpl
430 virtual ~DataReferenceImpl() {}
432 DataReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
433 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
435 DataReferenceImpl(const DataReferenceImpl& src) : AbstractXMLObject(src), ReferenceTypeImpl(src) {}
437 IMPL_XMLOBJECT_CLONE(DataReference);
438 ReferenceType* cloneReferenceType() const {
439 return new DataReferenceImpl(*this);
443 class XMLTOOL_DLLLOCAL KeyReferenceImpl : public virtual KeyReference, public ReferenceTypeImpl
446 virtual ~KeyReferenceImpl() {}
448 KeyReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
449 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
451 KeyReferenceImpl(const KeyReferenceImpl& src) : AbstractXMLObject(src), ReferenceTypeImpl(src) {}
453 IMPL_XMLOBJECT_CLONE(KeyReference);
454 ReferenceType* cloneReferenceType() const {
455 return new KeyReferenceImpl(*this);
459 class XMLTOOL_DLLLOCAL ReferenceListImpl : public virtual ReferenceList,
460 public AbstractComplexElement,
461 public AbstractDOMCachingXMLObject,
462 public AbstractXMLObjectMarshaller,
463 public AbstractXMLObjectUnmarshaller
466 virtual ~ReferenceListImpl() {}
468 ReferenceListImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
469 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
472 ReferenceListImpl(const ReferenceListImpl& src)
473 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
474 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
476 DataReference* data=dynamic_cast<DataReference*>(*i);
478 getDataReferences().push_back(data->cloneDataReference());
482 KeyReference* key=dynamic_cast<KeyReference*>(*i);
484 getKeyReferences().push_back(key->cloneKeyReference());
491 IMPL_XMLOBJECT_CLONE(ReferenceList);
492 IMPL_TYPED_CHILDREN(DataReference,m_children.end());
493 IMPL_TYPED_CHILDREN(KeyReference,m_children.end());
496 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
497 PROC_TYPED_CHILDREN(DataReference,XMLConstants::XMLENC_NS,false);
498 PROC_TYPED_CHILDREN(KeyReference,XMLConstants::XMLENC_NS,false);
499 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
503 class XMLTOOL_DLLLOCAL EncryptedTypeImpl : public virtual EncryptedType,
504 public AbstractComplexElement,
505 public AbstractDOMCachingXMLObject,
506 public AbstractXMLObjectMarshaller,
507 public AbstractXMLObjectUnmarshaller
510 m_Id=m_Type=m_MimeType=m_Encoding=NULL;
511 m_EncryptionMethod=NULL;
514 m_EncryptionProperties=NULL;
515 m_children.push_back(NULL);
516 m_children.push_back(NULL);
517 m_children.push_back(NULL);
518 m_children.push_back(NULL);
519 m_pos_EncryptionMethod=m_children.begin();
520 m_pos_KeyInfo=m_pos_EncryptionMethod;
522 m_pos_CipherData=m_pos_KeyInfo;
524 m_pos_EncryptionProperties=m_pos_CipherData;
525 ++m_pos_EncryptionProperties;
528 EncryptedTypeImpl() {
533 virtual ~EncryptedTypeImpl() {
534 XMLString::release(&m_Id);
535 XMLString::release(&m_Type);
536 XMLString::release(&m_MimeType);
537 XMLString::release(&m_Encoding);
540 EncryptedTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
541 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
545 EncryptedTypeImpl(const EncryptedTypeImpl& src)
546 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
549 setType(src.getType());
550 setMimeType(src.getMimeType());
551 setEncoding(src.getEncoding());
552 if (src.getEncryptionMethod())
553 setEncryptionMethod(src.getEncryptionMethod()->cloneEncryptionMethod());
554 if (src.getKeyInfo())
555 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
556 if (src.getCipherData())
557 setCipherData(src.getCipherData()->cloneCipherData());
558 if (src.getEncryptionProperties())
559 setEncryptionProperties(src.getEncryptionProperties()->cloneEncryptionProperties());
562 IMPL_XMLOBJECT_CLONE(EncryptedType);
564 IMPL_STRING_ATTRIB(Type);
565 IMPL_STRING_ATTRIB(MimeType);
566 IMPL_STRING_ATTRIB(Encoding);
567 IMPL_TYPED_CHILD(EncryptionMethod);
568 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
569 IMPL_TYPED_CHILD(CipherData);
570 IMPL_TYPED_CHILD(EncryptionProperties);
573 void marshallAttributes(DOMElement* domElement) const {
574 MARSHALL_ID_ATTRIB(Id,ID,NULL);
575 MARSHALL_STRING_ATTRIB(Type,TYPE,NULL);
576 MARSHALL_STRING_ATTRIB(MimeType,MIMETYPE,NULL);
577 MARSHALL_STRING_ATTRIB(Encoding,ENCODING,NULL);
580 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
581 PROC_TYPED_CHILD(EncryptionMethod,XMLConstants::XMLENC_NS,false);
582 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLConstants::XMLSIG_NS,false);
583 PROC_TYPED_CHILD(CipherData,XMLConstants::XMLENC_NS,false);
584 PROC_TYPED_CHILD(EncryptionProperties,XMLConstants::XMLENC_NS,false);
585 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
588 void processAttribute(const DOMAttr* attribute) {
589 PROC_ID_ATTRIB(Id,ID,NULL);
590 PROC_STRING_ATTRIB(Type,TYPE,NULL);
591 PROC_STRING_ATTRIB(MimeType,MIMETYPE,NULL);
592 PROC_STRING_ATTRIB(Encoding,ENCODING,NULL);
593 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
597 class XMLTOOL_DLLLOCAL EncryptedDataImpl : public virtual EncryptedData, public EncryptedTypeImpl
600 virtual ~EncryptedDataImpl() {}
602 EncryptedDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
603 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
605 EncryptedDataImpl(const EncryptedDataImpl& src) : AbstractXMLObject(src), EncryptedTypeImpl(src) {}
607 IMPL_XMLOBJECT_CLONE(EncryptedData);
608 EncryptedType* cloneEncryptedType() const {
609 return new EncryptedDataImpl(*this);
613 class XMLTOOL_DLLLOCAL EncryptedKeyImpl : public virtual EncryptedKey, public EncryptedTypeImpl
617 m_ReferenceList=NULL;
618 m_CarriedKeyName=NULL;
619 m_children.push_back(NULL);
620 m_children.push_back(NULL);
621 m_pos_ReferenceList=m_pos_EncryptionProperties;
622 ++m_pos_ReferenceList;
623 m_pos_CarriedKeyName=m_pos_ReferenceList;
624 ++m_pos_CarriedKeyName;
628 virtual ~EncryptedKeyImpl() {
629 XMLString::release(&m_Recipient);
632 EncryptedKeyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
633 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
637 EncryptedKeyImpl(const EncryptedKeyImpl& src) : AbstractXMLObject(src), EncryptedTypeImpl(src) {
641 IMPL_XMLOBJECT_CLONE(EncryptedKey);
642 EncryptedType* cloneEncryptedType() const {
643 return new EncryptedKeyImpl(*this);
645 IMPL_STRING_ATTRIB(Recipient);
646 IMPL_TYPED_CHILD(ReferenceList);
647 IMPL_TYPED_CHILD(CarriedKeyName);
650 void marshallAttributes(DOMElement* domElement) const {
651 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
652 EncryptedTypeImpl::marshallAttributes(domElement);
655 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
656 PROC_TYPED_CHILD(ReferenceList,XMLConstants::XMLENC_NS,false);
657 PROC_TYPED_CHILD(CarriedKeyName,XMLConstants::XMLENC_NS,false);
658 EncryptedTypeImpl::processChildElement(childXMLObject,root);
661 void processAttribute(const DOMAttr* attribute) {
662 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
663 EncryptedTypeImpl::processAttribute(attribute);
669 #if defined (_MSC_VER)
670 #pragma warning( pop )
673 // Builder Implementations
675 IMPL_XMLOBJECTBUILDER(CarriedKeyName);
676 IMPL_XMLOBJECTBUILDER(CipherData);
677 IMPL_XMLOBJECTBUILDER(CipherReference);
678 IMPL_XMLOBJECTBUILDER(CipherValue);
679 IMPL_XMLOBJECTBUILDER(DataReference);
680 IMPL_XMLOBJECTBUILDER(EncryptedData);
681 IMPL_XMLOBJECTBUILDER(EncryptedKey);
682 IMPL_XMLOBJECTBUILDER(EncryptionMethod);
683 IMPL_XMLOBJECTBUILDER(EncryptionProperties);
684 IMPL_XMLOBJECTBUILDER(EncryptionProperty);
685 IMPL_XMLOBJECTBUILDER(KeyReference);
686 IMPL_XMLOBJECTBUILDER(KeySize);
687 IMPL_XMLOBJECTBUILDER(OAEPparams);
688 IMPL_XMLOBJECTBUILDER(ReferenceList);
689 IMPL_XMLOBJECTBUILDER(Transforms);
693 const XMLCh CarriedKeyName::LOCAL_NAME[] = UNICODE_LITERAL_14(C,a,r,r,i,e,d,K,e,y,N,a,m,e);
694 const XMLCh CipherData::LOCAL_NAME[] = UNICODE_LITERAL_10(C,i,p,h,e,r,D,a,t,a);
695 const XMLCh CipherData::TYPE_NAME[] = UNICODE_LITERAL_14(C,i,p,h,e,r,D,a,t,a,T,y,p,e);
696 const XMLCh CipherReference::LOCAL_NAME[] = UNICODE_LITERAL_15(C,i,p,h,e,r,R,e,f,e,r,e,n,c,e);
697 const XMLCh CipherReference::TYPE_NAME[] = UNICODE_LITERAL_19(C,i,p,h,e,r,R,e,f,e,r,e,n,c,e,T,y,p,e);
698 const XMLCh CipherReference::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I);
699 const XMLCh CipherValue::LOCAL_NAME[] = UNICODE_LITERAL_11(C,i,p,h,e,r,V,a,l,u,e);
700 const XMLCh DataReference::LOCAL_NAME[] = UNICODE_LITERAL_13(D,a,t,a,R,e,f,e,r,e,n,c,e);
701 const XMLCh EncryptedData::LOCAL_NAME[] = UNICODE_LITERAL_13(E,n,c,r,y,p,t,e,d,D,a,t,a);
702 const XMLCh EncryptedData::TYPE_NAME[] = UNICODE_LITERAL_17(E,n,c,r,y,p,t,e,d,D,a,t,a,T,y,p,e);
703 const XMLCh EncryptedKey::LOCAL_NAME[] = UNICODE_LITERAL_12(E,n,c,r,y,p,t,e,d,K,e,y);
704 const XMLCh EncryptedKey::TYPE_NAME[] = UNICODE_LITERAL_16(E,n,c,r,y,p,t,e,d,K,e,y,T,y,p,e);
705 const XMLCh EncryptedKey::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
706 const XMLCh EncryptedType::LOCAL_NAME[] = {chNull};
707 const XMLCh EncryptedType::TYPE_NAME[] = UNICODE_LITERAL_13(E,n,c,r,y,p,t,e,d,T,y,p,e);
708 const XMLCh EncryptedType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d);
709 const XMLCh EncryptedType::TYPE_ATTRIB_NAME[] = UNICODE_LITERAL_4(T,y,p,e);
710 const XMLCh EncryptedType::MIMETYPE_ATTRIB_NAME[] = UNICODE_LITERAL_8(M,i,m,e,T,y,p,e);
711 const XMLCh EncryptedType::ENCODING_ATTRIB_NAME[] = UNICODE_LITERAL_8(E,n,c,o,d,i,n,g);
712 const XMLCh EncryptionMethod::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,c,r,y,p,t,i,o,n,M,e,t,h,o,d);
713 const XMLCh EncryptionMethod::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,c,r,y,p,t,i,o,n,M,e,t,h,o,d,T,y,p,e);
714 const XMLCh EncryptionMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
715 const XMLCh EncryptionProperties::LOCAL_NAME[] = UNICODE_LITERAL_20(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,i,e,s);
716 const XMLCh EncryptionProperties::TYPE_NAME[] = UNICODE_LITERAL_24(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,i,e,s,T,y,p,e);
717 const XMLCh EncryptionProperties::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d);
718 const XMLCh EncryptionProperty::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,y);
719 const XMLCh EncryptionProperty::TYPE_NAME[] = UNICODE_LITERAL_22(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,y,T,y,p,e);
720 const XMLCh EncryptionProperty::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d);
721 const XMLCh EncryptionProperty::TARGET_ATTRIB_NAME[] = UNICODE_LITERAL_6(T,a,r,g,e,t);
722 const XMLCh KeyReference::LOCAL_NAME[] = UNICODE_LITERAL_12(K,e,y,R,e,f,e,r,e,n,c,e);
723 const XMLCh KeySize::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,S,i,z,e);
724 const XMLCh OAEPparams::LOCAL_NAME[] = UNICODE_LITERAL_10(O,A,E,P,p,a,r,a,m,s);
725 const XMLCh ReferenceList::LOCAL_NAME[] = UNICODE_LITERAL_13(R,e,f,e,r,e,n,c,e,L,i,s,t);
726 const XMLCh ReferenceType::LOCAL_NAME[] = {chNull};
727 const XMLCh ReferenceType::TYPE_NAME[] = UNICODE_LITERAL_13(R,e,f,e,r,e,n,c,e,T,y,p,e);
728 const XMLCh ReferenceType::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I);
729 const XMLCh Transforms::LOCAL_NAME[] = UNICODE_LITERAL_10(T,r,a,n,s,f,o,r,m,s);
730 const XMLCh Transforms::TYPE_NAME[] = UNICODE_LITERAL_14(T,r,a,n,s,f,o,r,m,s,T,y,p,e);