Hello, 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).
Sincerely, Satoshi Ito
_______________________________________________ xmlsec mailing list [email protected] http://www.aleksey.com/mailman/listinfo/xmlsec
