From: cantor Date: Mon, 7 Jun 2010 19:00:25 +0000 (+0000) Subject: Partial addition of 1.1 KeyInfo extensions. X-Git-Tag: 1.4.1~87 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fxmltooling.git;a=commitdiff_plain;h=db70a35f52c64ceea914f7ce7365965d0f6104d2 Partial addition of 1.1 KeyInfo extensions. git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@751 de75baf8-a10c-0410-a50a-987c0e22f00f --- diff --git a/xmltooling/signature/KeyInfo.h b/xmltooling/signature/KeyInfo.h index 931caa9..25e72b8 100644 --- a/xmltooling/signature/KeyInfo.h +++ b/xmltooling/signature/KeyInfo.h @@ -56,6 +56,7 @@ namespace xmlsignature { DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,X509SubjectName,Name,XML Digital Signature version 20020212 X509SubjectName element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,X509Certificate,Value,XML Digital Signature version 20020212 X509Certificate element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,X509CRL,Value,XML Digital Signature version 20020212 X509CRL element); + DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,OCSPResponse,Response,XML Digital Signature version 1.1 OCSPResponse element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,SPKISexp,Value,XML Digital Signature version 20020212 SPKISexp element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,PGPKeyID,ID,XML Digital Signature version 20020212 PGPKeyID element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,PGPKeyPacket,Packet,XML Digital Signature version 20020212 PGPKeyPacket element); @@ -87,6 +88,13 @@ namespace xmlsignature { static const XMLCh TYPE_NAME[]; END_XMLOBJECT; + BEGIN_XMLOBJECT(XMLTOOL_API,DEREncodedKeyValue,xmltooling::XMLObject,XML Digital Signature version 1.1 DEREncodedKeyValue element); + DECL_STRING_ATTRIB(Id,ID); + DECL_SIMPLE_CONTENT(Value); + /** DEREncodedKeyValueType local name */ + static const XMLCh TYPE_NAME[]; + END_XMLOBJECT; + BEGIN_XMLOBJECT(XMLTOOL_API,Transform,xmltooling::ElementExtensibleXMLObject,XML Digital Signature version 20020212 Transform element); DECL_STRING_ATTRIB(Algorithm,ALGORITHM); DECL_TYPED_CHILDREN(XPath); @@ -162,11 +170,19 @@ namespace xmlsignature { static const XMLCh TYPE_NAME[]; END_XMLOBJECT; + BEGIN_XMLOBJECT(XMLTOOL_API,KeyInfoReference,xmltooling::XMLObject,XML Digital Signature version 1.1 KeyInfoReference element); + DECL_STRING_ATTRIB(Id,ID); + DECL_STRING_ATTRIB(URI,URI); + /** KeyInfoReferenceType local name */ + static const XMLCh TYPE_NAME[]; + END_XMLOBJECT; + DECL_XMLSIGOBJECTBUILDER(PGPData); DECL_XMLSIGOBJECTBUILDER(PGPKeyID); DECL_XMLSIGOBJECTBUILDER(PGPKeyPacket); DECL_XMLSIGOBJECTBUILDER(SPKIData); DECL_XMLSIGOBJECTBUILDER(SPKISexp); + DECL_XMLSIGOBJECTBUILDER(OCSPResponse); DECL_XMLSIGOBJECTBUILDER(X509IssuerSerial); DECL_XMLSIGOBJECTBUILDER(X509IssuerName); DECL_XMLSIGOBJECTBUILDER(X509SerialNumber); @@ -193,7 +209,9 @@ namespace xmlsignature { DECL_XMLSIGOBJECTBUILDER(DSAKeyValue); DECL_XMLSIGOBJECTBUILDER(RSAKeyValue); DECL_XMLSIGOBJECTBUILDER(KeyValue); + DECL_XMLSIGOBJECTBUILDER(DEREncodedKeyValue); DECL_XMLSIGOBJECTBUILDER(KeyInfo); + DECL_XMLSIGOBJECTBUILDER(KeyInfoReference); /** * Registers builders and validators for KeyInfo classes into the runtime. diff --git a/xmltooling/signature/impl/KeyInfoImpl.cpp b/xmltooling/signature/impl/KeyInfoImpl.cpp index 36c0280..d94b71c 100644 --- a/xmltooling/signature/impl/KeyInfoImpl.cpp +++ b/xmltooling/signature/impl/KeyInfoImpl.cpp @@ -234,6 +234,40 @@ namespace xmlsignature { } }; + class XMLTOOL_DLLLOCAL DEREncodedKeyValueImpl : public virtual DEREncodedKeyValue, + public AbstractSimpleElement, + public AbstractDOMCachingXMLObject, + public AbstractXMLObjectMarshaller, + public AbstractXMLObjectUnmarshaller + { + public: + virtual ~DEREncodedKeyValueImpl() { + XMLString::release(&m_Id); + } + + DEREncodedKeyValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Id(nullptr) { + } + + DEREncodedKeyValueImpl(const DEREncodedKeyValueImpl& src) + : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src), m_Id(nullptr) { + setId(src.getId()); + } + + IMPL_XMLOBJECT_CLONE(DEREncodedKeyValue); + IMPL_ID_ATTRIB(Id); + + protected: + void marshallAttributes(DOMElement* domElement) const { + MARSHALL_ID_ATTRIB(Id,ID,nullptr); + } + + void processAttribute(const DOMAttr* attribute) { + PROC_ID_ATTRIB(Id,ID,nullptr); + AbstractXMLObjectUnmarshaller::processAttribute(attribute); + } + }; + class XMLTOOL_DLLLOCAL TransformImpl : public virtual Transform, public AbstractComplexElement, public AbstractDOMCachingXMLObject, @@ -735,6 +769,52 @@ namespace xmlsignature { AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; + + class XMLTOOL_DLLLOCAL KeyInfoReferenceImpl : public virtual KeyInfoReference, + public AbstractComplexElement, + public AbstractDOMCachingXMLObject, + public AbstractXMLObjectMarshaller, + public AbstractXMLObjectUnmarshaller + { + public: + virtual ~KeyInfoReferenceImpl() { + XMLString::release(&m_Id); + XMLString::release(&m_URI); + } + + KeyInfoReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType) { + init(); + } + + KeyInfoReferenceImpl(const KeyInfoReferenceImpl& src) + : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { + init(); + setId(getId()); + setURI(getURI()); + } + + void init() { + m_Id=m_URI=nullptr; + } + + IMPL_XMLOBJECT_CLONE(KeyInfoReference); + IMPL_ID_ATTRIB(Id); + IMPL_STRING_ATTRIB(URI); + + protected: + void marshallAttributes(DOMElement* domElement) const { + MARSHALL_ID_ATTRIB(Id,ID,nullptr); + MARSHALL_STRING_ATTRIB(URI,URI,nullptr); + } + + void processAttribute(const DOMAttr* attribute) { + PROC_ID_ATTRIB(Id,ID,nullptr); + PROC_STRING_ATTRIB(URI,URI,nullptr); + AbstractXMLObjectUnmarshaller::processAttribute(attribute); + } + }; + DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,KeyName); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,MgmtData); @@ -754,6 +834,7 @@ namespace xmlsignature { DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,X509SubjectName); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,X509Certificate); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,X509CRL); + DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,OCSPResponse); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,SPKISexp); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,PGPKeyID); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,PGPKeyPacket); @@ -765,6 +846,7 @@ namespace xmlsignature { // Builder Implementations +IMPL_XMLOBJECTBUILDER(OCSPResponse); IMPL_XMLOBJECTBUILDER(X509IssuerSerial); IMPL_XMLOBJECTBUILDER(X509IssuerName); IMPL_XMLOBJECTBUILDER(X509SerialNumber); @@ -791,7 +873,9 @@ IMPL_XMLOBJECTBUILDER(J); IMPL_XMLOBJECTBUILDER(DSAKeyValue); IMPL_XMLOBJECTBUILDER(RSAKeyValue); IMPL_XMLOBJECTBUILDER(KeyValue); +IMPL_XMLOBJECTBUILDER(DEREncodedKeyValue); IMPL_XMLOBJECTBUILDER(KeyInfo); +IMPL_XMLOBJECTBUILDER(KeyInfoReference); IMPL_XMLOBJECTBUILDER(SPKISexp); IMPL_XMLOBJECTBUILDER(SPKIData); IMPL_XMLOBJECTBUILDER(PGPKeyID); @@ -800,43 +884,51 @@ IMPL_XMLOBJECTBUILDER(PGPData); // Unicode literals -const XMLCh KeyInfo::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,I,n,f,o); -const XMLCh KeyInfo::TYPE_NAME[] = UNICODE_LITERAL_11(K,e,y,I,n,f,o,T,y,p,e); -const XMLCh KeyInfo::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); -const XMLCh KeyValue::LOCAL_NAME[] = UNICODE_LITERAL_8(K,e,y,V,a,l,u,e); -const XMLCh KeyValue::TYPE_NAME[] = UNICODE_LITERAL_12(K,e,y,V,a,l,u,e,T,y,p,e); -const XMLCh DSAKeyValue::LOCAL_NAME[] = UNICODE_LITERAL_11(D,S,A,K,e,y,V,a,l,u,e); -const XMLCh DSAKeyValue::TYPE_NAME[] = UNICODE_LITERAL_15(D,S,A,K,e,y,V,a,l,u,e,T,y,p,e); -const XMLCh RSAKeyValue::LOCAL_NAME[] = UNICODE_LITERAL_11(R,S,A,K,e,y,V,a,l,u,e); -const XMLCh RSAKeyValue::TYPE_NAME[] = UNICODE_LITERAL_15(R,S,A,K,e,y,V,a,l,u,e,T,y,p,e); -const XMLCh MgmtData::LOCAL_NAME[] = UNICODE_LITERAL_8(M,g,m,t,D,a,t,a); -const XMLCh KeyName::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,N,a,m,e); -const XMLCh Modulus::LOCAL_NAME[] = UNICODE_LITERAL_7(M,o,d,u,l,u,s); -const XMLCh Exponent::LOCAL_NAME[] = UNICODE_LITERAL_8(E,x,p,o,n,e,n,t); -const XMLCh Seed::LOCAL_NAME[] = UNICODE_LITERAL_4(S,e,e,d); -const XMLCh PgenCounter::LOCAL_NAME[] = UNICODE_LITERAL_11(P,g,e,n,C,o,u,n,t,e,r); -const XMLCh P::LOCAL_NAME[] = UNICODE_LITERAL_1(P); -const XMLCh Q::LOCAL_NAME[] = UNICODE_LITERAL_1(Q); -const XMLCh G::LOCAL_NAME[] = UNICODE_LITERAL_1(G); -const XMLCh Y::LOCAL_NAME[] = UNICODE_LITERAL_1(Y); -const XMLCh J::LOCAL_NAME[] = UNICODE_LITERAL_1(J); -const XMLCh XPath::LOCAL_NAME[] = UNICODE_LITERAL_5(X,P,a,t,h); -const XMLCh Transform::LOCAL_NAME[] = UNICODE_LITERAL_9(T,r,a,n,s,f,o,r,m); -const XMLCh Transform::TYPE_NAME[] = UNICODE_LITERAL_13(T,r,a,n,s,f,o,r,m,T,y,p,e); -const XMLCh Transform::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m); -const XMLCh Transforms::LOCAL_NAME[] = UNICODE_LITERAL_10(T,r,a,n,s,f,o,r,m,s); -const XMLCh Transforms::TYPE_NAME[] = UNICODE_LITERAL_14(T,r,a,n,s,f,o,r,m,s,T,y,p,e); -const XMLCh RetrievalMethod::LOCAL_NAME[] = UNICODE_LITERAL_15(R,e,t,r,i,e,v,a,l,M,e,t,h,o,d); -const XMLCh RetrievalMethod::TYPE_NAME[] = UNICODE_LITERAL_19(R,e,t,r,i,e,v,a,l,M,e,t,h,o,d,T,y,p,e); -const XMLCh RetrievalMethod::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I); -const XMLCh RetrievalMethod::TYPE_ATTRIB_NAME[] = UNICODE_LITERAL_4(T,y,p,e); -const XMLCh SPKISexp::LOCAL_NAME[] = UNICODE_LITERAL_8(S,P,K,I,S,e,x,p); -const XMLCh SPKIData::LOCAL_NAME[] = UNICODE_LITERAL_8(S,P,K,I,D,a,t,a); -const XMLCh SPKIData::TYPE_NAME[] = UNICODE_LITERAL_12(S,P,K,I,D,a,t,a,T,y,p,e); -const XMLCh PGPKeyID::LOCAL_NAME[] = UNICODE_LITERAL_8(P,G,P,K,e,y,I,D); -const XMLCh PGPKeyPacket::LOCAL_NAME[] = UNICODE_LITERAL_12(P,G,P,K,e,y,P,a,c,k,e,t); -const XMLCh PGPData::LOCAL_NAME[] = UNICODE_LITERAL_7(P,G,P,D,a,t,a); -const XMLCh PGPData::TYPE_NAME[] = UNICODE_LITERAL_11(P,G,P,D,a,t,a,T,y,p,e); +const XMLCh KeyInfo::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,I,n,f,o); +const XMLCh KeyInfo::TYPE_NAME[] = UNICODE_LITERAL_11(K,e,y,I,n,f,o,T,y,p,e); +const XMLCh KeyInfo::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); +const XMLCh KeyInfoReference::LOCAL_NAME[] = UNICODE_LITERAL_16(K,e,y,I,n,f,o,R,e,f,e,r,e,n,c,e); +const XMLCh KeyInfoReference::TYPE_NAME[] = UNICODE_LITERAL_20(K,e,y,I,n,f,o,R,e,f,e,r,e,n,c,e,T,y,p,e); +const XMLCh KeyInfoReference::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); +const XMLCh KeyInfoReference::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I); +const XMLCh KeyValue::LOCAL_NAME[] = UNICODE_LITERAL_8(K,e,y,V,a,l,u,e); +const XMLCh KeyValue::TYPE_NAME[] = UNICODE_LITERAL_12(K,e,y,V,a,l,u,e,T,y,p,e); +const XMLCh DSAKeyValue::LOCAL_NAME[] = UNICODE_LITERAL_11(D,S,A,K,e,y,V,a,l,u,e); +const XMLCh DSAKeyValue::TYPE_NAME[] = UNICODE_LITERAL_15(D,S,A,K,e,y,V,a,l,u,e,T,y,p,e); +const XMLCh RSAKeyValue::LOCAL_NAME[] = UNICODE_LITERAL_11(R,S,A,K,e,y,V,a,l,u,e); +const XMLCh RSAKeyValue::TYPE_NAME[] = UNICODE_LITERAL_15(R,S,A,K,e,y,V,a,l,u,e,T,y,p,e); +const XMLCh DEREncodedKeyValue::LOCAL_NAME[] = UNICODE_LITERAL_18(D,E,R,E,n,c,o,d,e,d,K,e,y,V,a,l,u,e); +const XMLCh DEREncodedKeyValue::TYPE_NAME[] = UNICODE_LITERAL_22(D,E,R,E,n,c,o,d,e,d,K,e,y,V,a,l,u,e,T,y,p,e); +const XMLCh DEREncodedKeyValue::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); +const XMLCh MgmtData::LOCAL_NAME[] = UNICODE_LITERAL_8(M,g,m,t,D,a,t,a); +const XMLCh KeyName::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,N,a,m,e); +const XMLCh Modulus::LOCAL_NAME[] = UNICODE_LITERAL_7(M,o,d,u,l,u,s); +const XMLCh Exponent::LOCAL_NAME[] = UNICODE_LITERAL_8(E,x,p,o,n,e,n,t); +const XMLCh Seed::LOCAL_NAME[] = UNICODE_LITERAL_4(S,e,e,d); +const XMLCh PgenCounter::LOCAL_NAME[] = UNICODE_LITERAL_11(P,g,e,n,C,o,u,n,t,e,r); +const XMLCh P::LOCAL_NAME[] = UNICODE_LITERAL_1(P); +const XMLCh Q::LOCAL_NAME[] = UNICODE_LITERAL_1(Q); +const XMLCh G::LOCAL_NAME[] = UNICODE_LITERAL_1(G); +const XMLCh Y::LOCAL_NAME[] = UNICODE_LITERAL_1(Y); +const XMLCh J::LOCAL_NAME[] = UNICODE_LITERAL_1(J); +const XMLCh XPath::LOCAL_NAME[] = UNICODE_LITERAL_5(X,P,a,t,h); +const XMLCh Transform::LOCAL_NAME[] = UNICODE_LITERAL_9(T,r,a,n,s,f,o,r,m); +const XMLCh Transform::TYPE_NAME[] = UNICODE_LITERAL_13(T,r,a,n,s,f,o,r,m,T,y,p,e); +const XMLCh Transform::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m); +const XMLCh Transforms::LOCAL_NAME[] = UNICODE_LITERAL_10(T,r,a,n,s,f,o,r,m,s); +const XMLCh Transforms::TYPE_NAME[] = UNICODE_LITERAL_14(T,r,a,n,s,f,o,r,m,s,T,y,p,e); +const XMLCh RetrievalMethod::LOCAL_NAME[] = UNICODE_LITERAL_15(R,e,t,r,i,e,v,a,l,M,e,t,h,o,d); +const XMLCh RetrievalMethod::TYPE_NAME[] = UNICODE_LITERAL_19(R,e,t,r,i,e,v,a,l,M,e,t,h,o,d,T,y,p,e); +const XMLCh RetrievalMethod::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I); +const XMLCh RetrievalMethod::TYPE_ATTRIB_NAME[] = UNICODE_LITERAL_4(T,y,p,e); +const XMLCh SPKISexp::LOCAL_NAME[] = UNICODE_LITERAL_8(S,P,K,I,S,e,x,p); +const XMLCh SPKIData::LOCAL_NAME[] = UNICODE_LITERAL_8(S,P,K,I,D,a,t,a); +const XMLCh SPKIData::TYPE_NAME[] = UNICODE_LITERAL_12(S,P,K,I,D,a,t,a,T,y,p,e); +const XMLCh PGPKeyID::LOCAL_NAME[] = UNICODE_LITERAL_8(P,G,P,K,e,y,I,D); +const XMLCh PGPKeyPacket::LOCAL_NAME[] = UNICODE_LITERAL_12(P,G,P,K,e,y,P,a,c,k,e,t); +const XMLCh PGPData::LOCAL_NAME[] = UNICODE_LITERAL_7(P,G,P,D,a,t,a); +const XMLCh PGPData::TYPE_NAME[] = UNICODE_LITERAL_11(P,G,P,D,a,t,a,T,y,p,e); +const XMLCh OCSPResponse::LOCAL_NAME[] = UNICODE_LITERAL_12(O,C,S,P,R,e,s,p,o,n,s,e); #define XCH(ch) chLatin_##ch #define XNUM(d) chDigit_##d diff --git a/xmltooling/signature/impl/KeyInfoSchemaValidators.cpp b/xmltooling/signature/impl/KeyInfoSchemaValidators.cpp index 22684ca..47da2fe 100644 --- a/xmltooling/signature/impl/KeyInfoSchemaValidators.cpp +++ b/xmltooling/signature/impl/KeyInfoSchemaValidators.cpp @@ -1,5 +1,5 @@ /* -* Copyright 2001-2009 Internet2 +* Copyright 2001-2010 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ /** * KeyInfoSchemaValidators.cpp * - * Schema validators for KeyInfo schema + * Schema validators for KeyInfo schema. */ #include "internal.h" @@ -30,6 +30,7 @@ using namespace xmlsignature; using namespace xmltooling; using namespace std; using xmlconstants::XMLSIG_NS; +using xmlconstants::XMLSIG11_NS; namespace xmlsignature { @@ -51,9 +52,11 @@ namespace xmlsignature { XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,X509SubjectName); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,X509Certificate); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,X509CRL); + XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,OCSPResponse); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,SPKISexp); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,PGPKeyID); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,PGPKeyPacket); + XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,DEREncodedKeyValue); BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,RSAKeyValue); XMLOBJECTVALIDATOR_REQUIRE(RSAKeyValue,Modulus); @@ -122,6 +125,10 @@ namespace xmlsignature { for_each(anys.begin(),anys.end(),checkWildcardNS()); END_XMLOBJECTVALIDATOR; + BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,KeyInfoReference); + XMLOBJECTVALIDATOR_REQUIRE(KeyInfoReference,URI); + END_XMLOBJECTVALIDATOR; + }; #define REGISTER_ELEMENT(namespaceURI,cname) \ @@ -180,4 +187,10 @@ void xmlsignature::registerKeyInfoClasses() REGISTER_TYPE(XMLSIG_NS,X509Data); REGISTER_TYPE(XMLSIG_NS,SPKIData); REGISTER_TYPE(XMLSIG_NS,PGPData); + + REGISTER_ELEMENT(XMLSIG11_NS,OCSPResponse); + REGISTER_ELEMENT(XMLSIG11_NS,DEREncodedKeyValue); + REGISTER_ELEMENT(XMLSIG11_NS,KeyInfoReference); + REGISTER_TYPE(XMLSIG11_NS,DEREncodedKeyValue); + REGISTER_TYPE(XMLSIG11_NS,KeyInfoReference); } diff --git a/xmltooling/util/XMLConstants.cpp b/xmltooling/util/XMLConstants.cpp index 94ea5dc..77210c3 100644 --- a/xmltooling/util/XMLConstants.cpp +++ b/xmltooling/util/XMLConstants.cpp @@ -73,6 +73,15 @@ const XMLCh xmlconstants::XMLSIG_NS[] = // http://www.w3.org/2000/09/xmldsig# const XMLCh xmlconstants::XMLSIG_PREFIX[] = { chLatin_d, chLatin_s, chNull }; +const XMLCh xmlconstants::XMLSIG11_NS[] = // http://www.w3.org/2009/xmldsig11# +{ chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, + chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, + chDigit_2, chDigit_0, chDigit_0, chDigit_9, chForwardSlash, + chLatin_x, chLatin_m, chLatin_l, chLatin_d, chLatin_s, chLatin_i, chLatin_g, chDigit_1, chDigit_1, chPound, chNull +}; + +const XMLCh xmlconstants::XMLSIG11_PREFIX[] = { chLatin_d, chLatin_s, chDigit_1, chDigit_1, chNull }; + const XMLCh xmlconstants::XMLENC_NS[] = // http://www.w3.org/2001/04/xmlenc# { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, diff --git a/xmltooling/util/XMLConstants.h b/xmltooling/util/XMLConstants.h index e012b70..0712209 100644 --- a/xmltooling/util/XMLConstants.h +++ b/xmltooling/util/XMLConstants.h @@ -60,6 +60,12 @@ namespace xmlconstants { /** XML Signature QName prefix ("ds") */ extern XMLTOOL_API const XMLCh XMLSIG_PREFIX[]; + + /** XML Signature namespace ("http://www.w3.org/2009/xmldsig11#") */ + extern XMLTOOL_API const XMLCh XMLSIG11_NS[]; + + /** XML Signature QName prefix ("ds11") */ + extern XMLTOOL_API const XMLCh XMLSIG11_PREFIX[]; /** XML Encryption namespace ("http://www.w3.org/2001/04/xmlenc#") */ extern XMLTOOL_API const XMLCh XMLENC_NS[];