From: Scott Cantor Date: Tue, 14 Sep 2010 03:19:31 +0000 (+0000) Subject: Stop aborting on older xmlsec when whitelist/blacklist used. X-Git-Tag: 2.4RC1~46 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-sp.git;a=commitdiff_plain;h=6c203f0805f00da8c6781704350aa2f25d1e6662 Stop aborting on older xmlsec when whitelist/blacklist used. --- diff --git a/shibsp/impl/XMLServiceProvider.cpp b/shibsp/impl/XMLServiceProvider.cpp index 7fafe9c..d623c10 100644 --- a/shibsp/impl/XMLServiceProvider.cpp +++ b/shibsp/impl/XMLServiceProvider.cpp @@ -1987,20 +1987,22 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, const XMLConfig* o } if (first) { -#ifdef SHIBSP_XMLSEC_WHITELISTING - vector::const_iterator alg; if (!m_policy->getAlgorithmBlacklist().empty()) { - for (alg = m_policy->getAlgorithmBlacklist().begin(); alg != m_policy->getAlgorithmBlacklist().end(); ++alg) +#ifdef SHIBSP_XMLSEC_WHITELISTING + for (vector::const_iterator alg = m_policy->getAlgorithmBlacklist().begin(); alg != m_policy->getAlgorithmBlacklist().end(); ++alg) XSECPlatformUtils::blacklistAlgorithm(alg->c_str()); +#else + log.crit("XML-Security-C library prior to 1.6.0 does not support algorithm white/blacklists"); +#endif } else if (!m_policy->getAlgorithmWhitelist().empty()) { - for (alg = m_policy->getAlgorithmWhitelist().begin(); alg != m_policy->getAlgorithmWhitelist().end(); ++alg) +#ifdef SHIBSP_XMLSEC_WHITELISTING + for (vector::const_iterator alg = m_policy->getAlgorithmWhitelist().begin(); alg != m_policy->getAlgorithmWhitelist().end(); ++alg) XSECPlatformUtils::whitelistAlgorithm(alg->c_str()); - } #else - log.fatal("XML-Security-C library prior to 1.6.0 does not support algorithm white/blacklists"); - throw ConfigurationException("XML-Security-C library prior to 1.6.0 does not support algorithm white/blacklists."); + log.crit("XML-Security-C library prior to 1.6.0 does not support algorithm white/blacklists"); #endif + } } // Process TransportOption elements.