You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by sc...@apache.org on 2017/09/20 16:45:38 UTC
svn commit: r1809052 - in /santuario/xml-security-cpp/trunk/xsec:
dsig/DSIGSignature.cpp tools/xtest/xtest.cpp
Author: scantor
Date: Wed Sep 20 16:45:37 2017
New Revision: 1809052
URL: http://svn.apache.org/viewvc?rev=1809052&view=rev
Log:
SANTUARIO-476 - Fix loading of Object elements
Modified:
santuario/xml-security-cpp/trunk/xsec/dsig/DSIGSignature.cpp
santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp
Modified: santuario/xml-security-cpp/trunk/xsec/dsig/DSIGSignature.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/dsig/DSIGSignature.cpp?rev=1809052&r1=1809051&r2=1809052&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/dsig/DSIGSignature.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/dsig/DSIGSignature.cpp Wed Sep 20 16:45:37 2017
@@ -719,11 +719,7 @@ void DSIGSignature::load(void) {
mp_signedInfo->load();
// Look at Signature Value
- tmpElt = tmpElt->getNextSibling();
-
- while (tmpElt != 0 && tmpElt->getNodeType() != DOMNode::ELEMENT_NODE)
- tmpElt = tmpElt->getNextSibling();
-
+ tmpElt = findNextElementChild(tmpElt);
if (tmpElt == 0 || !strEquals(getDSIGLocalName(tmpElt), "SignatureValue")) {
throw XSECException(XSECException::ExpectedDSIGChildNotFound,
@@ -748,11 +744,7 @@ void DSIGSignature::load(void) {
// Now look at KeyInfo
- tmpElt = tmpElt->getNextSibling();
-
- while (tmpElt != 0 && !((tmpElt->getNodeType() == DOMNode::ELEMENT_NODE) &&
- strEquals(getDSIGLocalName(tmpElt), "KeyInfo")))
- tmpElt = tmpElt->getNextSibling();
+ tmpElt = findNextElementChild(tmpElt);
if (tmpElt != 0 && strEquals(getDSIGLocalName(tmpElt), "KeyInfo")) {
Modified: santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp?rev=1809052&r1=1809051&r2=1809052&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp Wed Sep 20 16:45:37 2017
@@ -678,7 +678,6 @@ void unitTestBase64NodeSignature(DOMImpl
sig = prov.newSignature();
sig->setDSIGNSPrefix(MAKE_UNICODE_STRING("ds"));
sig->setPrettyPrint(true);
- sig->setIdByAttributeName(false); // Do not search by name
sigNode = sig->createBlankSignature(doc,
DSIGConstants::s_unicodeStrURIC14N_COM,
DSIGConstants::s_unicodeStrURIHMAC_SHA1);