[Pyxmlsec-devel] xmlsec in python

Dieter Maurer dieter at handshake.de
Wed Feb 22 12:05:18 CET 2012


Dolf Andringa wrote at 2012-2-22 11:42 +0100:
>key=xmlsec.cryptoAppKeyLoad(private_key_file,  xmlsec.KeyDataFormatPem,
>None, None, None)
>key.isValid()
>1
>
>node=xmlsec.findNode(doc.getRootElement(),xmlsec.NodeEncryptedData,xmlsec.EncNs)
>enc_ctx = xmlsec.EncCtx(None)
>enc_ctx.encKey=key
>
>enc_ctx.decrypt(node)
>
>with the following error:
>
>func=xmlSecEncCtxEncDataNodeRead:file=xmlenc.c:line=957:obj=unknown:subj=unknown:error=45:key
>is not found:

The mentioend 64 bit architecture bug can show itself like this: it
causes "pyxmlsec" and "xmlsec" to see a different layouts for the same
C-structure: e.g. when "pyxmlsec" writes "encKey", "xmlsec" may
find "encKey" still empty (and report a "key is not found").

Again: should you not use a 64 bit architecture, fetch the "xmlsec" source
and look what happens before line "957" of "xmlenc.c".



--
Dieter


More information about the Pyxmlsec-devel mailing list