[xmlsec] xmlSecCryptoAppDefaultKeysMngrInit crashes?
Mike Fudd
mifudd at hotmail.com
Wed Jan 17 06:58:37 PST 2007
Hello Mailinglist,
I want to encrypt XML data. I have created a function that creates a command
line string for XMLSec. But if I execute the function twice the program
crashes.
The command line I want to execute was this:
encrypt --crypto openssl --xml-data T:\VS6\Debug\Example.xml --aeskey
T:\VS6\Debug\aes256.bin --node-name Password1 --output
T:\VS6\Debug\result.xml T:\VS6\Debug\my-tmpl.xml
At the second time the command line was:
encrypt --crypto openssl --xml-data T:\VS6\Debug\result.xml --aeskey
T:\VS6\Debug\aes256.bin --node-name Password2 --output
T:\VS6\Debug\result.xml T:\VS6\Debug\my-tmpl.xml
The program crashes at this function:
int xmlSecAppCryptoSimpleKeysMngrInit(xmlSecKeysMngrPtr mngr) {
xmlSecAssert2(mngr != NULL, -1);
// Now the crash:
return(xmlSecCryptoAppDefaultKeysMngrInit(mngr));
}
You can simulate this behavior if you create a new main function with this
structure:
int main(int argc, char* argv[]) {
// main_xmlsec is the renamed main function of the xmlsec.c modul.
main_xmlsec(argc, (const char **)argv);
main_xmlsec(argc, (const char **)argv);
}
Why doese the second crypto key manager init wont work?
Regards
Mike
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the xmlsec
mailing list