From e68b4914a07a9b3ac8580df8c6308c772ecc4060 Mon Sep 17 00:00:00 2001 From: Bulat Gaifullin Date: Fri, 17 Feb 2017 11:58:52 +0300 Subject: [PATCH] Fixed compilation error with xmlsec > 1.2.20 #46 --- src/constants.c | 2 ++ src/platform.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/constants.c b/src/constants.c index b5d7b8e4..4c890729 100644 --- a/src/constants.c +++ b/src/constants.c @@ -284,7 +284,9 @@ int PyXmlSec_ConstantsModule_Init(PyObject* package) { PYXMLSEC_ADD_NS_CONSTANT(Ns, "BASE"); PYXMLSEC_ADD_NS_CONSTANT(DSigNs, "DS"); PYXMLSEC_ADD_NS_CONSTANT(EncNs, "ENC"); +#ifndef XMLSEC_NO_XKMS PYXMLSEC_ADD_NS_CONSTANT(XkmsNs, "XKMS"); +#endif PYXMLSEC_ADD_NS_CONSTANT(XPathNs, "XPATH"); PYXMLSEC_ADD_NS_CONSTANT(XPath2Ns, "XPATH2"); PYXMLSEC_ADD_NS_CONSTANT(XPointerNs, "XPOINTER"); diff --git a/src/platform.h b/src/platform.h index bde45cee..eae902b9 100644 --- a/src/platform.h +++ b/src/platform.h @@ -21,6 +21,12 @@ #define XMLSEC_VERSION_HEX ((XMLSEC_VERSION_MAJOR << 8) | (XMLSEC_VERSION_MINOR << 4) | (XMLSEC_VERSION_SUBMINOR)) +// XKMS support was removed in version 1.2.21 +// https://mail.gnome.org/archives/commits-list/2015-February/msg10555.html +#if XMLSEC_VERSION_HEX > 0x134 +#define XMLSEC_NO_XKMS 1 +#endif + #define XSTR(c) (const xmlChar*)(c) #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)