Skip to content

Commit

Permalink
Remove SOAP
Browse files Browse the repository at this point in the history
The SOAP support fully removed from xmlsec1 library.
  • Loading branch information
mxamin committed Jun 12, 2023
1 parent 1563947 commit 7075359
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 237 deletions.
6 changes: 0 additions & 6 deletions doc/source/modules/constants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,6 @@ Namespaces
.. data:: xmlsec.constants.XPointerNs
:annotation: = 'http://www.w3.org/2001/04/xmldsig-more/xptr'

.. data:: xmlsec.constants.Soap11Ns
:annotation: = 'http://schemas.xmlsoap.org/soap/envelope/'

.. data:: xmlsec.constants.Soap12Ns
:annotation: = 'http://www.w3.org/2002/06/soap-envelope'

.. data:: xmlsec.constants.NsExcC14N
:annotation: = 'http://www.w3.org/2001/10/xml-exc-c14n#'

Expand Down
2 changes: 0 additions & 2 deletions src/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
2 changes: 0 additions & 2 deletions src/xmlsec/constants.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ NodeX509Data: 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]
Expand Down
208 changes: 0 additions & 208 deletions tests/data/enc-bad-in.xml

This file was deleted.

19 changes: 0 additions & 19 deletions tests/test_enc.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,22 +233,3 @@ def test_decrypt_bad_args(self):
ctx = xmlsec.EncryptionContext()
with self.assertRaises(TypeError):
ctx.decrypt('')

def check_no_segfault(self):
namespaces = {'soap': 'http://schemas.xmlsoap.org/soap/envelope/'}

manager = xmlsec.KeysManager()
key = xmlsec.Key.from_file(self.path("rsacert.pem"), format=consts.KeyDataFormatCertPem)
manager.add_key(key)
template = self.load_xml('enc-bad-in.xml')
enc_data = xmlsec.template.encrypted_data_create(
template, xmlsec.Transform.AES128, type=xmlsec.EncryptionType.CONTENT, ns='xenc'
)
xmlsec.template.encrypted_data_ensure_cipher_value(enc_data)
key_info = xmlsec.template.encrypted_data_ensure_key_info(enc_data, ns='dsig')
enc_key = xmlsec.template.add_encrypted_key(key_info, xmlsec.Transform.RSA_PKCS1)
xmlsec.template.encrypted_data_ensure_cipher_value(enc_key)
data = template.find('soap:Body', namespaces=namespaces)
enc_ctx = xmlsec.EncryptionContext(manager)
enc_ctx.key = xmlsec.Key.generate(xmlsec.KeyData.AES, 192, xmlsec.KeyDataType.SESSION)
self.assertRaises(Exception, enc_ctx.encrypt_xml(enc_data, data))

0 comments on commit 7075359

Please sign in to comment.