[cpp-opensaml COMMIT] in /branches/REL_2: configure.ac cpp-opensaml2.sln saml/SAMLConfig.cpp saml/binding/ArtifactMap...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Dec 14 09:24:07 GMT 2011
Author: scantor
Date: Wed Dec 14 09:24:07 2011
New Revision: 683
URL: http://svn.shibboleth.net/view/cpp-opensaml?rev=683&view=rev
Log:
Boost related changes
Modified:
branches/REL_2/configure.ac
branches/REL_2/cpp-opensaml2.sln
branches/REL_2/saml/SAMLConfig.cpp
branches/REL_2/saml/binding/ArtifactMap.h
branches/REL_2/saml/binding/SecurityPolicy.h
branches/REL_2/saml/binding/impl/ArtifactMap.cpp
branches/REL_2/saml/binding/impl/SecurityPolicy.cpp
branches/REL_2/saml/encryption/EncryptedKeyResolver.cpp
branches/REL_2/saml/internal.h
branches/REL_2/saml/profile/impl/AudienceRestrictionRule.cpp
branches/REL_2/saml/profile/impl/ConditionsRule.cpp
branches/REL_2/saml/profile/impl/IgnoreRule.cpp
branches/REL_2/saml/signature/ContentReference.cpp
branches/REL_2/saml/util/CommonDomainCookie.cpp
branches/REL_2/samltest/Makefile.am
branches/REL_2/samltest/samltest.vcxproj
branches/REL_2/samltest/samltest.vcxproj.filters
Modified: branches/REL_2/configure.ac
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/configure.ac?rev=683&r1=682&r2=683&view=diff
==============================================================================
--- branches/REL_2/configure.ac (original)
+++ branches/REL_2/configure.ac Wed Dec 14 09:24:07 2011
@@ -140,6 +140,14 @@
# C++ requirements
AC_CXX_NAMESPACES
AC_CXX_REQUIRE_STL
+
+# Boost
+BOOST_REQUIRE
+BOOST_BIND
+BOOST_LAMBDA
+BOOST_PTR_CONTAINER
+BOOST_STRING_ALGO
+CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
# log4shib settings (favor this version over the log4cpp code)
AC_PATH_PROG(LOG4SHIB_CONFIG,log4shib-config)
Modified: branches/REL_2/cpp-opensaml2.sln
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/cpp-opensaml2.sln?rev=683&r1=682&r2=683&view=diff
==============================================================================
--- branches/REL_2/cpp-opensaml2.sln (original)
+++ branches/REL_2/cpp-opensaml2.sln Wed Dec 14 09:24:07 2011
@@ -61,6 +61,7 @@
m4\acinclude.m4 = m4\acinclude.m4
m4\acx_pthread.m4 = m4\acx_pthread.m4
m4\ax_create_pkgconfig_info.m4 = m4\ax_create_pkgconfig_info.m4
+ m4\boost.m4 = m4\boost.m4
config_win32.h = config_win32.h
configure.ac = configure.ac
doxygen.am = doxygen.am
Modified: branches/REL_2/saml/SAMLConfig.cpp
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/SAMLConfig.cpp?rev=683&r1=682&r2=683&view=diff
==============================================================================
--- branches/REL_2/saml/SAMLConfig.cpp (original)
+++ branches/REL_2/saml/SAMLConfig.cpp Wed Dec 14 09:24:07 2011
@@ -61,6 +61,10 @@
#include <xmltooling/util/PathResolver.h>
#include <xmltooling/util/Threads.h>
+#include <boost/lambda/bind.hpp>
+#include <boost/lambda/casts.hpp>
+#include <boost/lambda/lambda.hpp>
+
#include <xsec/enc/XSECCryptoException.hpp>
#include <xsec/enc/XSECCryptoProvider.hpp>
#include <xsec/utils/XSECPlatformUtils.hpp>
@@ -69,6 +73,8 @@
using namespace xmlsignature;
using namespace xmltooling::logging;
using namespace xmltooling;
+using namespace boost::lambda;
+using namespace boost;
using namespace std;
// Expose entry points when used as an extension library
@@ -114,6 +120,7 @@
SAMLConfig::~SAMLConfig()
{
+ delete m_artifactMap;
}
ArtifactMap* SAMLConfig::getArtifactMap() const
@@ -287,15 +294,19 @@
void opensaml::annotateException(XMLToolingException* e, const EntityDescriptor* entity, const Status* status, bool rethrow)
{
+ time_t now = time(nullptr);
const RoleDescriptor* role = nullptr;
+ static bool (TimeBoundSAMLObject::* isValid)(time_t) const = &TimeBoundSAMLObject::isValid;
+
if (entity) {
- const list<XMLObject*>& roles=entity->getOrderedChildren();
- for (list<XMLObject*>::const_iterator child=roles.begin(); !role && child!=roles.end(); ++child) {
- role=dynamic_cast<RoleDescriptor*>(*child);
- if (role && !role->isValid())
- role = nullptr;
- }
- }
+ const XMLObject* r = find_if(
+ entity->getOrderedChildren(),
+ (ll_dynamic_cast<const RoleDescriptor*>(_1) != nullptr && lambda::bind(isValid, ll_dynamic_cast<const TimeBoundSAMLObject*>(_1), now))
+ );
+ if (r)
+ role = dynamic_cast<const RoleDescriptor*>(r);
+ }
+
annotateException(e, role, status, rethrow);
}
Modified: branches/REL_2/saml/binding/ArtifactMap.h
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/binding/ArtifactMap.h?rev=683&r1=682&r2=683&view=diff
==============================================================================
--- branches/REL_2/saml/binding/ArtifactMap.h (original)
+++ branches/REL_2/saml/binding/ArtifactMap.h Wed Dec 14 09:24:07 2011
@@ -110,7 +110,7 @@
private:
xmltooling::StorageService* m_storage;
std::string m_context;
- ArtifactMappings* m_mappings;
+ std::auto_ptr<ArtifactMappings> m_mappings;
unsigned int m_artifactTTL;
};
[... 875 lines stripped ...]
More information about the commits
mailing list