[xmlsec] problem with raw-x509-cert
Aleksey Sanin
aleksey at aleksey.com
Tue Jul 10 17:53:49 PDT 2012
Leif,
Not sure which code you are looking at for the
> However almost immediately in xmlSecKeyInfoCtxInitialize there
> is this:
>
> xmlSecAssert2(keyInfoCtx->keysMngr != NULL, -1);
>
This is how this code looks for me
int
xmlSecKeyInfoCtxInitialize(xmlSecKeyInfoCtxPtr keyInfoCtx,
xmlSecKeysMngrPtr keysMngr) {
int ret;
xmlSecAssert2(keyInfoCtx != NULL, -1);
memset(keyInfoCtx, 0, sizeof(xmlSecKeyInfoCtx));
keyInfoCtx->keysMngr = keysMngr;
....
}
Aleksey
On 7/10/12 4:45 PM, Leif Johansson wrote:
>
>
> I've run into a strange problem that manifests itself when I use the
> python bindings for xmlsec [1] although from what I can tell (cf below)
> the problem seems to be in libxmlsec.
>
> The issue is related to the use of the "raw-x509-cert" data klass.
>
> The python code calls xmlSecKeyReadBinaryFile to read a file containing
> a DER encoded X509 certificate (1st arg is xmlSecKeyDataRawX509CertId).
>
> In xmlSecKeyReadBinaryFile, xmlSecKeyReadBuffer is called which in
> turn calls xmlSecKeyInfoCtxInitialize to initialize a xmlSecKeyInfoCtx.
>
> Here is where it breaks for me!
>
> This is what the call to xmlSecKeyInfoCtxInitialize in
> xmlSecKeyReadBuffer looks like in version 1.2.18 (~ src/keys.c:1173):
>
> ret = xmlSecKeyInfoCtxInitialize(&keyInfoCtx, NULL);
>
> However almost immediately in xmlSecKeyInfoCtxInitialize there is this:
>
> xmlSecAssert2(keyInfoCtx->keysMngr != NULL, -1);
>
> which of course fails. Clearly this code-path can't work, right? Either
> the assert is wrong or that keyInfoCtx needs a way to find its keysMngr.
>
> Cheers Leif
>
>
> [1] http://pypi.python.org/pypi/dm.xmlsec.binding
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec
>
More information about the xmlsec
mailing list