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;
38 using xmlconstants::XMLENC_NS;
39 using xmlconstants::XMLSIG_NS;
41 #if defined (_MSC_VER)
42 #pragma warning( push )
43 #pragma warning( disable : 4250 4251 )
46 namespace xmlencryption {
48 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,CarriedKeyName);
49 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,CipherValue);
50 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,KeySize);
51 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,OAEPparams);
53 class XMLTOOL_DLLLOCAL EncryptionMethodImpl : public virtual EncryptionMethod,
54 public AbstractComplexElement,
55 public AbstractDOMCachingXMLObject,
56 public AbstractXMLObjectMarshaller,
57 public AbstractXMLObjectUnmarshaller
63 m_children.push_back(NULL);
64 m_children.push_back(NULL);
65 m_pos_KeySize=m_children.begin();
66 m_pos_OAEPparams=m_pos_KeySize;
70 virtual ~EncryptionMethodImpl() {
71 XMLString::release(&m_Algorithm);
74 EncryptionMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
75 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
79 EncryptionMethodImpl(const EncryptionMethodImpl& src)
80 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
82 setAlgorithm(src.getAlgorithm());
84 setKeySize(src.getKeySize()->cloneKeySize());
85 if (src.getOAEPparams())
86 setOAEPparams(src.getOAEPparams()->cloneOAEPparams());
87 VectorOf(XMLObject) v=getOtherParameters();
88 for (vector<XMLObject*>::const_iterator i=src.m_OtherParameters.begin(); i!=src.m_OtherParameters.end(); i++) {
90 v.push_back((*i)->clone());
95 IMPL_XMLOBJECT_CLONE(EncryptionMethod);
96 IMPL_STRING_ATTRIB(Algorithm);
97 IMPL_TYPED_CHILD(KeySize);
98 IMPL_TYPED_CHILD(OAEPparams);
99 IMPL_XMLOBJECT_CHILDREN(OtherParameter,m_children.end());
102 void marshallAttributes(DOMElement* domElement) const {
103 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
106 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
107 PROC_TYPED_CHILD(KeySize,XMLENC_NS,false);
108 PROC_TYPED_CHILD(OAEPparams,XMLENC_NS,false);
111 const XMLCh* nsURI=root->getNamespaceURI();
112 if (!XMLString::equals(nsURI,XMLENC_NS) && nsURI && *nsURI) {
113 getOtherParameters().push_back(childXMLObject);
117 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
120 void processAttribute(const DOMAttr* attribute) {
121 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
122 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
126 class XMLTOOL_DLLLOCAL TransformsImpl : public virtual Transforms,
127 public AbstractComplexElement,
128 public AbstractDOMCachingXMLObject,
129 public AbstractXMLObjectMarshaller,
130 public AbstractXMLObjectUnmarshaller
133 virtual ~TransformsImpl() {}
135 TransformsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
136 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
139 TransformsImpl(const TransformsImpl& src)
140 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
141 VectorOf(xmlsignature::Transform) v=getTransforms();
142 for (vector<xmlsignature::Transform*>::const_iterator i=src.m_Transforms.begin(); i!=src.m_Transforms.end(); i++) {
144 v.push_back((*i)->cloneTransform());
149 IMPL_XMLOBJECT_CLONE(Transforms);
150 IMPL_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,m_children.end());
153 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
154 PROC_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,XMLSIG_NS,false);
155 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
159 class XMLTOOL_DLLLOCAL CipherReferenceImpl : public virtual CipherReference,
160 public AbstractComplexElement,
161 public AbstractDOMCachingXMLObject,
162 public AbstractXMLObjectMarshaller,
163 public AbstractXMLObjectUnmarshaller
168 m_children.push_back(NULL);
169 m_pos_Transforms=m_children.begin();
172 virtual ~CipherReferenceImpl() {
173 XMLString::release(&m_URI);
176 CipherReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
177 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
181 CipherReferenceImpl(const CipherReferenceImpl& src)
182 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
184 setURI(src.getURI());
185 if (src.getTransforms())
186 setTransforms(src.getTransforms()->cloneTransforms());
189 IMPL_XMLOBJECT_CLONE(CipherReference);
190 IMPL_STRING_ATTRIB(URI);
191 IMPL_TYPED_CHILD(Transforms);
194 void marshallAttributes(DOMElement* domElement) const {
195 MARSHALL_STRING_ATTRIB(URI,URI,NULL);
198 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
199 PROC_TYPED_CHILD(Transforms,XMLENC_NS,false);
200 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
203 void processAttribute(const DOMAttr* attribute) {
204 PROC_STRING_ATTRIB(URI,URI,NULL);
205 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
209 class XMLTOOL_DLLLOCAL CipherDataImpl : public virtual CipherData,
210 public AbstractComplexElement,
211 public AbstractDOMCachingXMLObject,
212 public AbstractXMLObjectMarshaller,
213 public AbstractXMLObjectUnmarshaller
217 m_CipherReference=NULL;
218 m_children.push_back(NULL);
219 m_children.push_back(NULL);
220 m_pos_CipherValue=m_children.begin();
221 m_pos_CipherReference=m_pos_CipherValue;
222 ++m_pos_CipherReference;
225 virtual ~CipherDataImpl() {}
227 CipherDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
228 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
232 CipherDataImpl(const CipherDataImpl& src)
233 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
235 if (src.getCipherValue())
236 setCipherValue(src.getCipherValue()->cloneCipherValue());
237 if (src.getCipherReference())
238 setCipherReference(src.getCipherReference()->cloneCipherReference());
241 IMPL_XMLOBJECT_CLONE(CipherData);
242 IMPL_TYPED_CHILD(CipherValue);
243 IMPL_TYPED_CHILD(CipherReference);
246 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
247 PROC_TYPED_CHILD(CipherValue,XMLENC_NS,false);
248 PROC_TYPED_CHILD(CipherReference,XMLENC_NS,false);
249 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
253 class XMLTOOL_DLLLOCAL EncryptionPropertyImpl : public virtual EncryptionProperty,
254 public AbstractElementProxy,
255 public AbstractAttributeExtensibleXMLObject,
256 public AbstractDOMCachingXMLObject,
257 public AbstractXMLObjectMarshaller,
258 public AbstractXMLObjectUnmarshaller
264 virtual ~EncryptionPropertyImpl() {
265 XMLString::release(&m_Id);
266 XMLString::release(&m_Target);
269 EncryptionPropertyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
270 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
274 EncryptionPropertyImpl(const EncryptionPropertyImpl& src)
275 : AbstractXMLObject(src),
276 AbstractElementProxy(src),
277 AbstractAttributeExtensibleXMLObject(src),
278 AbstractDOMCachingXMLObject(src) {
281 setTarget(src.getTarget());
282 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
284 getXMLObjects().push_back((*i)->clone());
289 IMPL_XMLOBJECT_CLONE(EncryptionProperty);
291 IMPL_STRING_ATTRIB(Target);
293 void setAttribute(QName& qualifiedName, const XMLCh* value) {
294 if (!qualifiedName.hasNamespaceURI()) {
295 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
299 else if (XMLString::equals(qualifiedName.getLocalPart(),TARGET_ATTRIB_NAME)) {
304 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
308 void marshallAttributes(DOMElement* domElement) const {
309 MARSHALL_ID_ATTRIB(Id,ID,NULL);
310 MARSHALL_STRING_ATTRIB(Target,TARGET,NULL);
311 marshallExtensionAttributes(domElement);
314 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
315 getXMLObjects().push_back(childXMLObject);
318 void processAttribute(const DOMAttr* attribute) {
319 PROC_ID_ATTRIB(Id,ID,NULL);
320 unmarshallExtensionAttribute(attribute);
324 class XMLTOOL_DLLLOCAL EncryptionPropertiesImpl : public virtual EncryptionProperties,
325 public AbstractComplexElement,
326 public AbstractDOMCachingXMLObject,
327 public AbstractXMLObjectMarshaller,
328 public AbstractXMLObjectUnmarshaller
334 virtual ~EncryptionPropertiesImpl() {
335 XMLString::release(&m_Id);
338 EncryptionPropertiesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
339 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
343 EncryptionPropertiesImpl(const EncryptionPropertiesImpl& src)
344 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
347 VectorOf(EncryptionProperty) v=getEncryptionPropertys();
348 for (vector<EncryptionProperty*>::const_iterator i=src.m_EncryptionPropertys.begin(); i!=src.m_EncryptionPropertys.end(); i++) {
350 v.push_back((*i)->cloneEncryptionProperty());
355 IMPL_XMLOBJECT_CLONE(EncryptionProperties);
357 IMPL_TYPED_CHILDREN(EncryptionProperty,m_children.end());
360 void marshallAttributes(DOMElement* domElement) const {
361 MARSHALL_ID_ATTRIB(Id,ID,NULL);
364 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
365 PROC_TYPED_CHILDREN(EncryptionProperty,XMLENC_NS,false);
366 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
369 void processAttribute(const DOMAttr* attribute) {
370 PROC_ID_ATTRIB(Id,ID,NULL);
371 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
375 class XMLTOOL_DLLLOCAL ReferenceTypeImpl : public virtual ReferenceType,
376 public AbstractElementProxy,
377 public AbstractDOMCachingXMLObject,
378 public AbstractXMLObjectMarshaller,
379 public AbstractXMLObjectUnmarshaller
386 ReferenceTypeImpl() {
391 virtual ~ReferenceTypeImpl() {
392 XMLString::release(&m_URI);
395 ReferenceTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
396 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
400 ReferenceTypeImpl(const ReferenceTypeImpl& src)
401 : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
403 setURI(src.getURI());
404 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
406 getXMLObjects().push_back((*i)->clone());
411 IMPL_XMLOBJECT_CLONE(ReferenceType);
412 IMPL_STRING_ATTRIB(URI);
415 void marshallAttributes(DOMElement* domElement) const {
416 MARSHALL_STRING_ATTRIB(URI,URI,NULL);
419 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
420 getXMLObjects().push_back(childXMLObject);
423 void processAttribute(const DOMAttr* attribute) {
424 PROC_STRING_ATTRIB(URI,URI,NULL);
425 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
429 class XMLTOOL_DLLLOCAL DataReferenceImpl : public virtual DataReference, public ReferenceTypeImpl
432 virtual ~DataReferenceImpl() {}
434 DataReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
435 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
437 DataReferenceImpl(const DataReferenceImpl& src) : AbstractXMLObject(src), ReferenceTypeImpl(src) {}
439 IMPL_XMLOBJECT_CLONE(DataReference);
440 ReferenceType* cloneReferenceType() const {
441 return new DataReferenceImpl(*this);
445 class XMLTOOL_DLLLOCAL KeyReferenceImpl : public virtual KeyReference, public ReferenceTypeImpl
448 virtual ~KeyReferenceImpl() {}
450 KeyReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
451 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
453 KeyReferenceImpl(const KeyReferenceImpl& src) : AbstractXMLObject(src), ReferenceTypeImpl(src) {}
455 IMPL_XMLOBJECT_CLONE(KeyReference);
456 ReferenceType* cloneReferenceType() const {
457 return new KeyReferenceImpl(*this);
461 class XMLTOOL_DLLLOCAL ReferenceListImpl : public virtual ReferenceList,
462 public AbstractComplexElement,
463 public AbstractDOMCachingXMLObject,
464 public AbstractXMLObjectMarshaller,
465 public AbstractXMLObjectUnmarshaller
468 virtual ~ReferenceListImpl() {}
470 ReferenceListImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
471 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
474 ReferenceListImpl(const ReferenceListImpl& src)
475 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
476 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
478 DataReference* data=dynamic_cast<DataReference*>(*i);
480 getDataReferences().push_back(data->cloneDataReference());
484 KeyReference* key=dynamic_cast<KeyReference*>(*i);
486 getKeyReferences().push_back(key->cloneKeyReference());
493 IMPL_XMLOBJECT_CLONE(ReferenceList);
494 IMPL_TYPED_CHILDREN(DataReference,m_children.end());
495 IMPL_TYPED_CHILDREN(KeyReference,m_children.end());
498 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
499 PROC_TYPED_CHILDREN(DataReference,XMLENC_NS,false);
500 PROC_TYPED_CHILDREN(KeyReference,XMLENC_NS,false);
501 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
505 class XMLTOOL_DLLLOCAL EncryptedTypeImpl : public virtual EncryptedType,
506 public AbstractComplexElement,
507 public AbstractDOMCachingXMLObject,
508 public AbstractXMLObjectMarshaller,
509 public AbstractXMLObjectUnmarshaller
512 m_Id=m_Type=m_MimeType=m_Encoding=NULL;
513 m_EncryptionMethod=NULL;
516 m_EncryptionProperties=NULL;
517 m_children.push_back(NULL);
518 m_children.push_back(NULL);
519 m_children.push_back(NULL);
520 m_children.push_back(NULL);
521 m_pos_EncryptionMethod=m_children.begin();
522 m_pos_KeyInfo=m_pos_EncryptionMethod;
524 m_pos_CipherData=m_pos_KeyInfo;
526 m_pos_EncryptionProperties=m_pos_CipherData;
527 ++m_pos_EncryptionProperties;
530 EncryptedTypeImpl() {
535 virtual ~EncryptedTypeImpl() {
536 XMLString::release(&m_Id);
537 XMLString::release(&m_Type);
538 XMLString::release(&m_MimeType);
539 XMLString::release(&m_Encoding);
542 EncryptedTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
543 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
547 EncryptedTypeImpl(const EncryptedTypeImpl& src)
548 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
551 setType(src.getType());
552 setMimeType(src.getMimeType());
553 setEncoding(src.getEncoding());
554 if (src.getEncryptionMethod())
555 setEncryptionMethod(src.getEncryptionMethod()->cloneEncryptionMethod());
556 if (src.getKeyInfo())
557 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
558 if (src.getCipherData())
559 setCipherData(src.getCipherData()->cloneCipherData());
560 if (src.getEncryptionProperties())
561 setEncryptionProperties(src.getEncryptionProperties()->cloneEncryptionProperties());
564 IMPL_XMLOBJECT_CLONE(EncryptedType);
566 IMPL_STRING_ATTRIB(Type);
567 IMPL_STRING_ATTRIB(MimeType);
568 IMPL_STRING_ATTRIB(Encoding);
569 IMPL_TYPED_CHILD(EncryptionMethod);
570 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
571 IMPL_TYPED_CHILD(CipherData);
572 IMPL_TYPED_CHILD(EncryptionProperties);
575 void marshallAttributes(DOMElement* domElement) const {
576 MARSHALL_ID_ATTRIB(Id,ID,NULL);
577 MARSHALL_STRING_ATTRIB(Type,TYPE,NULL);
578 MARSHALL_STRING_ATTRIB(MimeType,MIMETYPE,NULL);
579 MARSHALL_STRING_ATTRIB(Encoding,ENCODING,NULL);
582 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
583 PROC_TYPED_CHILD(EncryptionMethod,XMLENC_NS,false);
584 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
585 PROC_TYPED_CHILD(CipherData,XMLENC_NS,false);
586 PROC_TYPED_CHILD(EncryptionProperties,XMLENC_NS,false);
587 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
590 void processAttribute(const DOMAttr* attribute) {
591 PROC_ID_ATTRIB(Id,ID,NULL);
592 PROC_STRING_ATTRIB(Type,TYPE,NULL);
593 PROC_STRING_ATTRIB(MimeType,MIMETYPE,NULL);
594 PROC_STRING_ATTRIB(Encoding,ENCODING,NULL);
595 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
599 class XMLTOOL_DLLLOCAL EncryptedDataImpl : public virtual EncryptedData, public EncryptedTypeImpl
602 virtual ~EncryptedDataImpl() {}
604 EncryptedDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
605 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
607 EncryptedDataImpl(const EncryptedDataImpl& src) : AbstractXMLObject(src), EncryptedTypeImpl(src) {}
609 IMPL_XMLOBJECT_CLONE(EncryptedData);
610 EncryptedType* cloneEncryptedType() const {
611 return new EncryptedDataImpl(*this);
615 class XMLTOOL_DLLLOCAL EncryptedKeyImpl : public virtual EncryptedKey, public EncryptedTypeImpl
619 m_ReferenceList=NULL;
620 m_CarriedKeyName=NULL;
621 m_children.push_back(NULL);
622 m_children.push_back(NULL);
623 m_pos_ReferenceList=m_pos_EncryptionProperties;
624 ++m_pos_ReferenceList;
625 m_pos_CarriedKeyName=m_pos_ReferenceList;
626 ++m_pos_CarriedKeyName;
630 virtual ~EncryptedKeyImpl() {
631 XMLString::release(&m_Recipient);
634 EncryptedKeyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
635 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
639 EncryptedKeyImpl(const EncryptedKeyImpl& src) : AbstractXMLObject(src), EncryptedTypeImpl(src) {
643 IMPL_XMLOBJECT_CLONE(EncryptedKey);
644 EncryptedType* cloneEncryptedType() const {
645 return new EncryptedKeyImpl(*this);
647 IMPL_STRING_ATTRIB(Recipient);
648 IMPL_TYPED_CHILD(ReferenceList);
649 IMPL_TYPED_CHILD(CarriedKeyName);
652 void marshallAttributes(DOMElement* domElement) const {
653 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
654 EncryptedTypeImpl::marshallAttributes(domElement);
657 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
658 PROC_TYPED_CHILD(ReferenceList,XMLENC_NS,false);
659 PROC_TYPED_CHILD(CarriedKeyName,XMLENC_NS,false);
660 EncryptedTypeImpl::processChildElement(childXMLObject,root);
663 void processAttribute(const DOMAttr* attribute) {
664 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
665 EncryptedTypeImpl::processAttribute(attribute);
671 #if defined (_MSC_VER)
672 #pragma warning( pop )
675 // Builder Implementations
677 IMPL_XMLOBJECTBUILDER(CarriedKeyName);
678 IMPL_XMLOBJECTBUILDER(CipherData);
679 IMPL_XMLOBJECTBUILDER(CipherReference);
680 IMPL_XMLOBJECTBUILDER(CipherValue);
681 IMPL_XMLOBJECTBUILDER(DataReference);
682 IMPL_XMLOBJECTBUILDER(EncryptedData);
683 IMPL_XMLOBJECTBUILDER(EncryptedKey);
684 IMPL_XMLOBJECTBUILDER(EncryptionMethod);
685 IMPL_XMLOBJECTBUILDER(EncryptionProperties);
686 IMPL_XMLOBJECTBUILDER(EncryptionProperty);
687 IMPL_XMLOBJECTBUILDER(KeyReference);
688 IMPL_XMLOBJECTBUILDER(KeySize);
689 IMPL_XMLOBJECTBUILDER(OAEPparams);
690 IMPL_XMLOBJECTBUILDER(ReferenceList);
691 IMPL_XMLOBJECTBUILDER(Transforms);
695 const XMLCh CarriedKeyName::LOCAL_NAME[] = UNICODE_LITERAL_14(C,a,r,r,i,e,d,K,e,y,N,a,m,e);
696 const XMLCh CipherData::LOCAL_NAME[] = UNICODE_LITERAL_10(C,i,p,h,e,r,D,a,t,a);
697 const XMLCh CipherData::TYPE_NAME[] = UNICODE_LITERAL_14(C,i,p,h,e,r,D,a,t,a,T,y,p,e);
698 const XMLCh CipherReference::LOCAL_NAME[] = UNICODE_LITERAL_15(C,i,p,h,e,r,R,e,f,e,r,e,n,c,e);
699 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);
700 const XMLCh CipherReference::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I);
701 const XMLCh CipherValue::LOCAL_NAME[] = UNICODE_LITERAL_11(C,i,p,h,e,r,V,a,l,u,e);
702 const XMLCh DataReference::LOCAL_NAME[] = UNICODE_LITERAL_13(D,a,t,a,R,e,f,e,r,e,n,c,e);
703 const XMLCh EncryptedData::LOCAL_NAME[] = UNICODE_LITERAL_13(E,n,c,r,y,p,t,e,d,D,a,t,a);
704 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);
705 const XMLCh EncryptedKey::LOCAL_NAME[] = UNICODE_LITERAL_12(E,n,c,r,y,p,t,e,d,K,e,y);
706 const XMLCh EncryptedKey::TYPE_NAME[] = UNICODE_LITERAL_16(E,n,c,r,y,p,t,e,d,K,e,y,T,y,p,e);
707 const XMLCh EncryptedKey::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
708 const XMLCh EncryptedType::LOCAL_NAME[] = {chNull};
709 const XMLCh EncryptedType::TYPE_NAME[] = UNICODE_LITERAL_13(E,n,c,r,y,p,t,e,d,T,y,p,e);
710 const XMLCh EncryptedType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d);
711 const XMLCh EncryptedType::TYPE_ATTRIB_NAME[] = UNICODE_LITERAL_4(T,y,p,e);
712 const XMLCh EncryptedType::MIMETYPE_ATTRIB_NAME[] = UNICODE_LITERAL_8(M,i,m,e,T,y,p,e);
713 const XMLCh EncryptedType::ENCODING_ATTRIB_NAME[] = UNICODE_LITERAL_8(E,n,c,o,d,i,n,g);
714 const XMLCh EncryptionMethod::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,c,r,y,p,t,i,o,n,M,e,t,h,o,d);
715 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);
716 const XMLCh EncryptionMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
717 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);
718 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);
719 const XMLCh EncryptionProperties::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d);
720 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);
721 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);
722 const XMLCh EncryptionProperty::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d);
723 const XMLCh EncryptionProperty::TARGET_ATTRIB_NAME[] = UNICODE_LITERAL_6(T,a,r,g,e,t);
724 const XMLCh KeyReference::LOCAL_NAME[] = UNICODE_LITERAL_12(K,e,y,R,e,f,e,r,e,n,c,e);
725 const XMLCh KeySize::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,S,i,z,e);
726 const XMLCh OAEPparams::LOCAL_NAME[] = UNICODE_LITERAL_10(O,A,E,P,p,a,r,a,m,s);
727 const XMLCh ReferenceList::LOCAL_NAME[] = UNICODE_LITERAL_13(R,e,f,e,r,e,n,c,e,L,i,s,t);
728 const XMLCh ReferenceType::LOCAL_NAME[] = {chNull};
729 const XMLCh ReferenceType::TYPE_NAME[] = UNICODE_LITERAL_13(R,e,f,e,r,e,n,c,e,T,y,p,e);
730 const XMLCh ReferenceType::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I);
731 const XMLCh Transforms::LOCAL_NAME[] = UNICODE_LITERAL_10(T,r,a,n,s,f,o,r,m,s);
732 const XMLCh Transforms::TYPE_NAME[] = UNICODE_LITERAL_14(T,r,a,n,s,f,o,r,m,s,T,y,p,e);