blautenb    2003/10/28 03:05:49

  Modified:    c/src/dsig DSIGKeyInfoList.cpp
  Log:
  Fix RetrievalMethod so it works with EncryptedKey
  
  Revision  Changes    Path
  1.15      +9 -11     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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DSIGKeyInfoList.cpp       6 Oct 2003 12:16:37 -0000       1.14
  +++ DSIGKeyInfoList.cpp       28 Oct 2003 11:05:49 -0000      1.15
  @@ -329,14 +329,7 @@
                                        // Skip text and comments
                                        tmpKI = tmpKI->getNextSibling();
   
  -                             if (tmpKI == 0) {
  -
  -                                     throw 
XSECException(XSECException::ExpectedDSIGChildNotFound, 
  -                                                     "Expected <Transforms> 
within <KeyInfo>");
  -
  -                             }
  -
  -                             if (strEquals(getDSIGLocalName(tmpKI), 
"Transforms")) {
  +                             if (tmpKI != 0 && 
strEquals(getDSIGLocalName(tmpKI), "Transforms")) {
   
   
                                        // Process the transforms using the 
static function.
  @@ -379,6 +372,10 @@
   
                                case TXFMBase::DOM_NODE_DOCUMENT_FRAGMENT :
   
  +                                     element = 
chain->getLastTxfm()->getFragmentNode();
  +                                     if (element != NULL)
  +                                             addXMLKeyInfo((DOMNode *) 
element);
  +
                                        break;
   
                                case TXFMBase::DOM_NODE_XPATH_NODESET :
  @@ -421,9 +418,10 @@
   
                }
   
  -             tmpKI = tmpKI->getNextSibling();
  +             if (tmpKI != NULL)
  +                     tmpKI = tmpKI->getNextSibling();
   
  -             while (tmpKI != 0 && (tmpKI->getNodeType() != 
DOMNode::ELEMENT_NODE))
  +             while (tmpKI != NULL && (tmpKI->getNodeType() != 
DOMNode::ELEMENT_NODE))
                        tmpKI = tmpKI->getNextSibling();
   
        }
  
  
  

Reply via email to