blautenb    2003/11/23 01:12:44

  Modified:    c/src/dsig DSIGKeyInfoList.cpp
               c/src/tools/cipher cipher.cpp
               c/src/tools/xtest xtest.cpp
               c/src/xenc XENCCipherReference.hpp XENCCipherValue.hpp
                        XENCEncryptedData.hpp XENCEncryptedKey.hpp
                        XENCEncryptedType.hpp XENCEncryptionMethod.hpp
               c/src/xenc/impl XENCCipherDataImpl.cpp XENCCipherImpl.cpp
                        XENCCipherReferenceImpl.cpp
                        XENCCipherReferenceImpl.hpp XENCCipherValueImpl.cpp
                        XENCCipherValueImpl.hpp XENCEncryptedDataImpl.cpp
                        XENCEncryptedDataImpl.hpp XENCEncryptedKeyImpl.cpp
                        XENCEncryptedKeyImpl.hpp XENCEncryptedTypeImpl.cpp
                        XENCEncryptedTypeImpl.hpp
                        XENCEncryptionMethodImpl.cpp
                        XENCEncryptionMethodImpl.hpp
  Log:
  Code cleanup and standardisation
  
  Revision  Changes    Path
  1.16      +2 -2      xml-security/c/src/dsig/DSIGKeyInfoList.cpp
  
  Index: DSIGKeyInfoList.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/dsig/DSIGKeyInfoList.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DSIGKeyInfoList.cpp       28 Oct 2003 11:05:49 -0000      1.15
  +++ DSIGKeyInfoList.cpp       23 Nov 2003 09:12:43 -0000      1.16
  @@ -201,7 +201,7 @@
   
        else if (strEquals(getXENCLocalName(ki), "EncryptedKey")) {
   
  -             XSECnew(k, XENCEncryptedKeyImpl(mp_env, ki));
  +             XSECnew(k, XENCEncryptedKeyImpl(mp_env, (DOMElement *) ki));
                
        }
   
  
  
  
  1.13      +2 -2      xml-security/c/src/tools/cipher/cipher.cpp
  
  Index: cipher.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/cipher/cipher.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- cipher.cpp        11 Nov 2003 11:31:15 -0000      1.12
  +++ cipher.cpp        23 Nov 2003 09:12:43 -0000      1.13
  @@ -699,7 +699,7 @@
   
                                // Replace the document element
                                DOMElement * elt = doc->getDocumentElement();
  -                             doc->replaceChild(xenc->getDOMNode(), elt);
  +                             doc->replaceChild(xenc->getElement(), elt);
                                elt->release();
                        }
                        else {
  
  
  
  1.37      +5 -5      xml-security/c/src/tools/xtest/xtest.cpp
  
  Index: xtest.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/xtest/xtest.cpp,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- xtest.cpp 22 Nov 2003 09:59:32 -0000      1.36
  +++ xtest.cpp 23 Nov 2003 09:12:44 -0000      1.37
  @@ -1050,7 +1050,7 @@
                XENCEncryptedData * xenc = 
                        
cipher->createEncryptedData(XENCCipherData::REFERENCE_TYPE, 
DSIGConstants::s_unicodeStrURIAES128_CBC, MAKE_UNICODE_STRING("#CipherText"));
   
  -             rootElem->appendChild(xenc->getDOMNode());
  +             rootElem->appendChild(xenc->getElement());
   
                // Now create the data that is referenced
                DOMElement * cipherVal = 
doc->createElement(MAKE_UNICODE_STRING("MyCipherValue"));
  @@ -1270,7 +1270,7 @@
                encryptedKey = cipher->encryptKey(toEncryptStr, strlen((char *) 
toEncryptStr), em);
                Janitor<XENCEncryptedKey> j_encryptedKey(encryptedKey);
   
  -             rootElem->appendChild(encryptedKey->getDOMNode());
  +             rootElem->appendChild(encryptedKey->getElement());
   
                // Decrypt
                cerr << "decrypt ... ";
  @@ -1531,7 +1531,7 @@
                cerr << "done\nAdding Encoding and MimeType ... ";
   
                // Add MimeType and Encoding
  -             encryptedData->setEncodingURI(s_tstEncoding);
  +             encryptedData->setEncoding(s_tstEncoding);
                encryptedData->setMimeType(s_tstMimeType);
   
                // Set a KeySize
  @@ -1673,7 +1673,7 @@
                        cerr << "Bad MimeType" << endl;
                        exit(1);
                }
  -             if (encryptedData->getEncodingURI() == NULL || 
!strEquals(encryptedData->getEncodingURI(), s_tstEncoding)) {
  +             if (encryptedData->getEncoding() == NULL || 
!strEquals(encryptedData->getEncoding(), s_tstEncoding)) {
                        cerr << "Bad Encoding" << endl;
                        exit(1);
                }
  
  
  
  1.2       +31 -7     xml-security/c/src/xenc/XENCCipherReference.hpp
  
  Index: XENCCipherReference.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/XENCCipherReference.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XENCCipherReference.hpp   10 Nov 2003 22:10:37 -0000      1.1
  +++ XENCCipherReference.hpp   23 Nov 2003 09:12:44 -0000      1.2
  @@ -81,6 +81,7 @@
   class DSIGTransformXSL;
   class DSIGTransformC14n;
   
  +XSEC_DECLARE_XERCES_CLASS(DOMElement);
   XSEC_DECLARE_XERCES_CLASS(DOMNode);
   
   /**
  @@ -89,11 +90,34 @@
    */
   
   /**
  - * @brief Interface definition for the CipherValue object
  + * @brief Interface definition for the CipherReference object
    *
  - * The \<CipherValue\> element holds the base64 encoded, encrypted data.
  - * This is a very simple class that acts purely as a holder of data.
  + * The \<CipherReference\> element provides the information necessary for
  + * an application to find the data being referenced.  Like a Reference in
  + * XML-DSIG, the CipherReference starts with a URI that provides the base
  + * location of the data in question.
    *
  + * A list of transforms may then be provided, which the library will apply
  + * to the data found at the provided URI.  It is expected that the result of
  + * these transforms will be the raw encrypted octets,
  + *
  + * The schema for CipherReference is as follows:
  + *
  + * \verbatim
  +  <element name='CipherReference' type='xenc:CipherReferenceType'/>
  +   <complexType name='CipherReferenceType'>
  +       <sequence>
  +         <element name='Transforms' type='xenc:TransformsType' 
minOccurs='0'/>
  +       </sequence>
  +       <attribute name='URI' type='anyURI' use='required'/>
  +   </complexType>
  +
  +    <complexType name='TransformsType'>
  +       <sequence>
  +         <element ref='ds:Transform' maxOccurs='unbounded'/> 
  +       </sequence>
  +     </complexType>
  +\endverbatim
    */
   
   
  @@ -120,7 +144,7 @@
         * obtain information about the transforms and also change the the 
transforms
         */
   
  -     virtual DSIGTransformList * getTransforms(void) = 0;
  +     virtual DSIGTransformList * getTransforms(void) const = 0;
   
        /**
         * \brief Obtain the URI for this CipherReference
  @@ -128,7 +152,7 @@
         * @returns A pointer to the URI string for this CipherReference
         */
   
  -     virtual const XMLCh * getURI (void) = 0;
  +     virtual const XMLCh * getURI (void) const = 0;
        
        /**
         * \brief Get the DOM Node of this structure
  @@ -136,7 +160,7 @@
         * @returns the DOM Node representing the <CipherValue> element
         */
   
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getDOMNode(void) = 0;
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const = 0;
   
        //@}
   
  
  
  
  1.4       +5 -4      xml-security/c/src/xenc/XENCCipherValue.hpp
  
  Index: XENCCipherValue.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/XENCCipherValue.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XENCCipherValue.hpp       17 Sep 2003 10:10:21 -0000      1.3
  +++ XENCCipherValue.hpp       23 Nov 2003 09:12:44 -0000      1.4
  @@ -73,7 +73,7 @@
   
   #include <xsec/framework/XSECDefs.hpp>
   
  -XSEC_DECLARE_XERCES_CLASS(DOMNode);
  +XSEC_DECLARE_XERCES_CLASS(DOMElement);
   
   /**
    * @ingroup xenc
  @@ -115,7 +115,7 @@
         * @returns The Encrypted information in a base64 encoded string
         */
   
  -     virtual const XMLCh * getCipherString(void) = 0;
  +     virtual const XMLCh * getCipherString(void) const = 0;
   
        /**
         * \brief Get the DOM Node of this structure
  @@ -123,7 +123,7 @@
         * @returns the DOM Node representing the <CipherValue> element
         */
   
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getDOMNode(void) = 0;
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const = 0;
   
        //@}
   
  @@ -144,6 +144,7 @@
        virtual void setCipherString(const XMLCh * value) = 0;
   
        //@}
  +
   private:
   
        // Unimplemented
  
  
  
  1.3       +13 -1     xml-security/c/src/xenc/XENCEncryptedData.hpp
  
  Index: XENCEncryptedData.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/XENCEncryptedData.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XENCEncryptedData.hpp     8 Sep 2003 12:07:49 -0000       1.2
  +++ XENCEncryptedData.hpp     23 Nov 2003 09:12:44 -0000      1.3
  @@ -91,6 +91,18 @@
    * In general, this class should not be used directly.  For most
    * applications, callers will want to use the XENCCipher class
    * instead.
  + *
  + * The schema for EncryptedData is as follows:
  + * 
  + * \verbatim
  +  <element name='EncryptedData' type='xenc:EncryptedDataType'/>
  +  <complexType name='EncryptedDataType'>
  +    <complexContent>
  +     <extension base='xenc:EncryptedType'>
  +     </extension>
  +    </complexContent>
  +  </complexType>
  +\endverbatim
    */
   
   
  
  
  
  1.3       +20 -3     xml-security/c/src/xenc/XENCEncryptedKey.hpp
  
  Index: XENCEncryptedKey.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/XENCEncryptedKey.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XENCEncryptedKey.hpp      4 Nov 2003 11:28:36 -0000       1.2
  +++ XENCEncryptedKey.hpp      23 Nov 2003 09:12:44 -0000      1.3
  @@ -91,6 +91,23 @@
    * In general, this class should not be used directly.  For most
    * applications, callers will want to use the XENCCipher class
    * instead.
  + *
  + * The schema definition for EncryptedKey is as follows:
  + *
  + * \verbatim
  +  <element name='EncryptedKey' type='xenc:EncryptedKeyType'/>
  +  <complexType name='EncryptedKeyType'>
  +    <complexContent>
  +      <extension base='xenc:EncryptedType'>
  +        <sequence>
  +          <element ref='xenc:ReferenceList' minOccurs='0'/>
  +          <element name='CarriedKeyName' type='string' minOccurs='0'/>
  +        </sequence>
  +        <attribute name='Recipient' type='string' use='optional'/>
  +      </extension>
  +    </complexContent>   
  +  </complexType>
  +\endverbatim
    */
   
   
  @@ -127,7 +144,7 @@
         * (or NULL if none)
         */
   
  -     virtual const XMLCh * getCarriedKeyName(void) = 0;
  +     virtual const XMLCh * getCarriedKeyName(void) const = 0;
   
        /**
         * \brief Get the Recipient name
  @@ -142,7 +159,7 @@
         * (or NULL if none provided).
         */
   
  -     virtual const XMLCh * getRecipient(void) = 0;
  +     virtual const XMLCh * getRecipient(void) const = 0;
   
        //@}
   
  
  
  
  1.9       +28 -13    xml-security/c/src/xenc/XENCEncryptedType.hpp
  
  Index: XENCEncryptedType.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/XENCEncryptedType.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XENCEncryptedType.hpp     26 Oct 2003 11:33:13 -0000      1.8
  +++ XENCEncryptedType.hpp     23 Nov 2003 09:12:44 -0000      1.9
  @@ -100,6 +100,24 @@
    *
    * In general derived objects should not be used directly.
    * The XENCCipher class should be used to operate on them.
  + *
  + * The schema definition for EncryptedType is as follows :
  + *
  + * \verbatim
  +  <complexType name='EncryptedType' abstract='true'>
  +    <sequence>
  +      <element name='EncryptionMethod' type='xenc:EncryptionMethodType' 
  +               minOccurs='0'/>
  +      <element ref='ds:KeyInfo' minOccurs='0'/>
  +      <element ref='xenc:CipherData'/>
  +      <element ref='xenc:EncryptionProperties' minOccurs='0'/>
  +    </sequence>
  +    <attribute name='Id' type='ID' use='optional'/>
  +    <attribute name='Type' type='anyURI' use='optional'/>
  +    <attribute name='MimeType' type='string' use='optional'/>
  +    <attribute name='Encoding' type='anyURI' use='optional'/> 
  +   </complexType>
  +  \endverbatim
    */
   
   
  @@ -128,7 +146,7 @@
         * @returns The CipherData object
         */
   
  -     virtual XENCCipherData * getCipherData(void) = 0;
  +     virtual XENCCipherData * getCipherData(void) const = 0;
   
        /**
         * \brief Retrieve the EncryptionMethod element
  @@ -142,18 +160,15 @@
         * @returns The EncryptionMethod element
         */
   
  -     virtual XENCEncryptionMethod * getEncryptionMethod(void) = 0;
  +     virtual XENCEncryptionMethod * getEncryptionMethod(void) const = 0;
   
        /**
  -      * \brief Retrieve the DOM Node that heads up the structure
  +      * \brief Get the DOM Element Node of this structure
         *
  -      * If this object has been fully created, this call will provide
  -      * the element node that heads up this structure
  -      *
  -      * @returns the DOMNode that heads up this structure
  +      * @returns the DOM Element Node representing the \<EncryptionType\> 
element
         */
   
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getDOMNode() = 0;
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const = 0;
   
        //@}
   
  @@ -172,7 +187,7 @@
         * or NULL if no type is set
         */
   
  -     virtual const XMLCh * getTypeURI(void) const = 0;
  +     virtual const XMLCh * getType(void) const = 0;
   
        /**
         * \brief Get the MimeType of the EncryptedType
  @@ -203,7 +218,7 @@
         * @returns A string (owned by the library) providing the encoding URI
         */
   
  -     virtual const XMLCh * getEncodingURI(void) const = 0;
  +     virtual const XMLCh * getEncoding(void) const = 0;
   
        //@}
   
  @@ -222,7 +237,7 @@
         * @param uri The URI to set
         */
   
  -     virtual void setTypeURI(const XMLCh * uri) = 0;
  +     virtual void setType(const XMLCh * uri) = 0;
   
        /**
         * \brief Set the MimeType of the EncryptedType
  @@ -256,7 +271,7 @@
         * simply sets the value of the Encoding attribute to this value.
         */
   
  -     virtual void setEncodingURI(const XMLCh * uri) = 0;
  +     virtual void setEncoding(const XMLCh * uri) = 0;
   
        //@}
   
  
  
  
  1.7       +6 -6      xml-security/c/src/xenc/XENCEncryptionMethod.hpp
  
  Index: XENCEncryptionMethod.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/XENCEncryptionMethod.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XENCEncryptionMethod.hpp  20 Nov 2003 10:15:08 -0000      1.6
  +++ XENCEncryptionMethod.hpp  23 Nov 2003 09:12:44 -0000      1.7
  @@ -123,7 +123,7 @@
         * @returns the URI representing the algorithm
         */
   
  -     virtual const XMLCh * getAlgorithm(void) = 0;
  +     virtual const XMLCh * getAlgorithm(void) const = 0;
   
        /**
         * \brief Get the digest method URI
  @@ -134,7 +134,7 @@
         * @returns the URI representing the digest method algorithm
         */
   
  -     virtual const XMLCh * getDigestMethod(void) = 0;
  +     virtual const XMLCh * getDigestMethod(void) const = 0;
   
        /**
         * \brief Get the value of the OAEPparams string
  @@ -145,7 +145,7 @@
         * @returns The string (base64 encoded value) representing the OAEP 
params
         */
   
  -     virtual const XMLCh * getOAEPparams(void) = 0;
  +     virtual const XMLCh * getOAEPparams(void) const = 0;
   
        /**
         * \brief Get the KeySize that was set in this EncryptionMethod.
  @@ -155,7 +155,7 @@
         * mainly for stream ciphers that have a variable key length
         */
   
  -     virtual int getKeySize(void) = 0;
  +     virtual int getKeySize(void) const = 0;
   
        /**
         * \brief Get the DOM Element Node of this structure
  @@ -163,7 +163,7 @@
         * @returns the DOM Element Node representing the \<EncryptionMethod\> 
element
         */
   
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) = 
0;
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const = 0;
   
   
        //@}
  
  
  
  1.9       +2 -2      xml-security/c/src/xenc/impl/XENCCipherDataImpl.cpp
  
  Index: XENCCipherDataImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCCipherDataImpl.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XENCCipherDataImpl.cpp    10 Nov 2003 22:10:37 -0000      1.8
  +++ XENCCipherDataImpl.cpp    23 Nov 2003 09:12:44 -0000      1.9
  @@ -188,7 +188,7 @@
        // Find out whether this is a CipherValue or CipherReference and load
        // appropriately
   
  -     DOMNode *tmpElt = findFirstChildOfType(mp_cipherDataNode, 
DOMNode::ELEMENT_NODE);
  +     DOMElement *tmpElt = findFirstElementChild(mp_cipherDataNode);
   
        if (tmpElt != NULL && strEquals(getXENCLocalName(tmpElt), 
s_CipherValue)) {
   
  
  
  
  1.16      +9 -9      xml-security/c/src/xenc/impl/XENCCipherImpl.cpp
  
  Index: XENCCipherImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCCipherImpl.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- XENCCipherImpl.cpp        10 Nov 2003 02:48:23 -0000      1.15
  +++ XENCCipherImpl.cpp        23 Nov 2003 09:12:44 -0000      1.16
  @@ -449,13 +449,13 @@
                delete mp_encryptedData;
   
        XSECnew(mp_encryptedData, 
  -             XENCEncryptedDataImpl(mp_env, dynamic_cast<DOMNode 
*>(element)));
  +             XENCEncryptedDataImpl(mp_env, element));
   
        // Load
        mp_encryptedData->load();
   
        // Check that this is a valid type
  -     const XMLCh * typeURI = mp_encryptedData->getTypeURI();
  +     const XMLCh * typeURI = mp_encryptedData->getType();
   
        if (typeURI != NULL && 
                !strEquals(typeURI, DSIGConstants::s_unicodeStrURIXENC_ELEMENT) 
&&
  @@ -566,7 +566,7 @@
                delete mp_encryptedData;
   
        XSECnew(mp_encryptedData, 
  -             XENCEncryptedDataImpl(mp_env, dynamic_cast<DOMNode 
*>(element)));
  +             XENCEncryptedDataImpl(mp_env, element));
   
        // Load
        mp_encryptedData->load();
  @@ -736,7 +736,7 @@
   
        XENCEncryptedKeyImpl * encryptedKey;
        XSECnew(encryptedKey, 
  -             XENCEncryptedKeyImpl(mp_env, dynamic_cast<DOMNode *>(keyNode)));
  +             XENCEncryptedKeyImpl(mp_env, keyNode));
        Janitor<XENCEncryptedKeyImpl> j_encryptedKey(encryptedKey);
   
        // Load
  @@ -1018,7 +1018,7 @@
   
        encryptTXFMChain(c, em, algorithmURI);
   
  -     
mp_encryptedData->setTypeURI(DSIGConstants::s_unicodeStrURIXENC_ELEMENT);
  +     mp_encryptedData->setType(DSIGConstants::s_unicodeStrURIXENC_ELEMENT);
   
        // Replace original element
        DOMNode * p = element->getParentNode();
  @@ -1028,7 +1028,7 @@
                        "XENCCipherImpl::encryptElement - Passed in element has 
no parent");
        }
   
  -     p->replaceChild(mp_encryptedData->getDOMNode(), element);
  +     p->replaceChild(mp_encryptedData->getElement(), element);
   
        // Clear up the old child
        element->release();
  @@ -1091,7 +1091,7 @@
   
        encryptTXFMChain(c, em, algorithmURI);
   
  -     
mp_encryptedData->setTypeURI(DSIGConstants::s_unicodeStrURIXENC_CONTENT);
  +     mp_encryptedData->setType(DSIGConstants::s_unicodeStrURIXENC_CONTENT);
   
        // Delete current children 
        n = element->getFirstChild();
  @@ -1105,7 +1105,7 @@
        }
        
        // Now add the EncryptedData
  -     element->appendChild(mp_encryptedData->getDOMNode());
  +     element->appendChild(mp_encryptedData->getElement());
   
        return mp_doc;
   
  
  
  
  1.2       +34 -47    xml-security/c/src/xenc/impl/XENCCipherReferenceImpl.cpp
  
  Index: XENCCipherReferenceImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCCipherReferenceImpl.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XENCCipherReferenceImpl.cpp       10 Nov 2003 22:10:37 -0000      1.1
  +++ XENCCipherReferenceImpl.cpp       23 Nov 2003 09:12:44 -0000      1.2
  @@ -132,18 +132,18 @@
   
   XENCCipherReferenceImpl::XENCCipherReferenceImpl(const XSECEnv * env) :
   mp_env(env),
  -mp_cipherReferenceNode(NULL),
  -mp_uriAttributeNode(NULL),
  -mp_transformsNode(NULL),
  +mp_cipherReferenceElement(NULL),
  +mp_uriAttr(NULL),
  +mp_transformsElement(NULL),
   mp_transformList(NULL) {
   
   }
   
  -XENCCipherReferenceImpl::XENCCipherReferenceImpl(const XSECEnv * env, 
DOMNode * node) :
  +XENCCipherReferenceImpl::XENCCipherReferenceImpl(const XSECEnv * env, 
DOMElement * node) :
   mp_env(env),
  -mp_cipherReferenceNode(node),
  -mp_uriAttributeNode(NULL),
  -mp_transformsNode(NULL),
  +mp_cipherReferenceElement(node),
  +mp_uriAttr(NULL),
  +mp_transformsElement(NULL),
   mp_transformList(NULL) {
   
   }
  @@ -169,15 +169,15 @@
   
        prefix = mp_env->getXENCNSPrefix();
        
  -     if (mp_transformsNode == NULL) {
  +     if (mp_transformsElement == NULL) {
   
                // Need to create a transforms node
                makeQName(str, prefix, "Transforms");
  -             mp_transformsNode = 
doc->createElementNS(DSIGConstants::s_unicodeStrURIXENC, str.rawXMLChBuffer());
  -             mp_env->doPrettyPrint(mp_cipherReferenceNode);
  -             mp_cipherReferenceNode->appendChild(mp_transformsNode);
  -             mp_env->doPrettyPrint(mp_transformsNode);
  -             mp_env->doPrettyPrint(mp_cipherReferenceNode);
  +             mp_transformsElement = 
doc->createElementNS(DSIGConstants::s_unicodeStrURIXENC, str.rawXMLChBuffer());
  +             mp_env->doPrettyPrint(mp_cipherReferenceElement);
  +             mp_cipherReferenceElement->appendChild(mp_transformsElement);
  +             mp_env->doPrettyPrint(mp_transformsElement);
  +             mp_env->doPrettyPrint(mp_cipherReferenceElement);
   
                // Create the list
                XSECnew(mp_transformList, DSIGTransformList());
  @@ -192,8 +192,8 @@
        if (mp_transformList == NULL)
                createTransformList();
   
  -     mp_transformsNode->appendChild(txfmElt);
  -     mp_env->doPrettyPrint(mp_transformsNode);
  +     mp_transformsElement->appendChild(txfmElt);
  +     mp_env->doPrettyPrint(mp_transformsElement);
   
        mp_transformList->addTransform(txfm);
   }
  @@ -277,7 +277,7 @@
   
   void XENCCipherReferenceImpl::load(void) {
   
  -     if (mp_cipherReferenceNode == NULL) {
  +     if (mp_cipherReferenceElement == NULL) {
   
                // Attempt to load an empty encryptedType element
                throw XSECException(XSECException::CipherReferenceError,
  @@ -285,7 +285,7 @@
   
        }
   
  -     if (!strEquals(getXENCLocalName(mp_cipherReferenceNode), 
s_CipherReference)) {
  +     if (!strEquals(getXENCLocalName(mp_cipherReferenceElement), 
s_CipherReference)) {
        
                throw XSECException(XSECException::CipherReferenceError,
                        "XENCCipherReference::load - called incorrect node");
  @@ -293,15 +293,9 @@
        }
   
        // Find the URI attribute
  -     DOMNamedNodeMap * tmpAtts = mp_cipherReferenceNode->getAttributes();
  +     mp_uriAttr = mp_cipherReferenceElement->getAttributeNodeNS(NULL, 
DSIGConstants::s_unicodeStrURI);
   
  -     if (tmpAtts != NULL) {
  -
  -             mp_uriAttributeNode = 
tmpAtts->getNamedItem(DSIGConstants::s_unicodeStrURI);
  -
  -     }
  -
  -     if (mp_uriAttributeNode == NULL) {
  +     if (mp_uriAttr == NULL) {
   
                throw XSECException(XSECException::CipherReferenceError,
                        "XENCCipherReference::load - URI attribute not found");
  @@ -309,7 +303,7 @@
        }
   
        // See if there are any transforms
  -     DOMNode * c = findFirstChildOfType(mp_cipherReferenceNode, 
DOMNode::ELEMENT_NODE);
  +     DOMElement * c = findFirstElementChild(mp_cipherReferenceElement);
        if (c != NULL) {
   
                if (!strEquals(getXENCLocalName(c), s_Transforms)) {
  @@ -319,7 +313,7 @@
   
                }
   
  -             mp_transformsNode = c;
  +             mp_transformsElement = c;
   
                XSECSafeBufferFormatter * formatter;
                XSECnew(formatter, 
XSECSafeBufferFormatter("UTF-8",XMLFormatter::NoEscapes, 
  @@ -346,7 +340,7 @@
                mp_transformList = NULL;
        }
   
  -     mp_uriAttributeNode = NULL;
  +     mp_uriAttr = NULL;
   
        // Get some setup values
        safeBuffer str;
  @@ -355,29 +349,22 @@
   
        makeQName(str, prefix, s_CipherReference);
   
  -     DOMElement *ret = 
doc->createElementNS(DSIGConstants::s_unicodeStrURIXENC, str.rawXMLChBuffer());
  -     mp_cipherReferenceNode = ret;
  +     mp_cipherReferenceElement = 
doc->createElementNS(DSIGConstants::s_unicodeStrURIXENC, str.rawXMLChBuffer());
   
        // Set the URI Attribute
  -     ret->setAttributeNS(DSIGConstants::s_unicodeStrURIXENC, 
DSIGConstants::s_unicodeStrURI, URI);
  +     mp_cipherReferenceElement->setAttributeNS(NULL, 
DSIGConstants::s_unicodeStrURI, URI);
   
        // Find the URI
  -     DOMNamedNodeMap * tmpAtts = mp_cipherReferenceNode->getAttributes();
  -
  -     if (tmpAtts != NULL) {
  -
  -             mp_uriAttributeNode = 
tmpAtts->getNamedItem(DSIGConstants::s_unicodeStrURI);
  -
  -     }
  +     mp_uriAttr = mp_cipherReferenceElement->getAttributeNodeNS(NULL, 
DSIGConstants::s_unicodeStrURI);
   
  -     if (mp_uriAttributeNode == NULL) {
  +     if (mp_uriAttr == NULL) {
   
                throw XSECException(XSECException::CipherReferenceError,
                        "XENCCipherReference::createBlankReference - URI 
attribute not found after creation");
        
        }
   
  -     return ret;
  +     return mp_cipherReferenceElement;
   
   }
   
  @@ -385,23 +372,23 @@
   //                   Get Interface methods
   // 
--------------------------------------------------------------------------------
   
  -DSIGTransformList * XENCCipherReferenceImpl::getTransforms(void) {
  +DSIGTransformList * XENCCipherReferenceImpl::getTransforms(void) const {
   
        return mp_transformList;
   
   }
   
  -const XMLCh * XENCCipherReferenceImpl::getURI (void) {
  +const XMLCh * XENCCipherReferenceImpl::getURI (void) const {
   
  -     if (mp_uriAttributeNode != NULL)
  -             return mp_uriAttributeNode->getNodeValue();
  +     if (mp_uriAttr != NULL)
  +             return mp_uriAttr->getNodeValue();
   
        return NULL;
   
   }
   
  -DOMNode * XENCCipherReferenceImpl::getDOMNode(void) {
  +DOMElement * XENCCipherReferenceImpl::getElement(void) const {
   
  -     return mp_cipherReferenceNode;
  +     return mp_cipherReferenceElement;
   
   }
  
  
  
  1.2       +11 -10    xml-security/c/src/xenc/impl/XENCCipherReferenceImpl.hpp
  
  Index: XENCCipherReferenceImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCCipherReferenceImpl.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XENCCipherReferenceImpl.hpp       10 Nov 2003 22:10:37 -0000      1.1
  +++ XENCCipherReferenceImpl.hpp       23 Nov 2003 09:12:44 -0000      1.2
  @@ -87,7 +87,7 @@
        XENCCipherReferenceImpl(const XSECEnv * env);
        XENCCipherReferenceImpl(
                const XSECEnv * env, 
  -             XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * node
  +             XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node
        );
   
        virtual ~XENCCipherReferenceImpl();
  @@ -99,9 +99,9 @@
                createBlankCipherReference(const XMLCh * URI);
   
        // Get methods
  -     virtual DSIGTransformList * getTransforms(void);
  -     virtual const XMLCh * getURI (void);
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getDOMNode(void);
  +     virtual DSIGTransformList * getTransforms(void) const;
  +     virtual const XMLCh * getURI (void) const;
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const;
   
        // Set methods
        virtual DSIGTransformBase64 * appendBase64Transform();
  @@ -124,12 +124,13 @@
   
   
        const XSECEnv                   * mp_env;
  -     XERCES_CPP_NAMESPACE_QUALIFIER DOMNode                                  
  -                                                     * 
mp_cipherReferenceNode;
  +     XERCES_CPP_NAMESPACE_QUALIFIER DOMElement                               
        
  +                                                     * 
mp_cipherReferenceElement;
        XERCES_CPP_NAMESPACE_QUALIFIER DOMNode
  -                                                     * mp_uriAttributeNode;
  -     XERCES_CPP_NAMESPACE_QUALIFIER DOMNode
  -                                                     * mp_transformsNode;
  +                                                     * mp_uriAttr;
  +     XERCES_CPP_NAMESPACE_QUALIFIER DOMElement
  +                                                     * mp_transformsElement;
  +
        DSIGTransformList               * mp_transformList;
   
   
  
  
  
  1.5       +12 -12    xml-security/c/src/xenc/impl/XENCCipherValueImpl.cpp
  
  Index: XENCCipherValueImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCCipherValueImpl.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XENCCipherValueImpl.cpp   15 Sep 2003 11:53:09 -0000      1.4
  +++ XENCCipherValueImpl.cpp   23 Nov 2003 09:12:44 -0000      1.5
  @@ -106,14 +106,14 @@
   
   XENCCipherValueImpl::XENCCipherValueImpl(const XSECEnv * env) :
   mp_env(env),
  -mp_cipherValueNode(NULL),
  +mp_cipherValueElement(NULL),
   mp_cipherString(NULL) {
   
   }
   
  -XENCCipherValueImpl::XENCCipherValueImpl(const XSECEnv * env, DOMNode * 
node) :
  +XENCCipherValueImpl::XENCCipherValueImpl(const XSECEnv * env, DOMElement * 
node) :
   mp_env(env),
  -mp_cipherValueNode(node),
  +mp_cipherValueElement(node),
   mp_cipherString(NULL) {
   
   }
  @@ -132,7 +132,7 @@
   
   void XENCCipherValueImpl::load(void) {
   
  -     if (mp_cipherValueNode == NULL) {
  +     if (mp_cipherValueElement == NULL) {
   
                // Attempt to load an empty encryptedType element
                throw XSECException(XSECException::CipherValueError,
  @@ -140,17 +140,17 @@
   
        }
   
  -     if (!strEquals(getXENCLocalName(mp_cipherValueNode), s_CipherValue)) {
  +     if (!strEquals(getXENCLocalName(mp_cipherValueElement), s_CipherValue)) 
{
        
                throw XSECException(XSECException::CipherValueError,
                        "XENCCipherData::load - called incorrect node");
        
        }
   
  -     // JUst gather the text children and continue
  +     // Just gather the text children and continue
        safeBuffer txt;
   
  -     gatherChildrenText(mp_cipherValueNode, txt);
  +     gatherChildrenText(mp_cipherValueElement, txt);
   
        // Get a copy
        mp_cipherString = XMLString::replicate(txt.rawXMLChBuffer());
  @@ -178,7 +178,7 @@
        makeQName(str, prefix, s_CipherValue);
   
        DOMElement *ret = 
doc->createElementNS(DSIGConstants::s_unicodeStrURIXENC, str.rawXMLChBuffer());
  -     mp_cipherValueNode = ret;
  +     mp_cipherValueElement = ret;
   
        // Append the value
        ret->appendChild(doc->createTextNode(value));
  @@ -193,7 +193,7 @@
   //                   Interface Methods
   // 
--------------------------------------------------------------------------------
   
  -const XMLCh * XENCCipherValueImpl::getCipherString(void) {
  +const XMLCh * XENCCipherValueImpl::getCipherString(void) const {
   
        return mp_cipherString;
   
  @@ -201,7 +201,7 @@
   
   void XENCCipherValueImpl::setCipherString(const XMLCh * value) {
   
  -     if (mp_cipherValueNode == NULL) {
  +     if (mp_cipherValueElement == NULL) {
   
                throw XSECException(XSECException::CipherValueError,
                        "XENCCipherData::setCipherString - called on empty 
DOM");
  @@ -209,7 +209,7 @@
        }
   
        // Find first text child
  -     DOMNode * txt = findFirstChildOfType(mp_cipherValueNode, 
DOMNode::TEXT_NODE);
  +     DOMNode * txt = findFirstChildOfType(mp_cipherValueElement, 
DOMNode::TEXT_NODE);
        
        if (txt == NULL) {
                throw XSECException(XSECException::CipherValueError,
  
  
  
  1.6       +12 -8     xml-security/c/src/xenc/impl/XENCCipherValueImpl.hpp
  
  Index: XENCCipherValueImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCCipherValueImpl.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XENCCipherValueImpl.hpp   17 Sep 2003 10:10:22 -0000      1.5
  +++ XENCCipherValueImpl.hpp   23 Nov 2003 09:12:44 -0000      1.6
  @@ -88,7 +88,7 @@
        XENCCipherValueImpl(const XSECEnv * env);
        XENCCipherValueImpl(
                const XSECEnv * env, 
  -             XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * node
  +             XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node
        );
   
        virtual ~XENCCipherValueImpl();
  @@ -101,10 +101,10 @@
   
        // Interface methods
   
  -     virtual const XMLCh * getCipherString(void);
  +     virtual const XMLCh * getCipherString(void) const;
        virtual void setCipherString(const XMLCh * value);
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getDOMNode(void)
  -             {return mp_cipherValueNode;}
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const
  +             {return mp_cipherValueElement;}
   
   private:
   
  @@ -113,9 +113,13 @@
        XENCCipherValueImpl & operator = (const XENCCipherValueImpl &);
   
        const XSECEnv                   * mp_env;
  -     XERCES_CPP_NAMESPACE_QUALIFIER DOMNode                                  
  -                                                     * mp_cipherValueNode;
  -     XMLCh                                   * mp_cipherString;              
// EncryptedData
  +     XERCES_CPP_NAMESPACE_QUALIFIER DOMElement                               
        
  +                                                     * mp_cipherValueElement;
  +     
  +     // This is held as a string, not a node as we might have multiple text
  +     // nodes making up the string
  +
  +     XMLCh                                   * mp_cipherString;
   };
   
   #endif /* XENCCIPHERVALUEIMPL_INCLUDE */
  
  
  
  1.5       +4 -4      xml-security/c/src/xenc/impl/XENCEncryptedDataImpl.cpp
  
  Index: XENCEncryptedDataImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedDataImpl.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XENCEncryptedDataImpl.cpp 15 Sep 2003 11:53:09 -0000      1.4
  +++ XENCEncryptedDataImpl.cpp 23 Nov 2003 09:12:44 -0000      1.5
  @@ -111,7 +111,7 @@
        
   }
   
  -XENCEncryptedDataImpl::XENCEncryptedDataImpl(const XSECEnv * env, DOMNode * 
node) :
  +XENCEncryptedDataImpl::XENCEncryptedDataImpl(const XSECEnv * env, DOMElement 
* node) :
   XENCEncryptedTypeImpl(env, node) {
   
   }
  @@ -126,7 +126,7 @@
   
   void XENCEncryptedDataImpl::load(void) {
   
  -     if (mp_encryptedTypeNode == NULL) {
  +     if (mp_encryptedTypeElement == NULL) {
   
                // Attempt to load an empty encryptedData element
                throw XSECException(XSECException::EncryptedTypeError,
  @@ -134,7 +134,7 @@
   
        }
   
  -     if (!strEquals(getXENCLocalName(mp_encryptedTypeNode), 
s_EncryptedData)) {
  +     if (!strEquals(getXENCLocalName(mp_encryptedTypeElement), 
s_EncryptedData)) {
   
                // Attempt to load an empty encryptedData element
                throw XSECException(XSECException::EncryptedTypeError,
  
  
  
  1.9       +14 -14    xml-security/c/src/xenc/impl/XENCEncryptedDataImpl.hpp
  
  Index: XENCEncryptedDataImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedDataImpl.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XENCEncryptedDataImpl.hpp 26 Oct 2003 11:33:13 -0000      1.8
  +++ XENCEncryptedDataImpl.hpp 23 Nov 2003 09:12:44 -0000      1.9
  @@ -86,7 +86,7 @@
        XENCEncryptedDataImpl(const XSECEnv * env);
        XENCEncryptedDataImpl(
                const XSECEnv * env, 
  -             XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * node
  +             XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node
        );
        virtual ~XENCEncryptedDataImpl();
   
  @@ -102,36 +102,36 @@
        // Interface methods
   
        // Inherited from XENCEncryptedData - need to re-implement
  -     virtual XENCCipherData * getCipherData(void) 
  +     virtual XENCCipherData * getCipherData(void) const
                {return XENCEncryptedTypeImpl::getCipherData();}
        virtual DSIGKeyInfoList * getKeyInfoList(void)
                {return XENCEncryptedTypeImpl::getKeyInfoList();}
  -     virtual XENCEncryptionMethod * getEncryptionMethod(void)
  +     virtual XENCEncryptionMethod * getEncryptionMethod(void) const
                {return XENCEncryptedTypeImpl::getEncryptionMethod();}
        virtual void clearKeyInfo(void)
                {XENCEncryptedTypeImpl::clearKeyInfo();}
        virtual DSIGKeyInfoName * appendKeyName(const XMLCh * name, bool 
isDName = false)
                {return XENCEncryptedTypeImpl::appendKeyName(name, isDName);}
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getDOMNode(void)
  -             {return XENCEncryptedTypeImpl::getDOMNode();}
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const
  +             {return XENCEncryptedTypeImpl::getElement();}
        virtual void appendEncryptedKey(XENCEncryptedKey * encryptedKey)
                {XENCEncryptedTypeImpl::appendEncryptedKey(encryptedKey);}
   
        // Get methods
  -     virtual const XMLCh * getTypeURI(void) const
  -             {return XENCEncryptedTypeImpl::getTypeURI();}
  +     virtual const XMLCh * getType(void) const
  +             {return XENCEncryptedTypeImpl::getType();}
        virtual const XMLCh * getMimeType(void) const
                {return XENCEncryptedTypeImpl::getMimeType();}
  -     virtual const XMLCh * getEncodingURI(void) const
  -             {return XENCEncryptedTypeImpl::getEncodingURI();}
  +     virtual const XMLCh * getEncoding(void) const
  +             {return XENCEncryptedTypeImpl::getEncoding();}
   
        // Set methods
  -     virtual void setTypeURI(const XMLCh * uri)
  -             {XENCEncryptedTypeImpl::setTypeURI(uri);}
  +     virtual void setType(const XMLCh * uri)
  +             {XENCEncryptedTypeImpl::setType(uri);}
        virtual void setMimeType(const XMLCh * mimeType)
                {XENCEncryptedTypeImpl::setMimeType(mimeType);}
  -     virtual void setEncodingURI(const XMLCh * uri)
  -             {XENCEncryptedTypeImpl::setEncodingURI(uri);}
  +     virtual void setEncoding(const XMLCh * uri)
  +             {XENCEncryptedTypeImpl::setEncoding(uri);}
   
   private:
   
  
  
  
  1.3       +23 -36    xml-security/c/src/xenc/impl/XENCEncryptedKeyImpl.cpp
  
  Index: XENCEncryptedKeyImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedKeyImpl.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XENCEncryptedKeyImpl.cpp  4 Nov 2003 11:28:36 -0000       1.2
  +++ XENCEncryptedKeyImpl.cpp  23 Nov 2003 09:12:44 -0000      1.3
  @@ -143,15 +143,15 @@
   XENCEncryptedTypeImpl(env),
   XENCEncryptedKey(env),
   mp_carriedKeyNameTextNode(NULL),
  -mp_recipientAttributeNode(NULL) {
  +mp_recipientAttr(NULL) {
        
   }
   
  -XENCEncryptedKeyImpl::XENCEncryptedKeyImpl(const XSECEnv * env, DOMNode * 
node) :
  +XENCEncryptedKeyImpl::XENCEncryptedKeyImpl(const XSECEnv * env, DOMElement * 
node) :
   XENCEncryptedTypeImpl(env, node),
   XENCEncryptedKey(env),
   mp_carriedKeyNameTextNode(NULL),
  -mp_recipientAttributeNode(NULL) {
  +mp_recipientAttr(NULL) {
   
   }
   
  @@ -165,7 +165,7 @@
   
   void XENCEncryptedKeyImpl::load(void) {
   
  -     if (mp_encryptedTypeNode == NULL) {
  +     if (mp_encryptedTypeElement == NULL) {
   
                // Attempt to load an empty encryptedData element
                throw XSECException(XSECException::EncryptedTypeError,
  @@ -173,7 +173,7 @@
   
        }
   
  -     if (!strEquals(getXENCLocalName(mp_encryptedTypeNode), s_EncryptedKey)) 
{
  +     if (!strEquals(getXENCLocalName(mp_encryptedTypeElement), 
s_EncryptedKey)) {
   
                // Attempt to load an empty encryptedKey element
                throw XSECException(XSECException::EncryptedTypeError,
  @@ -185,19 +185,13 @@
        XENCEncryptedTypeImpl::load();
   
        // Set up the keyInfo node
  -     mp_keyInfoDOMNode = mp_encryptedTypeNode;
  +     mp_keyInfoDOMNode = mp_encryptedTypeElement;
   
        // Find the Recipient Attribute
  -     DOMNamedNodeMap * tmpAtts = mp_encryptedTypeNode->getAttributes();
  -
  -     if (tmpAtts != NULL) {
  -
  -             mp_recipientAttributeNode = tmpAtts->getNamedItem(s_Recipient);
  -
  -     }
  +     mp_recipientAttr = mp_encryptedTypeElement->getAttributeNodeNS(NULL, 
s_Recipient);
   
        // Now load specific EncryptedKey elements
  -     DOMNode * c = findFirstChildOfType(mp_encryptedTypeNode, 
DOMNode::ELEMENT_NODE);
  +     DOMNode * c = findFirstChildOfType(mp_encryptedTypeElement, 
DOMNode::ELEMENT_NODE);
   
        while (c != NULL) {
   
  @@ -208,7 +202,7 @@
   
                }
   
  -             c = findNextChildOfType(c, DOMNode::ELEMENT_NODE);
  +             c = findNextElementChild(c);
   
        }
   
  @@ -225,7 +219,7 @@
        DOMElement * ret = createBlankEncryptedType(s_EncryptedKey, type, 
algorithm, value);
   
        // Set up the KeyInfo information
  -     mp_keyInfoDOMNode = mp_encryptedTypeNode;
  +     mp_keyInfoDOMNode = mp_encryptedTypeElement;
   
        return ret;
   
  @@ -236,7 +230,7 @@
   // 
--------------------------------------------------------------------------------
   
   
  -const XMLCh * XENCEncryptedKeyImpl::getCarriedKeyName(void) {
  +const XMLCh * XENCEncryptedKeyImpl::getCarriedKeyName(void) const {
   
        if (mp_carriedKeyNameTextNode != NULL)
                return mp_carriedKeyNameTextNode->getNodeValue();
  @@ -245,10 +239,10 @@
   
   }
   
  -const XMLCh * XENCEncryptedKeyImpl::getRecipient(void) {
  +const XMLCh * XENCEncryptedKeyImpl::getRecipient(void) const {
   
  -     if (mp_recipientAttributeNode != NULL)
  -             return mp_recipientAttributeNode->getNodeValue();
  +     if (mp_recipientAttr != NULL)
  +             return mp_recipientAttr->getNodeValue();
   
        return NULL;
   
  @@ -267,8 +261,8 @@
   
                DOMElement *e = 
doc->createElementNS(DSIGConstants::s_unicodeStrURIXENC, str.rawXMLChBuffer());
   
  -             mp_encryptedTypeNode->appendChild(e);
  -             
XENCEncryptedTypeImpl::mp_env->doPrettyPrint(mp_encryptedTypeNode);
  +             mp_encryptedTypeElement->appendChild(e);
  +             
XENCEncryptedTypeImpl::mp_env->doPrettyPrint(mp_encryptedTypeElement);
   
                mp_carriedKeyNameTextNode = doc->createTextNode(name);
                e->appendChild(mp_carriedKeyNameTextNode);
  @@ -284,27 +278,20 @@
   
   void XENCEncryptedKeyImpl::setRecipient(const XMLCh * recipient) {
   
  -     if (mp_recipientAttributeNode == NULL) {
  +     if (mp_recipientAttr == NULL) {
   
  -             if (mp_encryptedTypeNode->getNodeType() != 
DOMNode::ELEMENT_NODE) {
  +             if (mp_encryptedTypeElement->getNodeType() != 
DOMNode::ELEMENT_NODE) {
                        throw XSECException(XSECException::EncryptedTypeError,
                                "XENCEncryptedKeyImpl::setRecipient - 
encryptedTypeNode is not an Element");
                }
   
  -             DOMElement * e = static_cast<DOMElement*> 
(mp_encryptedTypeNode);
  -             e->setAttributeNS(DSIGConstants::s_unicodeStrURIXENC, 
  +             mp_encryptedTypeElement->setAttributeNS(NULL, 
                                                                                
         s_Recipient,
                                                                                
         recipient);
                // Now retrieve for later use
  -             DOMNamedNodeMap * tmpAtts = e->getAttributes();
  -
  -             if (tmpAtts != NULL) {
  -
  -                     mp_recipientAttributeNode = 
tmpAtts->getNamedItem(s_Recipient);
  -
  -             }
  +             mp_recipientAttr = 
mp_encryptedTypeElement->getAttributeNodeNS(NULL, s_Recipient);
   
  -             if (mp_recipientAttributeNode == NULL) {
  +             if (mp_recipientAttr == NULL) {
   
                        throw 
XSECException(XSECException::EncryptionMethodError,
                                "XENCEncryptionKey::setRecipient - Error 
creating Recipient Attribute");
  @@ -313,7 +300,7 @@
        
        else {
   
  -             mp_recipientAttributeNode->setNodeValue(recipient);
  +             mp_recipientAttr->setNodeValue(recipient);
   
        }
   
  
  
  
  1.5       +17 -17    xml-security/c/src/xenc/impl/XENCEncryptedKeyImpl.hpp
  
  Index: XENCEncryptedKeyImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedKeyImpl.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XENCEncryptedKeyImpl.hpp  4 Nov 2003 11:28:36 -0000       1.4
  +++ XENCEncryptedKeyImpl.hpp  23 Nov 2003 09:12:44 -0000      1.5
  @@ -86,7 +86,7 @@
        XENCEncryptedKeyImpl(const XSECEnv * env);
        XENCEncryptedKeyImpl(
                const XSECEnv * env, 
  -             XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * node
  +             XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node
        );
        virtual ~XENCEncryptedKeyImpl();
   
  @@ -105,40 +105,40 @@
   
   
        // Inherited from XENCEncryptedData - need to re-implement
  -     virtual XENCCipherData * getCipherData(void) 
  +     virtual XENCCipherData * getCipherData(void) const
                {return XENCEncryptedTypeImpl::getCipherData();}
        virtual DSIGKeyInfoList * getKeyInfoList(void)
                {return XENCEncryptedTypeImpl::getKeyInfoList();}
  -     virtual XENCEncryptionMethod * getEncryptionMethod(void)
  +     virtual XENCEncryptionMethod * getEncryptionMethod(void) const
                {return XENCEncryptedTypeImpl::getEncryptionMethod();}
        virtual void clearKeyInfo(void)
                {XENCEncryptedTypeImpl::clearKeyInfo();}
        virtual DSIGKeyInfoName * appendKeyName(const XMLCh * name, bool 
isDName = false)
                {return XENCEncryptedTypeImpl::appendKeyName(name, isDName);}
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getDOMNode(void)
  -             {return XENCEncryptedTypeImpl::getDOMNode();}
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const
  +             {return XENCEncryptedTypeImpl::getElement();}
        virtual void appendEncryptedKey(XENCEncryptedKey * encryptedKey)
                {XENCEncryptedTypeImpl::appendEncryptedKey(encryptedKey);}
   
        // Get methods
  -     virtual const XMLCh * getTypeURI(void) const
  -             {return XENCEncryptedTypeImpl::getTypeURI();}
  +     virtual const XMLCh * getType(void) const
  +             {return XENCEncryptedTypeImpl::getType();}
        virtual const XMLCh * getMimeType(void) const
                {return XENCEncryptedTypeImpl::getMimeType();}
  -     virtual const XMLCh * getEncodingURI(void) const
  -             {return XENCEncryptedTypeImpl::getEncodingURI();}
  +     virtual const XMLCh * getEncoding(void) const
  +             {return XENCEncryptedTypeImpl::getEncoding();}
   
        // Set methods
  -     virtual void setTypeURI(const XMLCh * uri)
  -             {XENCEncryptedTypeImpl::setTypeURI(uri);}
  +     virtual void setType(const XMLCh * uri)
  +             {XENCEncryptedTypeImpl::setType(uri);}
        virtual void setMimeType(const XMLCh * mimeType)
                {XENCEncryptedTypeImpl::setMimeType(mimeType);}
  -     virtual void setEncodingURI(const XMLCh * uri)
  -             {XENCEncryptedTypeImpl::setEncodingURI(uri);}
  +     virtual void setEncoding(const XMLCh * uri)
  +             {XENCEncryptedTypeImpl::setEncoding(uri);}
   
        // EncryptedKey specific Getter Methods
  -     virtual const XMLCh * getCarriedKeyName(void);
  -     virtual const XMLCh * getRecipient(void);
  +     virtual const XMLCh * getCarriedKeyName(void) const;
  +     virtual const XMLCh * getRecipient(void) const;
   
        // EncryptedKey specific setter methods
        virtual void setCarriedKeyName(const XMLCh * name);
  @@ -155,7 +155,7 @@
        XERCES_CPP_NAMESPACE_QUALIFIER DOMNode
                                                                * 
mp_carriedKeyNameTextNode;
        XERCES_CPP_NAMESPACE_QUALIFIER DOMNode
  -                                                             * 
mp_recipientAttributeNode;
  +                                                             * 
mp_recipientAttr;
   
   };
   
  
  
  
  1.13      +70 -90    xml-security/c/src/xenc/impl/XENCEncryptedTypeImpl.cpp
  
  Index: XENCEncryptedTypeImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedTypeImpl.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XENCEncryptedTypeImpl.cpp 20 Nov 2003 09:11:25 -0000      1.12
  +++ XENCEncryptedTypeImpl.cpp 23 Nov 2003 09:12:44 -0000      1.13
  @@ -184,30 +184,30 @@
   
   XENCEncryptedTypeImpl::XENCEncryptedTypeImpl(const XSECEnv * env) :
   mp_env(env),
  -mp_encryptedTypeNode(NULL),
  -mp_keyInfoNode(NULL),
  -mp_cipherDataNode(NULL),
  +mp_encryptedTypeElement(NULL),
  +mp_keyInfoElement(NULL),
  +mp_cipherDataElement(NULL),
   mp_cipherData(NULL),
   mp_encryptionMethod(NULL),
   m_keyInfoList(env),
  -mp_typeAttributeNode(NULL),
  -mp_mimeTypeAttributeNode(NULL),
  -mp_encodingAttributeNode(NULL) {
  +mp_typeAttr(NULL),
  +mp_mimeTypeAttr(NULL),
  +mp_encodingAttr(NULL) {
   
   }
   
   
  -XENCEncryptedTypeImpl::XENCEncryptedTypeImpl(const XSECEnv * env, DOMNode * 
node) :
  +XENCEncryptedTypeImpl::XENCEncryptedTypeImpl(const XSECEnv * env, DOMElement 
* node) :
   mp_env(env),
  -mp_encryptedTypeNode(node),
  -mp_keyInfoNode(NULL),
  -mp_cipherDataNode(NULL),
  +mp_encryptedTypeElement(node),
  +mp_keyInfoElement(NULL),
  +mp_cipherDataElement(NULL),
   mp_cipherData(NULL),
   mp_encryptionMethod(NULL),
   m_keyInfoList(env),
  -mp_typeAttributeNode(NULL),
  -mp_mimeTypeAttributeNode(NULL),
  -mp_encodingAttributeNode(NULL) {
  +mp_typeAttr(NULL),
  +mp_mimeTypeAttr(NULL),
  +mp_encodingAttr(NULL) {
   
   }
   
  @@ -227,7 +227,7 @@
   
   void XENCEncryptedTypeImpl::load() {
   
  -     if (mp_encryptedTypeNode == NULL) {
  +     if (mp_encryptedTypeElement == NULL) {
   
                // Attempt to load an empty encryptedType element
                throw XSECException(XSECException::EncryptedTypeError,
  @@ -235,52 +235,46 @@
   
        }
   
  -     // See if any attributes of interest are set
  -     DOMNamedNodeMap *atts = mp_encryptedTypeNode->getAttributes();
  -
        // Type
  -     mp_typeAttributeNode = 
atts->getNamedItemNS(DSIGConstants::s_unicodeStrURIXENC,
  -                                                                             
                s_Type);
  +     mp_typeAttr = mp_encryptedTypeElement->getAttributeNodeNS(NULL, s_Type);
        // MimeType
  -     mp_mimeTypeAttributeNode = 
atts->getNamedItemNS(DSIGConstants::s_unicodeStrURIXENC,
  -                                                                             
                s_MimeType);
  +     mp_mimeTypeAttr = mp_encryptedTypeElement->getAttributeNodeNS(NULL, 
s_MimeType);
        // Encoding
  -     mp_encodingAttributeNode = 
atts->getNamedItemNS(DSIGConstants::s_unicodeStrURIXENC,
  -                                                                             
                s_Encoding);
  +     mp_encodingAttr = mp_encryptedTypeElement->getAttributeNodeNS(NULL, 
s_Encoding);
   
        // Don't know what the node name should be (held by super class), 
        // so go straight to the children
        
  -     DOMElement *tmpElt = (DOMElement *) 
findFirstChildOfType(mp_encryptedTypeNode, DOMNode::ELEMENT_NODE);
  +     DOMElement *tmpElt = (DOMElement *) 
findFirstChildOfType(mp_encryptedTypeElement, DOMNode::ELEMENT_NODE);
   
        if (tmpElt != NULL && strEquals(getXENCLocalName(tmpElt), 
s_EncryptionMethod)) {
   
                XSECnew(mp_encryptionMethod, XENCEncryptionMethodImpl(mp_env, 
tmpElt));
                mp_encryptionMethod->load();
   
  -             tmpElt = (DOMElement *) findNextChildOfType(tmpElt, 
DOMNode::ELEMENT_NODE);
  +             tmpElt = findNextElementChild(tmpElt);
   
        }
   
        if (tmpElt != NULL && strEquals(getDSIGLocalName(tmpElt), s_KeyInfo)) {
   
                // Load
  -             mp_keyInfoNode = tmpElt;
  +             mp_keyInfoElement = tmpElt;
                m_keyInfoList.loadListFromXML(tmpElt);
   
                // Find the next node
   
  -             tmpElt = (DOMElement *) findNextChildOfType(tmpElt, 
DOMNode::ELEMENT_NODE);
  +             tmpElt = findNextElementChild(tmpElt);
   
        }
   
        if (tmpElt != NULL && strEquals(getXENCLocalName(tmpElt), 
s_CipherData)) {
   
  -             mp_cipherDataNode = tmpElt;
  +             mp_cipherDataElement = tmpElt;
   
                XSECnew(mp_cipherData, XENCCipherDataImpl(mp_env, tmpElt));
                mp_cipherData->load();
  -             tmpElt = (DOMElement *) findNextChildOfType(tmpElt, 
DOMNode::ELEMENT_NODE);
  +             tmpElt = findNextElementChild(tmpElt);
   
        }
   
  @@ -316,8 +310,7 @@
   
        makeQName(str, prefix, localName);
   
  -     DOMElement *ret = 
doc->createElementNS(DSIGConstants::s_unicodeStrURIXENC, str.rawXMLChBuffer());
  -     mp_encryptedTypeNode = ret;
  +     mp_encryptedTypeElement = 
doc->createElementNS(DSIGConstants::s_unicodeStrURIXENC, str.rawXMLChBuffer());
   
        // Set namespace
        if (prefix[0] == XERCES_CPP_NAMESPACE::chNull) {
  @@ -328,11 +321,11 @@
                str.sbXMLChCat(prefix);
        }
   
  -     ret->setAttributeNS(DSIGConstants::s_unicodeStrURIXMLNS, 
  +     
mp_encryptedTypeElement->setAttributeNS(DSIGConstants::s_unicodeStrURIXMLNS, 
                                                        str.rawXMLChBuffer(), 
                                                        
DSIGConstants::s_unicodeStrURIXENC);
   
  -     mp_env->doPrettyPrint(ret);
  +     mp_env->doPrettyPrint(mp_encryptedTypeElement);
   
        // Create the EncryptionMethod
        if (algorithm != NULL) {
  @@ -341,22 +334,22 @@
                DOMNode * encryptionMethodNode = 
                        
mp_encryptionMethod->createBlankEncryptedMethod(algorithm);
   
  -             ret->appendChild(encryptionMethodNode);
  +             mp_encryptedTypeElement->appendChild(encryptionMethodNode);
   
  -             mp_env->doPrettyPrint(ret);
  +             mp_env->doPrettyPrint(mp_encryptedTypeElement);
   
        }
   
        // Create the cipher Data
        XSECnew(mp_cipherData, XENCCipherDataImpl(mp_env));
  -     mp_cipherDataNode = mp_cipherData->createBlankCipherData(type, value);
  +     mp_cipherDataElement = mp_cipherData->createBlankCipherData(type, 
value);
   
        // Add to EncryptedType
  -     ret->appendChild(mp_cipherDataNode);
  +     mp_encryptedTypeElement->appendChild(mp_cipherDataElement);
   
  -     mp_env->doPrettyPrint(ret);
  +     mp_env->doPrettyPrint(mp_encryptedTypeElement);
   
  -     return ret;
  +     return mp_encryptedTypeElement;
   
   }
   
  @@ -429,13 +422,13 @@
   //                   Get Methods
   // 
--------------------------------------------------------------------------------
   
  -XENCCipherData * XENCEncryptedTypeImpl::getCipherData(void) {
  +XENCCipherData * XENCEncryptedTypeImpl::getCipherData(void) const {
   
        return mp_cipherData;
   
   }
   
  -XENCEncryptionMethod * XENCEncryptedTypeImpl::getEncryptionMethod(void) {
  +XENCEncryptionMethod * XENCEncryptedTypeImpl::getEncryptionMethod(void) 
const {
        
        return mp_encryptionMethod;
   
  @@ -447,19 +440,19 @@
   
   void XENCEncryptedTypeImpl::clearKeyInfo(void) {
   
  -     if (mp_keyInfoNode == NULL)
  +     if (mp_keyInfoElement == NULL)
                return;
   
  -     if (mp_encryptedTypeNode->removeChild(mp_keyInfoNode) != 
mp_keyInfoNode) {
  +     if (mp_encryptedTypeElement->removeChild(mp_keyInfoElement) != 
mp_keyInfoElement) {
   
                throw XSECException(XSECException::ExpectedDSIGChildNotFound,
                        "Attempted to remove KeyInfo node but it is no longer a 
child of <EncryptedType>");
   
        }
   
  -     mp_keyInfoNode->release();              // No longer required
  +     mp_keyInfoElement->release();           // No longer required
   
  -     mp_keyInfoNode = NULL;
  +     mp_keyInfoElement = NULL;
   
        // Clear out the list
        m_keyInfoList.empty();
  @@ -468,7 +461,7 @@
   
   void XENCEncryptedTypeImpl::createKeyInfoElement(void) {
   
  -     if (mp_keyInfoNode != NULL)
  +     if (mp_keyInfoElement != NULL)
                return;
   
        safeBuffer str;
  @@ -476,20 +469,20 @@
        const XMLCh * prefixNS = mp_env->getDSIGNSPrefix();
        makeQName(str, prefixNS, "KeyInfo");
   
  -     mp_keyInfoNode = m_keyInfoList.createKeyInfo();
  +     mp_keyInfoElement = m_keyInfoList.createKeyInfo();
   
        // Place the node before the CipherData node
  -     if (mp_cipherDataNode == NULL) {
  +     if (mp_cipherDataElement == NULL) {
   
                throw XSECException(XSECException::EncryptedTypeError,
                        "XENCEncryptedTypeImpl::createKeyInfoElement - unable 
to find CipherData node");
   
        }
   
  -     mp_encryptedTypeNode->insertBefore(mp_keyInfoNode, mp_cipherDataNode);
  +     mp_encryptedTypeElement->insertBefore(mp_keyInfoElement, 
mp_cipherDataElement);
   
        if (mp_env->getPrettyPrintFlag() == true)
  -             
mp_encryptedTypeNode->insertBefore(mp_env->getParentDocument()->createTextNode(DSIGConstants::s_unicodeStrNL),
 mp_cipherDataNode);
  +             
mp_encryptedTypeElement->insertBefore(mp_env->getParentDocument()->createTextNode(DSIGConstants::s_unicodeStrNL),
 mp_cipherDataElement);
        
        // Need to add the DS namespace
   
  @@ -501,7 +494,7 @@
                str.sbXMLChCat(prefixNS);
        }
   
  -     static_cast<DOMElement 
*>(mp_keyInfoNode)->setAttributeNS(DSIGConstants::s_unicodeStrURIXMLNS, 
  +     mp_keyInfoElement->setAttributeNS(DSIGConstants::s_unicodeStrURIXMLNS, 
                                                        str.rawXMLChBuffer(), 
                                                        
DSIGConstants::s_unicodeStrURIDSIG);
   
  @@ -526,31 +519,27 @@
   //                   Type URI handling
   // 
--------------------------------------------------------------------------------
   
  -const XMLCh * XENCEncryptedTypeImpl::getTypeURI(void) const {
  +const XMLCh * XENCEncryptedTypeImpl::getType(void) const {
   
  -     if (mp_typeAttributeNode != NULL)
  -             return mp_typeAttributeNode->getNodeValue();
  +     if (mp_typeAttr != NULL)
  +             return mp_typeAttr->getNodeValue();
   
        return NULL;
   
   }
   
  -void XENCEncryptedTypeImpl::setTypeURI(const XMLCh * uri) {
  +void XENCEncryptedTypeImpl::setType(const XMLCh * uri) {
   
  -     if (mp_typeAttributeNode != NULL) {
  -             mp_typeAttributeNode->setNodeValue(uri);
  +     if (mp_typeAttr != NULL) {
  +             mp_typeAttr->setNodeValue(uri);
        }
        else {
   
                // Need to create the node
  -             DOMElement * typeElt = static_cast<DOMElement 
*>(mp_encryptedTypeNode);
  -
  -             typeElt->setAttributeNS(DSIGConstants::s_unicodeStrURIXENC, 
s_Type, uri);
  +             mp_encryptedTypeElement->setAttributeNS(NULL, s_Type, uri);
  +             mp_typeAttr = mp_encryptedTypeElement->getAttributeNodeNS(NULL, 
s_Type);
   
  -             DOMNamedNodeMap *atts = mp_encryptedTypeNode->getAttributes();
  -             mp_typeAttributeNode = 
atts->getNamedItemNS(DSIGConstants::s_unicodeStrURIXENC,
  -                                                                             
                s_Type);
  -             if (mp_typeAttributeNode = NULL) {
  +             if (mp_typeAttr = NULL) {
   
                        throw XSECException(XSECException::InternalError,
                                "XENCEncryptedTypeImpl::setTypeURI - Cannot 
find the attribute I just added");
  @@ -566,8 +555,8 @@
   
   const XMLCh * XENCEncryptedTypeImpl::getMimeType(void) const {
   
  -     if (mp_mimeTypeAttributeNode != NULL)
  -             return mp_mimeTypeAttributeNode->getNodeValue();
  +     if (mp_mimeTypeAttr != NULL)
  +             return mp_mimeTypeAttr->getNodeValue();
   
        return NULL;
   
  @@ -575,20 +564,15 @@
   
   void XENCEncryptedTypeImpl::setMimeType(const XMLCh * mimeType) {
   
  -     if (mp_mimeTypeAttributeNode != NULL) {
  -             mp_mimeTypeAttributeNode->setNodeValue(mimeType);
  +     if (mp_mimeTypeAttr != NULL) {
  +             mp_mimeTypeAttr->setNodeValue(mimeType);
        }
        else {
   
                // Need to create the node
  -             DOMElement * typeElt = static_cast<DOMElement 
*>(mp_encryptedTypeNode);
  -
  -             typeElt->setAttributeNS(DSIGConstants::s_unicodeStrURIXENC, 
s_MimeType, mimeType);
  -
  -             DOMNamedNodeMap *atts = mp_encryptedTypeNode->getAttributes();
  -             mp_mimeTypeAttributeNode = 
atts->getNamedItemNS(DSIGConstants::s_unicodeStrURIXENC,
  -                                                                             
                s_MimeType);
  -             if (mp_mimeTypeAttributeNode = NULL) {
  +             mp_encryptedTypeElement->setAttributeNS(NULL, s_MimeType, 
mimeType);
  +             mp_mimeTypeAttr = 
mp_encryptedTypeElement->getAttributeNodeNS(NULL, s_MimeType);
  +             if (mp_mimeTypeAttr = NULL) {
   
                        throw XSECException(XSECException::InternalError,
                                "XENCEncryptedTypeImpl::setMimeType - Cannot 
find the attribute I just added");
  @@ -602,31 +586,27 @@
   //                   Encoding handling
   // 
--------------------------------------------------------------------------------
   
  -const XMLCh * XENCEncryptedTypeImpl::getEncodingURI(void) const {
  +const XMLCh * XENCEncryptedTypeImpl::getEncoding(void) const {
   
  -     if (mp_encodingAttributeNode != NULL)
  -             return mp_encodingAttributeNode->getNodeValue();
  +     if (mp_encodingAttr != NULL)
  +             return mp_encodingAttr->getNodeValue();
   
        return NULL;
   
   }
   
  -void XENCEncryptedTypeImpl::setEncodingURI(const XMLCh * uri) {
  +void XENCEncryptedTypeImpl::setEncoding(const XMLCh * uri) {
   
  -     if (mp_encodingAttributeNode != NULL) {
  -             mp_encodingAttributeNode->setNodeValue(uri);
  +     if (mp_encodingAttr != NULL) {
  +             mp_encodingAttr->setNodeValue(uri);
        }
        else {
   
                // Need to create the node
  -             DOMElement * typeElt = static_cast<DOMElement 
*>(mp_encryptedTypeNode);
  -
  -             typeElt->setAttributeNS(DSIGConstants::s_unicodeStrURIXENC, 
s_Encoding, uri);
  +             mp_encryptedTypeElement->setAttributeNS(NULL, s_Encoding, uri);
  +             mp_encodingAttr = 
mp_encryptedTypeElement->getAttributeNodeNS(NULL, s_Encoding);
   
  -             DOMNamedNodeMap *atts = mp_encryptedTypeNode->getAttributes();
  -             mp_encodingAttributeNode = 
atts->getNamedItemNS(DSIGConstants::s_unicodeStrURIXENC,
  -                                                                             
                s_Encoding);
  -             if (mp_encodingAttributeNode = NULL) {
  +             if (mp_encodingAttr = NULL) {
   
                        throw XSECException(XSECException::InternalError,
                                "XENCEncryptedTypeImpl::setEncodingURI - Cannot 
find the attribute I just added");
  
  
  
  1.10      +26 -19    xml-security/c/src/xenc/impl/XENCEncryptedTypeImpl.hpp
  
  Index: XENCEncryptedTypeImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedTypeImpl.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XENCEncryptedTypeImpl.hpp 26 Oct 2003 11:33:13 -0000      1.9
  +++ XENCEncryptedTypeImpl.hpp 23 Nov 2003 09:12:44 -0000      1.10
  @@ -92,7 +92,7 @@
        XENCEncryptedTypeImpl(const XSECEnv * env);
        XENCEncryptedTypeImpl(
                const XSECEnv * env, 
  -             XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * node
  +             XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node
        );
   
        virtual ~XENCEncryptedTypeImpl();
  @@ -109,25 +109,24 @@
                                                const XMLCh * value);
   
        // Interface Methods
  -     virtual XENCCipherData * getCipherData(void);
  -     //virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getDOMNode();
  +     virtual XENCCipherData * getCipherData(void) const;
        virtual DSIGKeyInfoList * getKeyInfoList(void) {return &m_keyInfoList;}
  -     virtual XENCEncryptionMethod * getEncryptionMethod(void);
  +     virtual XENCEncryptionMethod * getEncryptionMethod(void) const;
        virtual void clearKeyInfo(void);
        virtual DSIGKeyInfoName * appendKeyName(const XMLCh * name, bool 
isDName = false);
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getDOMNode(void)
  -             {return mp_encryptedTypeNode;}
        virtual void appendEncryptedKey(XENCEncryptedKey * encryptedKey);
   
        // Get methods
  -     virtual const XMLCh * getTypeURI(void) const;
  +     virtual const XMLCh * getType(void) const;
        virtual const XMLCh * getMimeType(void) const;
  -     virtual const XMLCh * getEncodingURI(void) const;
  +     virtual const XMLCh * getEncoding(void) const;
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const
  +             {return mp_encryptedTypeElement;};
   
        // Set methods
  -     virtual void setTypeURI(const XMLCh * uri);
  +     virtual void setType(const XMLCh * uri);
        virtual void setMimeType(const XMLCh * mimeType);
  -     virtual void setEncodingURI(const XMLCh * uri);
  +     virtual void setEncoding(const XMLCh * uri);
   
   protected:
   
  @@ -140,12 +139,12 @@
        void createKeyInfoElement(void);
   
        const XSECEnv                           * mp_env;
  -     XERCES_CPP_NAMESPACE_QUALIFIER DOMNode                                  
  -                                                             * 
mp_encryptedTypeNode;         // Node at head of structure
  +     XERCES_CPP_NAMESPACE_QUALIFIER DOMElement                               
        
  +                                                             * 
mp_encryptedTypeElement;      // Node at head of structure
  +     XERCES_CPP_NAMESPACE_QUALIFIER DOMElement
  +                                                             * 
mp_keyInfoElement;            // Any underlying KeyInfo
        XERCES_CPP_NAMESPACE_QUALIFIER DOMNode
  -                                                             * 
mp_keyInfoNode;                       // Any underlying KeyInfo
  -     XERCES_CPP_NAMESPACE_QUALIFIER DOMNode
  -                                                             * 
mp_cipherDataNode;            // CipherData structure
  +                                                             * 
mp_cipherDataElement;         // CipherData structure
        XENCCipherDataImpl                      * mp_cipherData;
        XENCEncryptionMethodImpl        * mp_encryptionMethod;
   
  @@ -154,13 +153,21 @@
   
        // Type URI
        XERCES_CPP_NAMESPACE_QUALIFIER DOMNode
  -                                                             * 
mp_typeAttributeNode;
  +                                                             * mp_typeAttr;
        XERCES_CPP_NAMESPACE_QUALIFIER DOMNode
  -                                                             * 
mp_mimeTypeAttributeNode;
  +                                                             * 
mp_mimeTypeAttr;
        XERCES_CPP_NAMESPACE_QUALIFIER DOMNode
  -                                                             * 
mp_encodingAttributeNode;
  +                                                             * 
mp_encodingAttr;
   
        friend class XENCCipherImpl;
  +
  +private:
  +
  +     // Un-implemented
  +
  +     XENCEncryptedTypeImpl();
  +     XENCEncryptedTypeImpl(const XENCEncryptedTypeImpl &);
  +     XENCEncryptedTypeImpl & operator = (const XENCEncryptedTypeImpl &);
   };
   
   #endif /* XENCENCRYPTEDTYPEIMPL_INCLUDE */
  
  
  
  1.4       +5 -5      xml-security/c/src/xenc/impl/XENCEncryptionMethodImpl.cpp
  
  Index: XENCEncryptionMethodImpl.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-security/c/src/xenc/impl/XENCEncryptionMethodImpl.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XENCEncryptionMethodImpl.cpp      20 Nov 2003 09:11:25 -0000      1.3
  +++ XENCEncryptionMethodImpl.cpp      23 Nov 2003 09:12:44 -0000      1.4
  @@ -284,7 +284,7 @@
   //                   Getter functions
   // 
--------------------------------------------------------------------------------
   
  -const XMLCh * XENCEncryptionMethodImpl::getDigestMethod(void) {
  +const XMLCh * XENCEncryptionMethodImpl::getDigestMethod(void) const {
   
        if (mp_digestAlgorithmAttr != NULL)
                return mp_digestAlgorithmAttr->getNodeValue();
  @@ -293,7 +293,7 @@
   
   }
   
  -const XMLCh * XENCEncryptionMethodImpl::getOAEPparams(void) {
  +const XMLCh * XENCEncryptionMethodImpl::getOAEPparams(void) const {
   
        if (mp_oaepParamsTextNode != NULL) {
                return mp_oaepParamsTextNode->getNodeValue();
  @@ -303,7 +303,7 @@
   
   }
   
  -const XMLCh * XENCEncryptionMethodImpl::getAlgorithm(void) {
  +const XMLCh * XENCEncryptionMethodImpl::getAlgorithm(void) const {
   
        if (mp_algorithmAttr != NULL) {
                return mp_algorithmAttr->getNodeValue();
  @@ -313,7 +313,7 @@
   
   }
   
  -int XENCEncryptionMethodImpl::getKeySize(void) {
  +int XENCEncryptionMethodImpl::getKeySize(void) const {
   
        if(mp_keySizeTextNode != NULL) {
   
  
  
  
  1.5       +6 -6      xml-security/c/src/xenc/impl/XENCEncryptionMethodImpl.hpp
  
  Index: XENCEncryptionMethodImpl.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-security/c/src/xenc/impl/XENCEncryptionMethodImpl.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XENCEncryptionMethodImpl.hpp      20 Nov 2003 09:11:25 -0000      1.4
  +++ XENCEncryptionMethodImpl.hpp      23 Nov 2003 09:12:44 -0000      1.5
  @@ -97,12 +97,12 @@
                                                const XMLCh * algorithm);
   
        // Interface
  -     const XMLCh * getAlgorithm(void);
  -     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void)
  +     const XMLCh * getAlgorithm(void) const;
  +     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) 
const
                {return mp_encryptionMethodElement;}
  -     virtual const XMLCh * getDigestMethod(void);
  -     virtual const XMLCh * getOAEPparams(void);
  -     virtual int getKeySize(void);
  +     virtual const XMLCh * getDigestMethod(void) const;
  +     virtual const XMLCh * getOAEPparams(void) const;
  +     virtual int getKeySize(void) const;
        virtual void setDigestMethod(const XMLCh * method);
        virtual void setOAEPparams(const XMLCh * params);
        virtual void setKeySize(int size);
  
  
  

Reply via email to