pythondjangoubuntusystemxmlsec

System error: null argument to internal routine in xmlsec


I am trying to implement SSO in a Django application. I have a ubuntu 16.04 OS, Apache and WSGI and python 3.5.2 The packages that I installed:

xlmsec 1.3.3
lxml 4.5.1
pkg-config 1.5.1
python3-saml 1.9.0

And all the dependencies for xmlsec: libxmlsec1-dev libxml2-dev libxmlsec1-openssl

My server is behind a proxy (I dont have full access to that server) trying to install xlmsec >= 1.3.7 throws me a connection error, that why I used 1.3.3 version.

Once I run the following command I get the error:

python -c "import xmlsec"
func=xmlSecOpenSSLAppKeyLoadMemory:file=app.c:line=188:obj=unknown:subj=data != NULL:error=100:assertion:
func=xmlSecCheckVersionExt:file=xmlsec.c:line=185:obj=unknown:subj=unknown:error=19:invalid version:mode=exact;expected minor version=2;real minor version=2;expected subminor version=30;real subminor version=20
func=xmlSecOpenSSLInit:file=crypto.c:line=312:obj=unknown:subj=xmlSecCheckVersionExact:error=1:xmlsec library function failed:
func=xmlSecOpenSSLAppPkcs12Load:file=app.c:line=580:obj=unknown:subj=filename != NULL:error=100:assertion:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
SystemError: null argument to internal routine

I am not sure if it could be something about wrong versions or related to xlmsec issue (I already tried to rollback to older versions and have the same issue).


Solution

  • The issue was related to a libxmlsec1 (ubuntu package) version installed (version was 1.2.20 and xmlsec needs 1.2.30). Just remove the older version and installed the new one.