Skip to content

Commit

Permalink
security/py-xmlsec: unbreak build with xmlsec1-1.3.2 (+)
Browse files Browse the repository at this point in the history
With hat:	office
  • Loading branch information
fluffykhv committed Feb 13, 2024
1 parent 61f0255 commit 509b5d8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion security/py-xmlsec/Makefile
@@ -1,6 +1,6 @@
PORTNAME= xmlsec
DISTVERSION= 1.3.13
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= security python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand Down
11 changes: 11 additions & 0 deletions security/py-xmlsec/files/patch-src_constants.c
@@ -0,0 +1,11 @@
--- src/constants.c.orig 2022-08-20 20:42:41 UTC
+++ src/constants.c
@@ -316,8 +316,6 @@ int PyXmlSec_ConstantsModule_Init(PyObject* package) {
PYXMLSEC_ADD_NS_CONSTANT(XPathNs, "XPATH");
PYXMLSEC_ADD_NS_CONSTANT(XPath2Ns, "XPATH2");
PYXMLSEC_ADD_NS_CONSTANT(XPointerNs, "XPOINTER");
- PYXMLSEC_ADD_NS_CONSTANT(Soap11Ns, "SOAP11");
- PYXMLSEC_ADD_NS_CONSTANT(Soap12Ns, "SOAP12");
PYXMLSEC_ADD_NS_CONSTANT(NsExcC14N, "EXC_C14N");
PYXMLSEC_ADD_NS_CONSTANT(NsExcC14NWithComments, "EXC_C14N_WITH_COMMENT");

14 changes: 14 additions & 0 deletions security/py-xmlsec/files/patch-src_enc.c
@@ -0,0 +1,14 @@
--- src/enc.c.orig 2023-12-13 20:01:11 UTC
+++ src/enc.c
@@ -17,6 +17,11 @@
#include <xmlsec/xmlenc.h>
#include <xmlsec/xmltree.h>

+// Backwards compatibility with xmlsec 1.2
+#ifndef XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH
+#define XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH 0x00008000
+#endif
+
typedef struct {
PyObject_HEAD
xmlSecEncCtxPtr handle;
11 changes: 11 additions & 0 deletions security/py-xmlsec/files/patch-src_xmlsec_constants.pyi
@@ -0,0 +1,11 @@
--- src/xmlsec/constants.pyi.orig 2022-08-20 20:42:41 UTC
+++ src/xmlsec/constants.pyi
@@ -85,8 +85,6 @@ NsExcC14NWithComments: Final[str]
Ns: Final[str]
NsExcC14N: Final[str]
NsExcC14NWithComments: Final[str]
-Soap11Ns: Final[str]
-Soap12Ns: Final[str]
TransformAes128Cbc: Final[__Transform]
TransformAes128Gcm: Final[__Transform]
TransformAes192Cbc: Final[__Transform]

0 comments on commit 509b5d8

Please sign in to comment.