Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ static int PyXmlSec_Init(void) {
PyXmlSec_Free(_PYXMLSEC_FREE_ALL);
return -1;
}
// xmlsec will install default callback in xmlSecCryptoInit,
// overwriting any custom callbacks.
// We thus reinstall our callback now.
PyXmlSec_InstallErrorCallback();

free_mode = _PYXMLSEC_FREE_ALL;
return 0;
}
Expand Down Expand Up @@ -239,11 +244,6 @@ PYENTRY_FUNC_NAME(void)

if (PyXmlSec_Init() < 0) goto ON_FAIL;

// xmlsec will install default callback in PyXmlSec_Init,
// overwriting any custom callbacks.
// We thus install our callback again now.
PyXmlSec_InstallErrorCallback();

if (PyModule_AddStringConstant(module, "__version__", STRINGIFY(MODULE_VERSION)) < 0) goto ON_FAIL;

if (PyXmlSec_InitLxmlModule() < 0) goto ON_FAIL;
Expand Down
4 changes: 2 additions & 2 deletions tests/test_xmlsec.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ def test_reinitialize_module(self):
tests don't fail, we know that the ``init()``/``shutdown()``
function pair doesn't break anything.
"""
# xmlsec.shutdown()
# xmlsec.init()
xmlsec.shutdown()
xmlsec.init()