Bug#915007: opensaml2 FTBFS with xmltooling 3

peter green plugwash at p10link.net
Thu Nov 29 12:24:36 GMT 2018


Package: opensaml2
Version: 2.6.1-1

opensaml2 FTBFS with the new xmltooling. I tried to fix it but I ran into error after error and eventually gave up.

I then had a poke around and noticed that an "opensaml" source package had recently been uploaded that seems to have taken over most of the binary package names from opensaml2. If the intention is for opensaml to replace opensaml2 can you file a removal request?

--- Below are my notes on the errors I ran into, an incomplete patch is attatched --

The first error I ran into was error: ‘XMLDateTime’ in namespace ‘xercesc’ does not name a type, I fixed this by including xercesc/util/XMLDateTime.hpp

It seems several apis had changed from std::auto_ptr to boost::scoped_ptr, I updated the field declarations as appropriate.

Thirdly newPlugin seems to have added a new parameter

@param deprecationSupport true iff the plugin should recognize/support its deprecated features

I set this to true.

Fourthly xmltooling/util/DateTime.h no longer seems to exist I replaced this with xercesc/util/XMLDateTime.hpp

I then ran into

saml1/core/impl/ProtocolsImpl.cpp:397:13: error: invalid covariant return type for ‘virtual const xercesc_3_2::XMLDateTime* opensaml::saml1p::RequestAbstractTypeImpl::getIssueInstant() const’
               IMPL_DATETIME_ATTRIB(IssueInstant,0);

Which I fixed by modifying saml/RootObject.h to make xmltooling::DateTime an alias for xercesc_3_2::XMLDateTime

Next I ran into an error with setIdAttributeNS , it seems XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE is no longer defined, but the function signature is as if it was defined. I defined it.

Next it seems that constructing a DateTime from an epoch requires specifying if it is a duration or not. It appeared not to be so I set the parameter to false.

Next it seems getCredentalContext has been renamed to getCredentialContext



-------------- next part --------------
Description: Fix FTBFS with xmltooling 3
 Replace xsecsize_t with XMLSize_t, the former seems to have been removed.
Author: Peter Michael Green <plugwash at raspbian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-11-29

Index: opensaml2-2.6.1/saml/binding/impl/SAMLArtifact.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/binding/impl/SAMLArtifact.cpp
+++ opensaml2-2.6.1/saml/binding/impl/SAMLArtifact.cpp
@@ -79,7 +79,7 @@ SAMLArtifact::SAMLArtifact(const SAMLArt
 
 SAMLArtifact::SAMLArtifact(const char* s)
 {
-    xsecsize_t len=0;
+    XMLSize_t len=0;
     XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(s),&len);
     if (!decoded)
         throw ArtifactException("Unable to decode base64 artifact.");
@@ -110,7 +110,7 @@ string SAMLArtifact::getRemainingArtifac
 
 string SAMLArtifact::encode() const
 {
-    xsecsize_t len=0;
+    XMLSize_t len=0;
     XMLByte* out=Base64::encode(reinterpret_cast<const XMLByte*>(m_raw.data()),m_raw.size(),&len);
     if (out) {
         string ret(reinterpret_cast<char*>(out),len);
@@ -127,7 +127,7 @@ string SAMLArtifact::encode() const
 SAMLArtifact* SAMLArtifact::parse(const char* s)
 {
     // Decode and extract the type code first.
-    xsecsize_t len=0;
+    XMLSize_t len=0;
     XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(s),&len);
     if (!decoded)
         throw ArtifactException("Artifact parser unable to decode base64-encoded artifact.");
@@ -141,7 +141,7 @@ SAMLArtifact* SAMLArtifact::parse(const
     XMLString::release((char**)&decoded);
 #endif
     
-    return SAMLConfig::getConfig().SAMLArtifactManager.newPlugin(type,s);
+    return SAMLConfig::getConfig().SAMLArtifactManager.newPlugin(type,s,true);
 }
 
 SAMLArtifact* SAMLArtifact::parse(const XMLCh* s)
Index: opensaml2-2.6.1/saml/binding/impl/ArtifactMap.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/binding/impl/ArtifactMap.cpp
+++ opensaml2-2.6.1/saml/binding/impl/ArtifactMap.cpp
@@ -75,7 +75,7 @@ namespace opensaml {
 
         void removeMapping(const map<string,Mapping>::iterator& i);
         
-        auto_ptr<Mutex> m_lock;
+        boost::scoped_ptr<Mutex> m_lock;
         map<string,Mapping> m_artMap;
         multimap<time_t,string> m_expMap;
     };
Index: opensaml2-2.6.1/saml/binding/impl/SimpleSigningRule.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/binding/impl/SimpleSigningRule.cpp
+++ opensaml2-2.6.1/saml/binding/impl/SimpleSigningRule.cpp
@@ -151,7 +151,7 @@ bool SimpleSigningRule::evaluate(const X
         // Serializing the XMLObject doesn't guarantee the signature will verify (this is
         // why XMLSignature exists, and why this isn't really "simpler").
 
-        xsecsize_t x;
+        XMLSize_t x;
         pch = httpRequest->getParameter("SAMLRequest");
         if (pch) {
             XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(pch),&x);
@@ -191,7 +191,7 @@ bool SimpleSigningRule::evaluate(const X
     KeyInfo* keyInfo=nullptr;
     pch = request->getParameter("KeyInfo");
     if (pch) {
-        xsecsize_t x;
+        XMLSize_t x;
         XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(pch),&x);
         if (decoded) {
             try {
Index: opensaml2-2.6.1/saml/saml1/core/Assertions.h
===================================================================
--- opensaml2-2.6.1.orig/saml/saml1/core/Assertions.h
+++ opensaml2-2.6.1/saml/saml1/core/Assertions.h
@@ -32,13 +32,15 @@
 
 #include <xmltooling/ElementProxy.h>
 #include <xmltooling/ConcreteXMLObjectBuilder.h>
+#include <xercesc/util/XMLDateTime.hpp>
 
 #define DECL_SAML1OBJECTBUILDER(cname) \
     DECL_XMLOBJECTBUILDER(SAML_API,cname,samlconstants::SAML1_NS,samlconstants::SAML1_PREFIX)
 
-namespace xmltooling {
-    class XMLTOOL_API DateTime;
-};
+#include "saml/RootObject.h"
+//namespace xmltooling {
+//    class XMLTOOL_API DateTime;
+//};
 
 namespace xmlsignature {
     class XMLTOOL_API KeyInfo;
Index: opensaml2-2.6.1/saml/saml2/core/Assertions.h
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/core/Assertions.h
+++ opensaml2-2.6.1/saml/saml2/core/Assertions.h
@@ -32,6 +32,7 @@
 
 #include <xmltooling/ConcreteXMLObjectBuilder.h>
 #include <xmltooling/ElementProxy.h>
+#include <xercesc/util/XMLDateTime.hpp>
 
 #define DECL_SAML2OBJECTBUILDER(cname) \
     DECL_XMLOBJECTBUILDER(SAML_API,cname,samlconstants::SAML20_NS,samlconstants::SAML20_PREFIX)
@@ -39,7 +40,7 @@
 namespace xmltooling {
     class XMLTOOL_API CredentialCriteria;
     class XMLTOOL_API CredentialResolver;
-    class XMLTOOL_API DateTime;
+//    class XMLTOOL_API DateTime;
 };
 
 namespace xmlencryption {
Index: opensaml2-2.6.1/saml/saml2/metadata/Metadata.h
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/Metadata.h
+++ opensaml2-2.6.1/saml/saml2/metadata/Metadata.h
@@ -32,7 +32,7 @@
 #include <ctime>
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xmltooling/util/Predicates.h>
-
+#include <xercesc/util/XMLDateTime.hpp>
 
 #define DECL_SAML2MDOBJECTBUILDER(cname) \
     DECL_XMLOBJECTBUILDER(SAML_API,cname,samlconstants::SAML20MD_NS,samlconstants::SAML20MD_PREFIX)
Index: opensaml2-2.6.1/saml/saml1/core/impl/AssertionsImpl.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml1/core/impl/AssertionsImpl.cpp
+++ opensaml2-2.6.1/saml/saml1/core/impl/AssertionsImpl.cpp
@@ -36,7 +36,7 @@
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/signature/KeyInfo.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
+#include <xercesc/util/XMLDateTime.hpp>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
@@ -47,6 +47,8 @@
 #include <boost/lambda/lambda.hpp>
 #include <xercesc/util/XMLUniDefs.hpp>
 
+#define XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
+
 using namespace opensaml::saml1;
 using namespace xmltooling;
 using namespace std;
@@ -972,7 +974,7 @@ namespace opensaml {
                 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch,false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
             }
Index: opensaml2-2.6.1/saml/RootObject.h
===================================================================
--- opensaml2-2.6.1.orig/saml/RootObject.h
+++ opensaml2-2.6.1/saml/RootObject.h
@@ -28,9 +28,11 @@
 #define __saml_root_h__
 
 #include <saml/signature/SignableObject.h>
+#include <xercesc/util/XMLDateTime.hpp>
 
 namespace xmltooling {
-    class XMLTOOL_API DateTime;
+    //class XMLTOOL_API DateTime;
+    typedef xercesc_3_2::XMLDateTime DateTime;
 };
 
 namespace opensaml {
Index: opensaml2-2.6.1/saml/profile/impl/ConditionsRule.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/profile/impl/ConditionsRule.cpp
+++ opensaml2-2.6.1/saml/profile/impl/ConditionsRule.cpp
@@ -97,7 +97,7 @@ ConditionsRule::ConditionsRule(const DOM
         if (!t.empty()) {
             try {
                 log.info("building SecurityPolicyRule of type %s", t.c_str());
-                m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(t.c_str(), e));
+                m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(t.c_str(), e,true));
             }
             catch (std::exception& ex) {
                 log.crit("error building SecurityPolicyRule: %s", ex.what());
Index: opensaml2-2.6.1/saml/saml1/binding/impl/SAML1POSTDecoder.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml1/binding/impl/SAML1POSTDecoder.cpp
+++ opensaml2-2.6.1/saml/saml1/binding/impl/SAML1POSTDecoder.cpp
@@ -97,7 +97,7 @@ XMLObject* SAML1POSTDecoder::decode(
     relayState = TARGET;
 
     // Decode the base64 into XML.
-    xsecsize_t x;
+    XMLSize_t x;
     XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(samlResponse),&x);
     if (!decoded)
         throw BindingException("Unable to decode base64 in POST profile response.");
Index: opensaml2-2.6.1/saml/saml1/binding/impl/SAML1POSTEncoder.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml1/binding/impl/SAML1POSTEncoder.cpp
+++ opensaml2-2.6.1/saml/saml1/binding/impl/SAML1POSTEncoder.cpp
@@ -163,7 +163,7 @@ long SAML1POSTEncoder::encode(
     log.debug("marshalled response:\n%s", xmlbuf.c_str());
     
     // Replace with base-64 encoded version.
-    xsecsize_t len=0;
+    XMLSize_t len=0;
     XMLByte* out=Base64::encode(reinterpret_cast<const XMLByte*>(xmlbuf.data()),xmlbuf.size(),&len);
     if (out) {
         xmlbuf.erase();
Index: opensaml2-2.6.1/saml/saml1/core/Protocols.h
===================================================================
--- opensaml2-2.6.1.orig/saml/saml1/core/Protocols.h
+++ opensaml2-2.6.1/saml/saml1/core/Protocols.h
@@ -33,12 +33,14 @@
 #include <xmltooling/ConcreteXMLObjectBuilder.h>
 #include <xmltooling/ElementExtensibleXMLObject.h>
 
+#include <xercesc/util/XMLDateTime.hpp>
+
 #define DECL_SAML1POBJECTBUILDER(cname) \
     DECL_XMLOBJECTBUILDER(SAML_API,cname,samlconstants::SAML1P_NS,samlconstants::SAML1P_PREFIX)
 
-namespace xmltooling {
-    class XMLTOOL_API DateTime;
-};
+//namespace xmltooling {
+//    class XMLTOOL_API DateTime;
+//};
 
 namespace xmlsignature {
     class XMLTOOL_API KeyInfo;
Index: opensaml2-2.6.1/saml/saml1/core/impl/ProtocolsImpl.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml1/core/impl/ProtocolsImpl.cpp
+++ opensaml2-2.6.1/saml/saml1/core/impl/ProtocolsImpl.cpp
@@ -36,7 +36,7 @@
 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
+#include <xercesc/util/XMLDateTime.hpp>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
@@ -46,6 +46,8 @@
 #include <boost/lambda/lambda.hpp>
 #include <xercesc/util/XMLUniDefs.hpp>
 
+#define XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
+
 using namespace opensaml::saml1p;
 using namespace xmltooling;
 using namespace std;
@@ -421,7 +423,7 @@ namespace opensaml {
                 }
                 if (!m_IssueInstant) {
                     const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch,false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
             }
@@ -783,7 +785,7 @@ namespace opensaml {
                 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<ResponseAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<ResponseAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<ResponseAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch,false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
                 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,nullptr);
Index: opensaml2-2.6.1/saml/saml2/core/impl/Assertions.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/core/impl/Assertions.cpp
+++ opensaml2-2.6.1/saml/saml2/core/impl/Assertions.cpp
@@ -80,7 +80,7 @@ void EncryptedElementType::encrypt(
         // The problem is that if we don't support them, the only case we can detect
         // is if neither algorithm type is set *and* there's an EncryptionMethod present.
         dataalg = keyalg = nullptr;
-        const MetadataCredentialContext* metaCtx = dynamic_cast<const MetadataCredentialContext*>((*c)->getCredentalContext());
+        const MetadataCredentialContext* metaCtx = dynamic_cast<const MetadataCredentialContext*>((*c)->getCredentialContext());
         if (metaCtx) {
             const vector<EncryptionMethod*>& encMethods = metaCtx->getKeyDescriptor().getEncryptionMethods();
             for (vector<EncryptionMethod*>::const_iterator meth = encMethods.begin(); meth != encMethods.end(); ++meth) {
@@ -183,7 +183,7 @@ void EncryptedElementType::encrypt(
             // The problem is that if we don't support them, the only case we can detect
             // is if neither algorithm type is set *and* there's an EncryptionMethod present.
             keyalg = nullptr;
-            const MetadataCredentialContext* metaCtx = dynamic_cast<const MetadataCredentialContext*>((*c)->getCredentalContext());
+            const MetadataCredentialContext* metaCtx = dynamic_cast<const MetadataCredentialContext*>((*c)->getCredentialContext());
             if (metaCtx) {
                 const vector<EncryptionMethod*>& encMethods = metaCtx->getKeyDescriptor().getEncryptionMethods();
                 for (vector<EncryptionMethod*>::const_iterator meth = encMethods.begin(); meth != encMethods.end(); ++meth) {
Index: opensaml2-2.6.1/saml/saml2/core/impl/Assertions20Impl.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/core/impl/Assertions20Impl.cpp
+++ opensaml2-2.6.1/saml/saml2/core/impl/Assertions20Impl.cpp
@@ -37,7 +37,7 @@
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/signature/KeyInfo.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
+#include <xercesc/util/XMLDateTime.hpp>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
@@ -1426,7 +1426,7 @@ namespace opensaml {
                 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch,false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
             }
Index: opensaml2-2.6.1/saml/saml2/core/impl/Protocols20Impl.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/core/impl/Protocols20Impl.cpp
+++ opensaml2-2.6.1/saml/saml2/core/impl/Protocols20Impl.cpp
@@ -36,7 +36,7 @@
 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
+#include <xercesc/util/XMLDateTime.hpp>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
@@ -372,7 +372,7 @@ namespace opensaml {
                 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch,false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
                 MARSHALL_STRING_ATTRIB(Destination,DESTINATION,nullptr);
@@ -1072,7 +1072,7 @@ namespace opensaml {
                 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch,false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
                 MARSHALL_STRING_ATTRIB(Destination,DESTINATION,nullptr);
Index: opensaml2-2.6.1/saml/saml2/metadata/AbstractMetadataProvider.h
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/AbstractMetadataProvider.h
+++ opensaml2-2.6.1/saml/saml2/metadata/AbstractMetadataProvider.h
@@ -163,7 +163,7 @@ namespace opensaml {
             mutable groupmap_t m_groups;
 
             std::auto_ptr<xmltooling::KeyInfoResolver> m_resolverWrapper;
-            mutable std::auto_ptr<xmltooling::Mutex> m_credentialLock;
+            mutable boost::scoped_ptr<xmltooling::Mutex> m_credentialLock;
             typedef std::map< const RoleDescriptor*, std::vector<xmltooling::Credential*> > credmap_t;
             mutable credmap_t m_credentialMap;
             const credmap_t::mapped_type& resolveCredentials(const RoleDescriptor& role) const;
Index: opensaml2-2.6.1/saml/saml2/metadata/DynamicMetadataProvider.h
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/DynamicMetadataProvider.h
+++ opensaml2-2.6.1/saml/saml2/metadata/DynamicMetadataProvider.h
@@ -74,7 +74,7 @@ namespace opensaml {
 
         private:
             std::string m_id;
-            std::auto_ptr<xmltooling::RWLock> m_lock;
+            boost::scoped_ptr<xmltooling::RWLock> m_lock;
             double m_refreshDelayFactor;
             time_t m_minCacheDuration, m_maxCacheDuration;
             typedef std::map<xmltooling::xstring,time_t> cachemap_t;
Index: opensaml2-2.6.1/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
+++ opensaml2-2.6.1/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
@@ -41,7 +41,7 @@
 #include <xmltooling/security/Credential.h>
 #include <xmltooling/security/KeyInfoResolver.h>
 #include <xmltooling/security/SecurityHelper.h>
-#include <xmltooling/util/DateTime.h>
+#include <xercesc/util/XMLDateTime.hpp>
 #include <xmltooling/util/Threads.h>
 #include <xmltooling/util/XMLHelper.h>
 
@@ -63,7 +63,7 @@ AbstractMetadataProvider::AbstractMetada
     if (e) {
         string t = XMLHelper::getAttrString(e, nullptr, _type);
         if (!t.empty()) {
-            m_resolverWrapper.reset(XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), e));
+            m_resolverWrapper.reset(XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), e,true));
             m_resolver = m_resolverWrapper.get();
         }
         else {
@@ -87,7 +87,7 @@ void AbstractMetadataProvider::outputSta
     }
 
     if (m_lastUpdate > 0) {
-        DateTime ts(m_lastUpdate);
+        DateTime ts(m_lastUpdate,false);
         ts.parseDateTime();
         auto_ptr_char timestamp(ts.getFormattedString());
         os << " lastUpdate='" << timestamp.get() << "'";
Index: opensaml2-2.6.1/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp
+++ opensaml2-2.6.1/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp
@@ -73,7 +73,7 @@ BlacklistMetadataFilter::BlacklistMetada
 {
     string matcher(XMLHelper::getAttrString(e, nullptr, _matcher));
     if (!matcher.empty())
-        m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(matcher.c_str(), e));
+        m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(matcher.c_str(), e,true));
 
     e = XMLHelper::getFirstChildElement(e, Exclude);
     while (e) {
Index: opensaml2-2.6.1/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp
+++ opensaml2-2.6.1/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp
@@ -112,7 +112,7 @@ namespace opensaml {
 
         private:
             bool m_firstMatch;
-            mutable auto_ptr<Mutex> m_trackerLock;
+            mutable boost::scoped_ptr<Mutex> m_trackerLock;
             auto_ptr<ThreadKey> m_tlsKey;
             mutable ptr_vector<MetadataProvider> m_providers;
             mutable set<tracker_t*> m_trackers;
@@ -189,7 +189,7 @@ ChainingMetadataProvider::ChainingMetada
         if (!t.empty()) {
             try {
                 m_log.info("building MetadataProvider of type %s", t.c_str());
-                auto_ptr<MetadataProvider> provider(SAMLConfig::getConfig().MetadataProviderManager.newPlugin(t.c_str(), e));
+                auto_ptr<MetadataProvider> provider(SAMLConfig::getConfig().MetadataProviderManager.newPlugin(t.c_str(), e,true));
                 ObservableMetadataProvider* obs = dynamic_cast<ObservableMetadataProvider*>(provider.get());
                 if (obs)
                     obs->addObserver(this);
Index: opensaml2-2.6.1/saml/saml2/metadata/impl/DiscoverableMetadataProvider.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/impl/DiscoverableMetadataProvider.cpp
+++ opensaml2-2.6.1/saml/saml2/metadata/impl/DiscoverableMetadataProvider.cpp
@@ -65,7 +65,7 @@ DiscoverableMetadataProvider::Discoverab
             string m(XMLHelper::getAttrString(e, nullptr, matcher));
             if (!m.empty()) {
                 try {
-                    boost::shared_ptr<EntityMatcher> temp(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(m, e));
+                    boost::shared_ptr<EntityMatcher> temp(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(m, e, true));
                     m_discoFilters.push_back(make_pair(t == "Whitelist", temp));
                 }
                 catch (std::exception& ex) {
Index: opensaml2-2.6.1/saml/saml2/metadata/impl/MetadataCredentialCriteria.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/impl/MetadataCredentialCriteria.cpp
+++ opensaml2-2.6.1/saml/saml2/metadata/impl/MetadataCredentialCriteria.cpp
@@ -45,7 +45,7 @@ MetadataCredentialCriteria::MetadataCred
 
 bool MetadataCredentialCriteria::matches(const Credential& credential) const
 {
-    const MetadataCredentialContext* context = dynamic_cast<const MetadataCredentialContext*>(credential.getCredentalContext());
+    const MetadataCredentialContext* context = dynamic_cast<const MetadataCredentialContext*>(credential.getCredentialContext());
     if (context) {
         // Check for a usage mismatch.
         if ((getUsage() & (xmltooling::Credential::SIGNING_CREDENTIAL | xmltooling::Credential::TLS_CREDENTIAL)) &&
Index: opensaml2-2.6.1/saml/saml2/metadata/impl/MetadataImpl.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/impl/MetadataImpl.cpp
+++ opensaml2-2.6.1/saml/saml2/metadata/impl/MetadataImpl.cpp
@@ -40,7 +40,7 @@
 #include <xmltooling/security/CredentialResolver.h>
 #include <xmltooling/signature/KeyInfo.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
+#include <xercesc/util/XMLDateTime.hpp>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
Index: opensaml2-2.6.1/saml/saml2/metadata/impl/MetadataProvider.cpp
===================================================================
--- opensaml2-2.6.1.orig/saml/saml2/metadata/impl/MetadataProvider.cpp
+++ opensaml2-2.6.1/saml/saml2/metadata/impl/MetadataProvider.cpp
@@ -117,7 +117,7 @@ MetadataProvider::MetadataProvider(const
             }
             else if (XMLString::equals(child->getLocalName(), SigFilter)) {
                 log.info("building MetadataFilter of type %s", SIGNATURE_METADATA_FILTER);
-                m_filters.push_back(conf.MetadataFilterManager.newPlugin(SIGNATURE_METADATA_FILTER, child));
+                m_filters.push_back(conf.MetadataFilterManager.newPlugin(SIGNATURE_METADATA_FILTER, child,true));
             }
             else if (XMLString::equals(child->getLocalName(), Whitelist)) {
                 log.info("building MetadataFilter of type %s", WHITELIST_METADATA_FILTER);


More information about the Pkg-shibboleth-devel mailing list