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)