[xmlsec] Access violation on xmlSecDSigCtxDestroy when loading a PKCS#12 certificate using mscrypto

Satoshi Ito satoshi.ito at Laserfiche.com
Thu May 22 12:27:11 PDT 2008


I am encountering an access violation in xmlSecDSigCtxDestroy when I
load a key from a PKCS#12 certificate using mscrypto. The issue seems to
be that the certificate context is freed twice in xmlSecKeyEmpty (once
through xmlSecKeyDataDestroy(key->value), and again through
xmlSecPtrListDestroy(key->dataList)). To reproduce, it seems to be
sufficient to simply create an xmlSecDSigCtx [xmlSecDSigCtxPtr dsigCtx =
xmlSecDSigCtxCreate(NULL)], load the key in the PKCS#12 certificate
[dsigCtx->signKey = xmlSecCryptoAppKeyLoad(___,
xmlSecKeyDataFormatPkcs12, ___, NULL, NULL)], and then destroy the
context immediately [xmlSecDSigCtxDestroy(dsigCtx)]. The signing itself
works if the signing code is uncommented and the call to
xmlSecDSigCtxDestroy is commented out (and can be verified). What could
I be doing wrong? (Apologies in advance if I am missing an obvious and
essential step; I am quite new to this, so please be patient with me).



Satoshi Ito

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20080522/0ccb2484/attachment-0002.htm

More information about the xmlsec mailing list