[xmlsec] xmlDocDump - crash
Lau andy
andylau2064 at yahoo.com
Sat Nov 5 09:53:27 PST 2005
Dear Aleksey,
I have tried to apply the xmlsec command line using the sample signature template from the tests suit :
--sign --pkcs12 c:\xml\test4\debug\expiredkey.p12 --pwd secret --output c:\xml\out.xml c:\xml\test4\debug\enveloping-expired-cert.tmpl
but crash on xmlDocDump(f, data->doc) from xmlSecAppSignFile, given error :
Unhandled exception in xmlsec.exe (NTDLL.DLL): 0xC000005:Access Violation.
Any idea ?
I have also tried to use :
output = xmlOutputBufferCreateOwn(f, NULL);
res = xmlSaveFileTo(output, data->doc, NULL); instead of xmlDocDump.
It creates the out.xml but empty contents. I have commended the statement ret->writecallback = xmlFileWrite due to the VC6 compiler complains the xmlFileWrite not declare. Am I missing something?
FYI, I am using #define XMLSEC_CRYPTO_OPENSSL
and includes libxmlsec-openssl.lib,libxslt.lib,libxml2.lib,libeay32_a.lib,libxmlsec.lib,libxmlsec-mscrypto.lib,libxmlsec-openssl_a.lib.
I created a signature template includes multiple files name to sign, Morefiles.tmpl
<?xml version="1.0" encoding="UTF-8"?>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<Reference URI="#object">
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<DigestValue></DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
</SignatureValue>
<KeyInfo>
<X509Data>
</X509Data>
</KeyInfo>
<Object Id="object">
<XMLDSIG xmlns="">
<FileInfo>
<Name>MyData1.pdf</Name>
</FileInfo>
<FileInfo>
<Name>MyData2.tif</Name>
</FileInfo>
</XMLDSIG>
</Object>
</Signature>
I have tried to run the xmlsec command line with Morefiles.tmpl without providing the 2 data files. My question is why the program never complain the data file not found and can passed thru the Sign process and crash on the xmlDocDump also?
Please help. Thank you very much.
Andy Lau
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20051105/00be70d9/attachment-0002.htm
More information about the xmlsec
mailing list