X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Fsignature%2Fimpl%2FXMLSecSignatureImpl.cpp;h=f3072c6775c51cb9e91f39b604e49d8520975346;hb=a5e86d37cf40004e6a43a21ab67d26695fa8619c;hp=388ceb067be56a152eeb4346051a3b2847cf19aa;hpb=d96a01ce4d9648bb3186f74d43610b6f12d49758;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/signature/impl/XMLSecSignatureImpl.cpp b/xmltooling/signature/impl/XMLSecSignatureImpl.cpp index 388ceb0..f3072c6 100644 --- a/xmltooling/signature/impl/XMLSecSignatureImpl.cpp +++ b/xmltooling/signature/impl/XMLSecSignatureImpl.cpp @@ -22,6 +22,7 @@ #include "internal.h" #include "exceptions.h" +#include "logging.h" #include "impl/UnknownElement.h" #include "security/Credential.h" #include "signature/KeyInfo.h" @@ -30,7 +31,6 @@ #include "util/XMLConstants.h" #include "util/XMLHelper.h" -#include #include #include #include @@ -45,8 +45,9 @@ #include using namespace xmlsignature; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; +using namespace xercesc; using namespace std; using xmlconstants::XMLSIG_NS; using xmlconstants::XMLSIG_PREFIX; @@ -306,9 +307,7 @@ DOMElement* XMLSecSignatureImpl::marshall(DOMDocument* document, const vectorgetKeyInfo(); - if (fromcred) - m_keyInfo = fromcred->cloneKeyInfo(); + m_keyInfo = credential->getKeyInfo(); } if (m_keyInfo && (!m_signature->getKeyInfoList() || m_signature->getKeyInfoList()->isEmpty())) { m_keyInfo->marshall(cachedDOM); @@ -391,9 +390,7 @@ DOMElement* XMLSecSignatureImpl::marshall(DOMElement* parentElement, const vecto if (credential) { delete m_keyInfo; m_keyInfo = NULL; - const KeyInfo* fromcred = credential->getKeyInfo(); - if (fromcred) - m_keyInfo = fromcred->cloneKeyInfo(); + m_keyInfo = credential->getKeyInfo(); } if (m_keyInfo && (!m_signature->getKeyInfoList() || m_signature->getKeyInfoList()->isEmpty())) { m_keyInfo->marshall(cachedDOM); @@ -436,7 +433,7 @@ Signature* XMLObject* #endif SignatureBuilder::buildObject( - const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType + const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType ) const { if (!XMLString::equals(nsURI,XMLSIG_NS) || !XMLString::equals(localName,Signature::LOCAL_NAME)) @@ -533,18 +530,3 @@ bool Signature::verifyRawSignature( throw SignatureException(string("Caught an XMLSecurity exception while verifying raw signature: ") + e.getMsg()); } } - -void Signature::extractNames(DSIGKeyInfoList* keyInfo, set& names) -{ - char* kn; - const XMLCh* n; - - for (size_t s=0; sgetSize(); s++) { - n=keyInfo->item(s)->getKeyName(); - if (n && *n) { - kn=toUTF8(n); - names.insert(kn); - delete[] kn; - } - } -}