[shibboleth-sp2] 04/23: Remove legacy Xerces support.

Ferenc Wágner wferi at moszumanska.debian.org
Wed Feb 21 10:57:06 UTC 2018


This is an automated email from the git hooks/post-receive script.

wferi pushed a commit to branch master
in repository shibboleth-sp2.

commit 58e655583dabc883ef161ee1c6a37c224b083845
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   Mon Nov 27 16:47:09 2017 -0500

    Remove legacy Xerces support.
---
 config_win32.h                                    |  7 ------
 configure.ac                                      | 30 ++++-------------------
 iis7_shib/IIS7Request.cpp                         |  4 ---
 isapi_shib/isapi_shib.cpp                         |  4 ---
 plugins/GSSAPIAttributeExtractor.cpp              |  4 ---
 shibsp/attribute/Base64AttributeDecoder.cpp       | 12 ---------
 shibsp/attribute/BinaryAttribute.cpp              |  8 ------
 shibsp/attribute/XMLAttribute.cpp                 |  4 ---
 shibsp/binding/impl/XMLProtocolProvider.cpp       |  7 +-----
 shibsp/config_pub.h.in                            |  6 -----
 shibsp/config_pub_win32.h                         |  7 ------
 shibsp/handler/impl/AttributeCheckerHandler.cpp   |  7 +-----
 shibsp/handler/impl/ChainingLogoutInitiator.cpp   |  7 +-----
 shibsp/handler/impl/ChainingSessionInitiator.cpp  |  7 +-----
 shibsp/handler/impl/DiscoveryFeed.cpp             |  7 +-----
 shibsp/handler/impl/RemotedHandler.cpp            | 16 ------------
 shibsp/handler/impl/SAML2SessionInitiator.cpp     | 11 +--------
 shibsp/handler/impl/SecuredHandler.cpp            |  7 +-----
 shibsp/handler/impl/TransformSessionInitiator.cpp |  7 +-----
 shibsp/impl/XMLRequestMapper.cpp                  |  7 +-----
 shibsp/impl/XMLSecurityPolicyProvider.cpp         |  7 +-----
 shibsp/impl/XMLServiceProvider.cpp                | 28 +++------------------
 shibsp/lite/CommonDomainCookie.cpp                |  8 ------
 23 files changed, 19 insertions(+), 193 deletions(-)

diff --git a/config_win32.h b/config_win32.h
index dc02350..d8f8700 100644
--- a/config_win32.h
+++ b/config_win32.h
@@ -51,13 +51,6 @@
 /* Define if log4cpp library is used. */
 /* #undef SHIBSP_LOG4CPP */
 
-#include <xercesc/util/XercesVersion.hpp>
-
-#if (XERCES_VERSION_MAJOR < 3)
-# define SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE 1
-# define SHIBSP_XERCESC_SHORT_ACCEPTNODE 1
-#endif
-
 /* Define to 1 if you have the <memory.h> header file. */
 #define HAVE_MEMORY_H 1
 
diff --git a/configure.ac b/configure.ac
index 9ea8ee0..f99d718 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,41 +230,21 @@ fi
 
 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,AC_MSG_ERROR([unable to find xerces header files]))
 AC_MSG_CHECKING([Xerces version])
+
 AC_PREPROC_IFELSE(
     [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
-[#if  _XERCES_VERSION >= 20700
+[#if  _XERCES_VERSION >= 30000
 int i = 0;
 #else
-#error version 2.7.0 or above required
+#error cannot use version 1.x or 2.x
 #endif])],
     [AC_MSG_RESULT(OK)],
-    [AC_MSG_FAILURE([Xerces-C v2.7.0 or higher is required, v3.x preferred])])
+    [AC_MSG_FAILURE([Xerces-C 3.x is required])])
+
 AC_LINK_IFELSE(
     [AC_LANG_PROGRAM([[#include <xercesc/util/PlatformUtils.hpp>]],[[xercesc::XMLPlatformUtils::Initialize()]])],
     ,[AC_MSG_ERROR([unable to link with Xerces])])
 
-AC_MSG_CHECKING([whether Xerces XMLString::release(XMLByte**) exists])
-AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[#include <xercesc/util/XMLString.hpp>]],
-    [[using namespace XERCES_CPP_NAMESPACE; XMLByte* buf=NULL; XMLString::release(&buf);]])],
-    [AC_MSG_RESULT([yes])AC_DEFINE([SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE],[1],[Define to 1 if Xerces XMLString includes XMLByte release.])],
-    [AC_MSG_RESULT([no])])
-
-AC_MSG_CHECKING([whether Xerces DOMNodeFilter API returns a short])
-AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[#include <xercesc/dom/DOM.hpp>]],
-        [[using namespace XERCES_CPP_NAMESPACE;
-      class Blocker : public DOMNodeFilter {
-      public:
-        short acceptNode(const DOMNode* node) const {
-            return FILTER_REJECT;
-        }
-      };
-      static Blocker g_Blocker;
-    ]])],
-    [AC_MSG_RESULT([yes])AC_DEFINE([SHIBSP_XERCESC_SHORT_ACCEPTNODE],[1],[Define to 1 if Xerces DOMNodeFilter API returns a short.])],
-    [AC_MSG_RESULT([no])])
-
 # XML-Security settings
 AC_ARG_WITH(xmlsec,
     AS_HELP_STRING([--with-xmlsec=PATH],[where xmlsec is installed]),,
diff --git a/iis7_shib/IIS7Request.cpp b/iis7_shib/IIS7Request.cpp
index bb53f6e..50c89ef 100644
--- a/iis7_shib/IIS7Request.cpp
+++ b/iis7_shib/IIS7Request.cpp
@@ -214,11 +214,7 @@ const vector<string>& IIS7Request::getClientCertificates() const
         XMLSize_t outlen;
         XMLByte* serialized = Base64::encode(reinterpret_cast<XMLByte*>(certInfo->pCertEncoded), certInfo->CertEncodedSize, &outlen);
         m_certs.push_back(reinterpret_cast<char*>(serialized));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-        XMLString::release(&serialized);
-#else
         XMLString::release((char**)&serialized);
-#endif
     }
     return m_certs;
 }
diff --git a/isapi_shib/isapi_shib.cpp b/isapi_shib/isapi_shib.cpp
index 3ced9e8..ccf458b 100644
--- a/isapi_shib/isapi_shib.cpp
+++ b/isapi_shib/isapi_shib.cpp
@@ -1005,11 +1005,7 @@ public:
                 XMLSize_t outlen;
                 XMLByte* serialized = Base64::encode(reinterpret_cast<XMLByte*>(CertificateBuf), ccex.CertContext.cbCertEncoded, &outlen);
                 m_certs.push_back(reinterpret_cast<char*>(serialized));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                XMLString::release(&serialized);
-#else
                 XMLString::release((char**)&serialized);
-#endif
             }
         }
       }
diff --git a/plugins/GSSAPIAttributeExtractor.cpp b/plugins/GSSAPIAttributeExtractor.cpp
index e17ccac..ad86289 100644
--- a/plugins/GSSAPIAttributeExtractor.cpp
+++ b/plugins/GSSAPIAttributeExtractor.cpp
@@ -375,11 +375,7 @@ void GSSAPIExtractor::extractAttributes(
                 gss = GSS_C_NO_CONTEXT;
             }
         }
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-        XMLString::release(&decoded);
-#else
         XMLString::release((char**)&decoded);
-#endif
     }
     else {
         m_log.warn("unable to extract attributes, base64 decode of GSSAPI context or name failed");
diff --git a/shibsp/attribute/Base64AttributeDecoder.cpp b/shibsp/attribute/Base64AttributeDecoder.cpp
index 1de5017..f6880ba 100644
--- a/shibsp/attribute/Base64AttributeDecoder.cpp
+++ b/shibsp/attribute/Base64AttributeDecoder.cpp
@@ -115,11 +115,7 @@ shibsp::Attribute* Base64AttributeDecoder::decode(
                     XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(val.get()),&x);
                     if (decoded) {
                         dest.push_back(reinterpret_cast<char*>(decoded));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                        XMLString::release(&decoded);
-#else
                         XMLString::release((char**)&decoded);
-#endif
                     }
                     else {
                         log.warn("skipping AttributeValue, unable to base64-decode");
@@ -148,11 +144,7 @@ shibsp::Attribute* Base64AttributeDecoder::decode(
             XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(val.get()),&x);
             if (decoded) {
                 dest.push_back(reinterpret_cast<char*>(decoded));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                XMLString::release(&decoded);
-#else
                 XMLString::release((char**)&decoded);
-#endif
             }
             else {
                 log.warn("ignoring NameID, unable to base64-decode");
@@ -177,11 +169,7 @@ shibsp::Attribute* Base64AttributeDecoder::decode(
                 XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(val.get()),&x);
                 if (decoded) {
                     dest.push_back(reinterpret_cast<char*>(decoded));
-    #ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                    XMLString::release(&decoded);
-    #else
                     XMLString::release((char**)&decoded);
-    #endif
                 }
                 else {
                     log.warn("ignoring NameIdentifier, unable to base64-decode");
diff --git a/shibsp/attribute/BinaryAttribute.cpp b/shibsp/attribute/BinaryAttribute.cpp
index d7dc443..6b65dcc 100644
--- a/shibsp/attribute/BinaryAttribute.cpp
+++ b/shibsp/attribute/BinaryAttribute.cpp
@@ -51,11 +51,7 @@ BinaryAttribute::BinaryAttribute(DDF& in) : Attribute(in)
         XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(val.string()), &x);
         if (decoded) {
             m_values.push_back(string(reinterpret_cast<char*>(decoded), x));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-            XMLString::release(&decoded);
-#else
             XMLString::release((char**)&decoded);
-#endif
         }
         val = in.first().next();
     }
@@ -110,11 +106,7 @@ const vector<string>& BinaryAttribute::getSerializedValues() const
                         *pos++=*pos2;
                 *pos=0;
                 m_serialized.push_back(reinterpret_cast<char*>(enc));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                XMLString::release(&enc);
-#else
                 XMLString::release((char**)&enc);
-#endif
             }
         }
     }
diff --git a/shibsp/attribute/XMLAttribute.cpp b/shibsp/attribute/XMLAttribute.cpp
index 536635c..23aa893 100644
--- a/shibsp/attribute/XMLAttribute.cpp
+++ b/shibsp/attribute/XMLAttribute.cpp
@@ -104,11 +104,7 @@ const vector<string>& XMLAttribute::getSerializedValues() const
                         *pos++=*pos2;
                 *pos=0;
                 m_serialized.push_back(reinterpret_cast<char*>(enc));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                XMLString::release(&enc);
-#else
                 XMLString::release((char**)&enc);
-#endif
             }
         }
     }
diff --git a/shibsp/binding/impl/XMLProtocolProvider.cpp b/shibsp/binding/impl/XMLProtocolProvider.cpp
index be29538..59b9498 100644
--- a/shibsp/binding/impl/XMLProtocolProvider.cpp
+++ b/shibsp/binding/impl/XMLProtocolProvider.cpp
@@ -72,12 +72,7 @@ namespace shibsp {
             m_document = doc;
         }
 
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
 
diff --git a/shibsp/config_pub.h.in b/shibsp/config_pub.h.in
index 9f39699..dd4f242 100644
--- a/shibsp/config_pub.h.in
+++ b/shibsp/config_pub.h.in
@@ -16,12 +16,6 @@
 /* Define to 1 if log4shib library is used. */
 #undef SHIBSP_LOG4SHIB
 
-/* Define to 1 if Xerces XMLString includes XMLByte release. */
-#undef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-
-/* Define to 1 if Xerces DOMNodeFilter API returns a short. */
-#undef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-
 /* Define to 1 if XML-Security-C supports white/blacklisting algorithms. */
 #undef SHIBSP_XMLSEC_WHITELISTING
 
diff --git a/shibsp/config_pub_win32.h b/shibsp/config_pub_win32.h
index 171234f..16afa67 100644
--- a/shibsp/config_pub_win32.h
+++ b/shibsp/config_pub_win32.h
@@ -36,13 +36,6 @@
 /* Define to 1 if log4shib library is used. */
 #define SHIBSP_LOG4SHIB 1
 
-#include <xercesc/util/XercesVersion.hpp>
-
-#if (XERCES_VERSION_MAJOR < 3)
-# define SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE 1
-# define SHIBSP_XERCESC_SHORT_ACCEPTNODE 1
-#endif
-
 #ifndef XMLTOOLING_NO_XMLSEC
 # include <xsec/framework/XSECDefs.hpp>
 # if (_XSEC_VERSION_FULL >= 10600)
diff --git a/shibsp/handler/impl/AttributeCheckerHandler.cpp b/shibsp/handler/impl/AttributeCheckerHandler.cpp
index a46194e..01d1806 100644
--- a/shibsp/handler/impl/AttributeCheckerHandler.cpp
+++ b/shibsp/handler/impl/AttributeCheckerHandler.cpp
@@ -60,12 +60,7 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL Blocker : public DOMNodeFilter
     {
     public:
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
diff --git a/shibsp/handler/impl/ChainingLogoutInitiator.cpp b/shibsp/handler/impl/ChainingLogoutInitiator.cpp
index 5dcba2c..a5031fb 100644
--- a/shibsp/handler/impl/ChainingLogoutInitiator.cpp
+++ b/shibsp/handler/impl/ChainingLogoutInitiator.cpp
@@ -75,12 +75,7 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL LogoutInitiatorNodeFilter : public DOMNodeFilter
     {
     public:
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             if (XMLHelper::isNodeNamed(node,shibspconstants::SHIB2SPCONFIG_NS,_LogoutInitiator))
                 return FILTER_REJECT;
             return FILTER_ACCEPT;
diff --git a/shibsp/handler/impl/ChainingSessionInitiator.cpp b/shibsp/handler/impl/ChainingSessionInitiator.cpp
index eac9185..4a1984a 100644
--- a/shibsp/handler/impl/ChainingSessionInitiator.cpp
+++ b/shibsp/handler/impl/ChainingSessionInitiator.cpp
@@ -76,12 +76,7 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL SessionInitiatorNodeFilter : public DOMNodeFilter
     {
     public:
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             if (XMLHelper::isNodeNamed(node,shibspconstants::SHIB2SPCONFIG_NS,_SessionInitiator))
                 return FILTER_REJECT;
             return FILTER_ACCEPT;
diff --git a/shibsp/handler/impl/DiscoveryFeed.cpp b/shibsp/handler/impl/DiscoveryFeed.cpp
index f60293b..59dbbbf 100644
--- a/shibsp/handler/impl/DiscoveryFeed.cpp
+++ b/shibsp/handler/impl/DiscoveryFeed.cpp
@@ -64,12 +64,7 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL Blocker : public DOMNodeFilter
     {
     public:
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
diff --git a/shibsp/handler/impl/RemotedHandler.cpp b/shibsp/handler/impl/RemotedHandler.cpp
index 12ff92b..57b26ca 100644
--- a/shibsp/handler/impl/RemotedHandler.cpp
+++ b/shibsp/handler/impl/RemotedHandler.cpp
@@ -237,11 +237,7 @@ gss_ctx_id_t RemotedRequest::getGSSContext() const
                 OM_uint32 major = gss_import_sec_context(&minor, &importbuf, &m_gssctx);
                 if (major != GSS_S_COMPLETE)
                     m_gssctx = GSS_C_NO_CONTEXT;
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                XMLString::release(&decoded);
-#else
                 XMLString::release((char**)&decoded);
-#endif
             }
         }
     }
@@ -266,11 +262,7 @@ gss_name_t RemotedRequest::getGSSName() const
 #endif
             if (major != GSS_S_COMPLETE)
                 m_gssname = GSS_C_NO_NAME;
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-            XMLString::release(&decoded);
-#else
             XMLString::release((char**)&decoded);
-#endif
         }
 
         if (m_gssname == GSS_C_NO_NAME) {
@@ -428,11 +420,7 @@ DDF RemotedHandler::wrap(const SPRequest& request, const vector<string>* headers
                 if (out) {
                     string ctx;
                     ctx.append(reinterpret_cast<char*>(out), len);
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                    XMLString::release(&out);
-#else
                     XMLString::release((char**)&out);
-#endif
                     in.addmember("gss_context").string(ctx.c_str());
                 }
                 else {
@@ -457,11 +445,7 @@ DDF RemotedHandler::wrap(const SPRequest& request, const vector<string>* headers
                     if (out) {
                         string nm;
                         nm.append(reinterpret_cast<char*>(out), len);
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                        XMLString::release(&out);
-#else
                         XMLString::release((char**)&out);
-#endif
                         in.addmember("gss_name").string(nm.c_str());
                     }
                     else {
diff --git a/shibsp/handler/impl/SAML2SessionInitiator.cpp b/shibsp/handler/impl/SAML2SessionInitiator.cpp
index 9ad3a57..b89d588 100644
--- a/shibsp/handler/impl/SAML2SessionInitiator.cpp
+++ b/shibsp/handler/impl/SAML2SessionInitiator.cpp
@@ -134,12 +134,7 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL SessionInitiatorNodeFilter : public DOMNodeFilter
     {
     public:
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
@@ -652,11 +647,7 @@ pair<bool,long> SAML2SessionInitiator::doRequest(
         XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(requestTemplate), &x);
         if (decoded) {
             istringstream is(reinterpret_cast<char*>(decoded));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-            XMLString::release(&decoded);
-#else
             XMLString::release((char**)&decoded);
-#endif
             DOMDocument* doc = XMLToolingConfig::getConfig().getParser().parse(is);
             XercesJanitor<DOMDocument> docjanitor(doc);
             auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));
diff --git a/shibsp/handler/impl/SecuredHandler.cpp b/shibsp/handler/impl/SecuredHandler.cpp
index 7523dcd..194917f 100644
--- a/shibsp/handler/impl/SecuredHandler.cpp
+++ b/shibsp/handler/impl/SecuredHandler.cpp
@@ -40,12 +40,7 @@ namespace {
     class SHIBSP_DLLLOCAL Blocker : public DOMNodeFilter
     {
     public:
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
diff --git a/shibsp/handler/impl/TransformSessionInitiator.cpp b/shibsp/handler/impl/TransformSessionInitiator.cpp
index be1d322..a980b3c 100644
--- a/shibsp/handler/impl/TransformSessionInitiator.cpp
+++ b/shibsp/handler/impl/TransformSessionInitiator.cpp
@@ -61,12 +61,7 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL TransformSINodeFilter : public DOMNodeFilter
     {
     public:
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
diff --git a/shibsp/impl/XMLRequestMapper.cpp b/shibsp/impl/XMLRequestMapper.cpp
index 6acad99..4069f31 100644
--- a/shibsp/impl/XMLRequestMapper.cpp
+++ b/shibsp/impl/XMLRequestMapper.cpp
@@ -76,12 +76,7 @@ namespace shibsp {
         ~Override() {}
 
         // Provides filter to exclude special config elements.
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
 
diff --git a/shibsp/impl/XMLSecurityPolicyProvider.cpp b/shibsp/impl/XMLSecurityPolicyProvider.cpp
index 34fcb99..7ff96ab 100644
--- a/shibsp/impl/XMLSecurityPolicyProvider.cpp
+++ b/shibsp/impl/XMLSecurityPolicyProvider.cpp
@@ -144,12 +144,7 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL PolicyNodeFilter : public DOMNodeFilter
     {
     public:
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const {
+        FilterAction acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
diff --git a/shibsp/impl/XMLServiceProvider.cpp b/shibsp/impl/XMLServiceProvider.cpp
index 89157de..b47c1e7 100644
--- a/shibsp/impl/XMLServiceProvider.cpp
+++ b/shibsp/impl/XMLServiceProvider.cpp
@@ -202,12 +202,7 @@ namespace {
         }
 
         // Provides filter to exclude special config elements.
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const;
+        FilterAction acceptNode(const DOMNode* node) const;
 
     private:
         template <class T> T* doChainedPlugins(
@@ -310,12 +305,7 @@ namespace {
         map< string,boost::shared_ptr<Application> > m_appmap;
 
         // Provides filter to exclude special config elements.
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-        short
-#else
-        FilterAction
-#endif
-        acceptNode(const DOMNode* node) const;
+        FilterAction acceptNode(const DOMNode* node) const;
 
         void setDocument(DOMDocument* doc) {
             m_document = doc;
@@ -1509,12 +1499,7 @@ void XMLApplication::doAttributePlugins(DOMElement* e, Category& log)
 }
 #endif
 
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-short
-#else
-DOMNodeFilter::FilterAction
-#endif
-XMLApplication::acceptNode(const DOMNode* node) const
+DOMNodeFilter::FilterAction XMLApplication::acceptNode(const DOMNode* node) const
 {
     const XMLCh* name=node->getLocalName();
     if (XMLString::equals(name,ApplicationOverride) ||
@@ -1814,12 +1799,7 @@ void XMLApplication::limitRedirect(const GenericRequest& request, const char* ur
     }
 }
 
-#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
-short
-#else
-DOMNodeFilter::FilterAction
-#endif
-XMLConfigImpl::acceptNode(const DOMNode* node) const
+DOMNodeFilter::FilterAction XMLConfigImpl::acceptNode(const DOMNode* node) const
 {
     if (!XMLString::equals(node->getNamespaceURI(),shibspconstants::SHIB2SPCONFIG_NS))
         return FILTER_ACCEPT;
diff --git a/shibsp/lite/CommonDomainCookie.cpp b/shibsp/lite/CommonDomainCookie.cpp
index 99e8399..3d56edb 100644
--- a/shibsp/lite/CommonDomainCookie.cpp
+++ b/shibsp/lite/CommonDomainCookie.cpp
@@ -64,11 +64,7 @@ CommonDomainCookie::CommonDomainCookie(const char* cookie)
         XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(i->c_str()),&len);
         if (decoded && *decoded) {
             m_list.push_back(reinterpret_cast<char*>(decoded));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-            XMLString::release(&decoded);
-#else
             XMLString::release((char**)&decoded);
-#endif
         }
     }
 }
@@ -109,11 +105,7 @@ const char* CommonDomainCookie::set(const char* entityID)
         *pos=0;
 
         delimited += reinterpret_cast<char*>(b64);
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-        XMLString::release(&b64);
-#else
         XMLString::release((char**)&b64);
-#endif
     }
 
     m_encoded=XMLToolingConfig::getConfig().getURLEncoder()->encode(delimited.c_str());

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git



More information about the Pkg-shibboleth-devel mailing list