[xmltooling] 07/24: Remove legacy xmlsec support.

Etienne Dysli Metref edm-guest at moszumanska.debian.org
Fri Jan 12 15:53:56 UTC 2018


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

edm-guest pushed a commit to branch master
in repository xmltooling.

commit c78faa56fcb101928fae6a0a9ae16f87c45ebf65
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   Mon Nov 27 17:25:22 2017 -0500

    Remove legacy xmlsec support.
---
 config_win32.h                                     | 16 ---------
 configure.ac                                       | 41 ++--------------------
 xmltooling/XMLToolingConfig.cpp                    |  4 ---
 xmltooling/config_pub_win32.h                      | 17 ---------
 xmltooling/security/OpenSSLSecurityHelper.h        |  4 +--
 xmltooling/security/impl/BasicX509Credential.cpp   | 18 ++++------
 .../security/impl/ExplicitKeyTrustEngine.cpp       |  2 +-
 xmltooling/security/impl/InlineKeyResolver.cpp     | 36 ++-----------------
 xmltooling/security/impl/OpenSSLSecurityHelper.cpp |  2 +-
 xmltooling/security/impl/SecurityHelper.cpp        | 17 ++++-----
 xmltooling/signature/impl/XMLSecSignatureImpl.cpp  |  6 ----
 xmltooling/util/ReloadableXMLFile.cpp              |  6 ++--
 12 files changed, 24 insertions(+), 145 deletions(-)

diff --git a/config_win32.h b/config_win32.h
index 1fba0c1..429763b 100644
--- a/config_win32.h
+++ b/config_win32.h
@@ -127,22 +127,6 @@
 /* Define if you wish to disable XML-Security-dependent features. */
 /* #undef XMLTOOLING_NO_XMLSEC */
 
-/* Define if you wish to disable Xalan-dependent features. */
-#define XSEC_NO_XALAN
-
-#ifndef XMLTOOLING_NO_XMLSEC
-# include <xsec/framework/XSECDefs.hpp>
-# if (_XSEC_VERSION_FULL >= 10500)
-#  define XMLTOOLING_XMLSEC_C14N11 1
-# endif
-# if (_XSEC_VERSION_FULL >= 10600)
-#  define XMLTOOLING_XMLSEC_MULTIPLECRL 1
-#  define XMLTOOLING_XMLSEC_SIGALGORITHM 1
-#  define XMLTOOLING_XMLSEC_ECC 1
-#  define XMLTOOLING_XMLSEC_DEBUGLOGGING 1
-# endif
-#endif
-
 /* Define to empty if `const' does not conform to ANSI C. */
 /* #undef const */
 
diff --git a/configure.ac b/configure.ac
index 3db8054..5202d1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -270,54 +270,19 @@ if test x_$with_xmlsec != x_no; then
     AC_MSG_CHECKING([XML-Security version])
     AC_PREPROC_IFELSE(
 	    [AC_LANG_PROGRAM([#include <xsec/utils/XSECPlatformUtils.hpp>],
-        [#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3)
+        [#if XSEC_VERSION_MAJOR >= 2
 int i = 0;
 #else
-#error need version 1.4.0 or later
+#error need version 2.0.0 or later
 #endif])],
         [AC_MSG_RESULT(OK)],
-        [AC_MSG_FAILURE([XML-Security version 1.4.0 or greater is required.])])
+        [AC_MSG_FAILURE([XML-Security version 2.0.0 or greater is required.])])
         
     AC_LINK_IFELSE(
         [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
             [[XSECPlatformUtils::Initialise()]])],,
         [AC_MSG_ERROR([unable to link with XML-Security])])
 
-    AC_MSG_CHECKING([whether XML-Security-C has multiple CRL support])
-    AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGKeyInfoX509.hpp>]],
-            [[DSIGKeyInfoX509* klist; klist->getX509CRLListSize();]])],
-        [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_MULTIPLECRL],[1],[Define to 1 if XML-Security-C handles multiple CRLs.])],
-        [AC_MSG_RESULT([no])])
-
-    AC_MSG_CHECKING([whether XML-Security-C exposes the signature algorithm URI])
-    AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGSignature.hpp>]],
-            [[DSIGSignature* sig; sig->getAlgorithmURI();]])],
-        [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_SIGALGORITHM],[1],[Define to 1 if XML-Security-C exposes the signature algorithm URI.])],
-        [AC_MSG_RESULT([no])])
-
-    AC_MSG_CHECKING([whether XML-Security-C includes ECC support])
-    AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGKeyInfoValue.hpp>]],
-            [[DSIGKeyInfoValue* info; info->getECNamedCurve();]])],
-        [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_ECC],[1],[Define to 1 if XML-Security-C includes ECC support.])],
-        [AC_MSG_RESULT([no])])
-
-    AC_MSG_CHECKING([whether XML-Security-C includes C14N 1.1 support])
-    AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGConstants.hpp>]],
-            [[transformType t = TRANSFORM_C14N11;]])],
-        [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_C14N11],[1],[Define to 1 if XML-Security-C includes C14N 1.1 support.])],
-        [AC_MSG_RESULT([no])])
-
-    AC_MSG_CHECKING([whether XML-Security-C includes debug logging support])
-    AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
-            [[XSECPlatformUtils::SetReferenceLoggingSink(NULL)]])],
-        [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_DEBUGLOGGING],[1],[Define to 1 if XML-Security-C includes debug logging support.])],
-        [AC_MSG_RESULT([no])])
-
     # restore master libs
     LIBS="$save_LIBS"
 
diff --git a/xmltooling/XMLToolingConfig.cpp b/xmltooling/XMLToolingConfig.cpp
index a8b4bb5..0a9c442 100644
--- a/xmltooling/XMLToolingConfig.cpp
+++ b/xmltooling/XMLToolingConfig.cpp
@@ -137,7 +137,6 @@ namespace {
     }
 # endif
 
-# ifdef XMLTOOLING_XMLSEC_DEBUGLOGGING
     class TXFMOutputLog : public TXFMBase {
 	    TXFMOutputLog();
     public:
@@ -191,7 +190,6 @@ namespace {
             return new TXFMOutputLog(doc);
         return nullptr;
     }
-# endif
 
 #endif
 
@@ -421,9 +419,7 @@ bool XMLToolingInternalConfig::init()
 
 #ifndef XMLTOOLING_NO_XMLSEC
         XSECPlatformUtils::Initialise();
-# ifdef XMLTOOLING_XMLSEC_DEBUGLOGGING
         XSECPlatformUtils::SetReferenceLoggingSink(TXFMOutputLogFactory);
-# endif
         m_xsecProvider = new XSECProvider();
         log.debug("XML-Security %s initialization complete", XSEC_FULLVERSIONDOT);
 #endif
diff --git a/xmltooling/config_pub_win32.h b/xmltooling/config_pub_win32.h
index 843c3a7..b0ebae7 100644
--- a/xmltooling/config_pub_win32.h
+++ b/xmltooling/config_pub_win32.h
@@ -39,20 +39,3 @@
 
 /* Define if log4cpp library is used. */
 /* #undef XMLTOOLING_LOG4CPP */
-
-/* Define to 1 to disable XML-Security-dependent features. */
-/* #undef XMLTOOLING_NO_XMLSEC */
-
-#ifndef XMLTOOLING_NO_XMLSEC
-# include <xsec/framework/XSECDefs.hpp>
-# if (_XSEC_VERSION_FULL >= 10500)
-#  define XMLTOOLING_XMLSEC_C14N11 1
-# endif
-# if (_XSEC_VERSION_FULL >= 10600)
-#  define XMLTOOLING_XMLSEC_MULTIPLECRL 1
-#  define XMLTOOLING_XMLSEC_SIGALGORITHM 1
-#  define XMLTOOLING_XMLSEC_ECC 1
-#  define XMLTOOLING_XMLSEC_DEBUGLOGGING 1
-# endif
-#endif
-
diff --git a/xmltooling/security/OpenSSLSecurityHelper.h b/xmltooling/security/OpenSSLSecurityHelper.h
index 0ed6d89..5b63234 100644
--- a/xmltooling/security/OpenSSLSecurityHelper.h
+++ b/xmltooling/security/OpenSSLSecurityHelper.h
@@ -32,7 +32,7 @@
 #include <openssl/rsa.h>
 #include <openssl/evp.h>
 
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
 # include <xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.hpp>
 #endif
 
@@ -55,7 +55,7 @@ namespace xmltooling {
         static bool matchesPrivate(const RSA* rsa, const XSECCryptoKey& key);
         static bool matchesPublic(const DSA* dsa1, const XSECCryptoKey& key);
         static bool matchesPrivate(const DSA* dsa, const XSECCryptoKey& key);
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
         static bool matchesPublic(const EC_KEY* ec, const XSECCryptoKey& key);
         static bool matchesPrivate(const EC_KEY* ec, const XSECCryptoKey& key);
 #endif
diff --git a/xmltooling/security/impl/BasicX509Credential.cpp b/xmltooling/security/impl/BasicX509Credential.cpp
index 743934f..fdc1b3b 100644
--- a/xmltooling/security/impl/BasicX509Credential.cpp
+++ b/xmltooling/security/impl/BasicX509Credential.cpp
@@ -237,12 +237,10 @@ const char* BasicX509Credential::getAlgorithm() const
             case XSECCryptoKey::KEY_DSA_PAIR:
                 return "DSA";
 
-#ifdef XMLTOOLING_XMLSEC_ECC
             case XSECCryptoKey::KEY_EC_PRIVATE:
             case XSECCryptoKey::KEY_EC_PUBLIC:
             case XSECCryptoKey::KEY_EC_PAIR:
                 return "EC";
-#endif
 
             case XSECCryptoKey::KEY_HMAC:
                 return "HMAC";
@@ -296,11 +294,9 @@ XSECCryptoKey* BasicX509Credential::getPrivateKey() const
 {
     if (m_key) {
         XSECCryptoKey::KeyType type = m_key->getKeyType();
-        if (type != XSECCryptoKey::KEY_RSA_PUBLIC && type != XSECCryptoKey::KEY_DSA_PUBLIC
-#ifdef XMLTOOLING_XMLSEC_ECC
-            && type != XSECCryptoKey::KEY_EC_PUBLIC
-#endif
-            )
+        if (type != XSECCryptoKey::KEY_RSA_PUBLIC
+        	    && type != XSECCryptoKey::KEY_DSA_PUBLIC
+            && type != XSECCryptoKey::KEY_EC_PUBLIC)
             return m_key;
     }
     return nullptr;
@@ -310,11 +306,9 @@ XSECCryptoKey* BasicX509Credential::getPublicKey() const
 {
     if (m_key) {
         XSECCryptoKey::KeyType type = m_key->getKeyType();
-        if (type != XSECCryptoKey::KEY_RSA_PRIVATE && type != XSECCryptoKey::KEY_DSA_PRIVATE
-#ifdef XMLTOOLING_XMLSEC_ECC
-            && type != XSECCryptoKey::KEY_EC_PRIVATE
-#endif
-            )
+        if (type != XSECCryptoKey::KEY_RSA_PRIVATE
+            && type != XSECCryptoKey::KEY_DSA_PRIVATE
+            && type != XSECCryptoKey::KEY_EC_PRIVATE)
             return m_key;
     }
     return nullptr;
diff --git a/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp b/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp
index 92a0bed..5024142 100644
--- a/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp
+++ b/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp
@@ -287,7 +287,7 @@ bool ExplicitKeyTrustEngine::validate(
                 break;
             }
         }
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
         else if (EVP_PKEY_id(evp) == EVP_PKEY_EC) {
             found = OpenSSLSecurityHelper::matchesPublic(EVP_PKEY_get0_EC_KEY(evp), *key);
             if (found) {
diff --git a/xmltooling/security/impl/InlineKeyResolver.cpp b/xmltooling/security/impl/InlineKeyResolver.cpp
index 9d637d2..3bb06e2 100644
--- a/xmltooling/security/impl/InlineKeyResolver.cpp
+++ b/xmltooling/security/impl/InlineKeyResolver.cpp
@@ -45,9 +45,7 @@
 #include <xsec/enc/XSECCryptoX509.hpp>
 #include <xsec/enc/XSECCryptoKeyRSA.hpp>
 #include <xsec/enc/XSECCryptoKeyDSA.hpp>
-#ifdef XMLTOOLING_XMLSEC_ECC
-# include <xsec/enc/XSECCryptoKeyEC.hpp>
-#endif
+#include <xsec/enc/XSECCryptoKeyEC.hpp>
 #include <xsec/enc/XSECCryptoException.hpp>
 #include <xsec/framework/XSECException.hpp>
 
@@ -295,7 +293,7 @@ bool InlineCredential::resolveKey(const KeyInfo* keyInfo, bool followRefs)
                 m_key = dsa.release();
                 return true;
             }
-#ifdef XMLTOOLING_XMLSEC_ECC
+
             ECKeyValue* eckv = i->getECKeyValue();
             if (eckv && eckv->getNamedCurve() && eckv->getPublicKey()) {
                 log.warn("resolving ds11:ECKeyValue");
@@ -308,7 +306,6 @@ bool InlineCredential::resolveKey(const KeyInfo* keyInfo, bool followRefs)
                     return true;
                 }
             }
-#endif
         }
         catch (ValidationException& ex) {
             log.warn("skipping invalid ds:KeyValue (%s)", ex.what());
@@ -534,7 +531,6 @@ void InlineCredential::resolve(DSIGKeyInfoList* keyInfo, int types, bool followR
     if (types & X509Credential::RESOLVE_CRLS) {
         for (DSIGKeyInfoList::size_type i=0; i<sz; ++i) {
             if (keyInfo->item(i)->getKeyInfoType()==DSIGKeyInfo::KEYINFO_X509) {
-#ifdef XMLTOOLING_XMLSEC_MULTIPLECRL
                 DSIGKeyInfoX509* x509 = static_cast<DSIGKeyInfoX509*>(keyInfo->item(i));
                 int count = x509->getX509CRLListSize();
                 for (int j=0; j<count; ++j) {
@@ -556,34 +552,6 @@ void InlineCredential::resolve(DSIGKeyInfoList* keyInfo, int types, bool followR
                         }
                     }
                 }
-#else
-                // The current xmlsec API is limited to one CRL per KeyInfo.
-                // For now, I'm going to process the DOM directly.
-                DOMNode* x509Node = keyInfo->item(i)->getKeyInfoDOMNode();
-                DOMElement* crlElement = x509Node ? XMLHelper::getFirstChildElement(x509Node, xmlconstants::XMLSIG_NS, X509CRL::LOCAL_NAME) : nullptr;
-                while (crlElement) {
-                    if (crlElement->hasChildNodes()) {
-                        auto_ptr_char buf(crlElement->getFirstChild()->getNodeValue());
-                        if (buf.get()) {
-                            try {
-                                auto_ptr<XSECCryptoX509CRL> crlobj(XMLToolingConfig::getConfig().X509CRL());
-                                crlobj->loadX509CRLBase64Bin(buf.get(), strlen(buf.get()));
-                                m_crls.push_back(crlobj.release());
-                            }
-                            catch(XSECException& e) {
-                                auto_ptr_char temp(e.getMsg());
-                                Category::getInstance(XMLTOOLING_LOGCAT ".KeyResolver." INLINE_KEYINFO_RESOLVER).error(
-                                    "caught XML-Security exception loading CRL: %s", temp.get());
-                            }
-                            catch(XSECCryptoException& e) {
-                                Category::getInstance(XMLTOOLING_LOGCAT ".KeyResolver." INLINE_KEYINFO_RESOLVER).error(
-                                    "caught XML-Security exception loading CRL: %s", e.getMsg());
-                            }
-                        }
-                    }
-                    crlElement = XMLHelper::getNextSiblingElement(crlElement, xmlconstants::XMLSIG_NS, X509CRL::LOCAL_NAME);
-                }
-#endif
             }
         }
     }
diff --git a/xmltooling/security/impl/OpenSSLSecurityHelper.cpp b/xmltooling/security/impl/OpenSSLSecurityHelper.cpp
index 7c241d0..e4d3a8c 100644
--- a/xmltooling/security/impl/OpenSSLSecurityHelper.cpp
+++ b/xmltooling/security/impl/OpenSSLSecurityHelper.cpp
@@ -84,7 +84,7 @@ bool OpenSSLSecurityHelper::matchesPrivate(const DSA* dsa, const XSECCryptoKey&
     const DSA* dsa2 = static_cast<const OpenSSLCryptoKeyDSA&>(key).getOpenSSLDSA();
     return (dsa && dsa2 && BN_cmp(DSA_get0_privkey(dsa), DSA_get0_privkey(dsa2)) == 0);
 }
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
 bool OpenSSLSecurityHelper::matchesPublic(const EC_KEY* ec, const XSECCryptoKey& key)
 {
     // If one key is public or both, just compare the public key half.
diff --git a/xmltooling/security/impl/SecurityHelper.cpp b/xmltooling/security/impl/SecurityHelper.cpp
index b71f8b7..96214ff 100644
--- a/xmltooling/security/impl/SecurityHelper.cpp
+++ b/xmltooling/security/impl/SecurityHelper.cpp
@@ -42,6 +42,7 @@
 #include <xsec/enc/OpenSSL/OpenSSLCryptoX509.hpp>
 #include <xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.hpp>
 #include <xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.hpp>
+#include <xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.hpp>
 #include <xercesc/util/Base64.hpp>
 
 #ifdef WIN32
@@ -50,10 +51,6 @@
 # endif
 #endif
 
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
-# include <xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.hpp>
-#endif
-
 #include "security/OpenSSLSecurityHelper.h"
 
 using namespace xmltooling::logging;
@@ -217,7 +214,7 @@ XSECCryptoKey* SecurityHelper::loadKeyFromFile(const char* pathname, const char*
                 ret=new OpenSSLCryptoKeyDSA(pkey);
                 break;
 
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
             case EVP_PKEY_EC:
                 ret=new OpenSSLCryptoKeyEC(pkey);
                 break;
@@ -499,7 +496,7 @@ bool SecurityHelper::matches(const XSECCryptoKey& key1, const XSECCryptoKey& key
         return OpenSSLSecurityHelper::matchesPrivate(static_cast<const OpenSSLCryptoKeyDSA&>(key1).getOpenSSLDSA(), key2);
     }
 
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
     if (key1.getKeyType()==XSECCryptoKey::KEY_EC_PUBLIC || key1.getKeyType()==XSECCryptoKey::KEY_EC_PAIR) {
         return OpenSSLSecurityHelper::matchesPublic(static_cast<const OpenSSLCryptoKeyEC&>(key1).getOpenSSLEC(), key2);
     }
@@ -565,7 +562,7 @@ string SecurityHelper::getDEREncoding(const XSECCryptoKey& key, const char* hash
 
     const RSA* rsa = nullptr;
     const DSA* dsa = nullptr;
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
     const EC_KEY* ec = nullptr;
 #endif
 
@@ -583,7 +580,7 @@ string SecurityHelper::getDEREncoding(const XSECCryptoKey& key, const char* hash
             return ret;
         }
     }
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
     else if (key.getKeyType() == XSECCryptoKey::KEY_EC_PUBLIC || key.getKeyType() == XSECCryptoKey::KEY_EC_PAIR) {
         ec = static_cast<const OpenSSLCryptoKeyEC&>(key).getOpenSSLEC();
         if (!ec) {
@@ -621,7 +618,7 @@ string SecurityHelper::getDEREncoding(const XSECCryptoKey& key, const char* hash
         i2d_RSA_PUBKEY_bio(chain, const_cast<RSA*>(rsa));
     else if (dsa)
         i2d_DSA_PUBKEY_bio(chain, const_cast<DSA*>(dsa));
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
     else
         i2d_EC_PUBKEY_bio(chain, const_cast<EC_KEY*>(ec));
 #endif
@@ -763,7 +760,7 @@ XSECCryptoKey* SecurityHelper::fromDEREncoding(const char* buf, unsigned long bu
                     ret = new OpenSSLCryptoKeyDSA(pkey);
                     break;
 
-#if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC)
+#ifdef XMLTOOLING_OPENSSL_HAVE_EC
                 case EVP_PKEY_EC:
                     ret = new OpenSSLCryptoKeyEC(pkey);
                     break;
diff --git a/xmltooling/signature/impl/XMLSecSignatureImpl.cpp b/xmltooling/signature/impl/XMLSecSignatureImpl.cpp
index 1923e4e..6fa1f50 100644
--- a/xmltooling/signature/impl/XMLSecSignatureImpl.cpp
+++ b/xmltooling/signature/impl/XMLSecSignatureImpl.cpp
@@ -95,13 +95,7 @@ namespace xmlsignature {
         }
         const XMLCh* getSignatureAlgorithm() const {
             if (!m_sm && m_signature) {
-#ifdef XMLTOOLING_XMLSEC_SIGALGORITHM
                 m_sm = XMLString::replicate(m_signature->getAlgorithmURI());
-#else
-                safeBuffer sURI;
-                if (signatureHashMethod2URI(sURI, m_signature->getSignatureMethod(), m_signature->getHashMethod()))
-                    m_sm = XMLString::replicate(sURI.sbStrToXMLCh());
-#endif
             }
             return m_sm;
         }
diff --git a/xmltooling/util/ReloadableXMLFile.cpp b/xmltooling/util/ReloadableXMLFile.cpp
index 1bc8715..1d9146e 100644
--- a/xmltooling/util/ReloadableXMLFile.cpp
+++ b/xmltooling/util/ReloadableXMLFile.cpp
@@ -578,10 +578,8 @@ void ReloadableXMLFile::validateSignature(Signature& sigObj) const
                         if (tlist->item(i)->getTransformType()==TRANSFORM_ENVELOPED_SIGNATURE)
                             valid=true;
                         else if (tlist->item(i)->getTransformType()!=TRANSFORM_EXC_C14N &&
-                                 tlist->item(i)->getTransformType()!=TRANSFORM_C14N
-#ifdef XMLTOOLING_XMLSEC_C14N11
-                                 && tlist->item(i)->getTransformType()!=TRANSFORM_C14N11
-#endif
+                                 tlist->item(i)->getTransformType()!=TRANSFORM_C14N &&
+                                 tlist->item(i)->getTransformType()!=TRANSFORM_C14N11
                                  ) {
                             valid=false;
                             break;

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



More information about the Pkg-shibboleth-devel mailing list