Hello Mailinglist, I want to use RSA encryption beside xmlsec. I tried the source code from below, but get an crash. On the OpenSSL FAQ is written that I must use the same RuntimeLib within the whole project.
Because of I'm using the Windows Port of XMLSec from Igor I have to use /MD switch, whitch means Multithreaded DLL. Now I can sign and verify a xml file. If I switch to one of the other settings I get a crash... so /MD must be right. Doese someone know what else I can check? Regards Martin void CreateRsaKey() { // Do some init: BIGNUM *oBigNbr = BN_new(); RSA *oRsaKey = RSA_new(); int iLength=2048; BN_set_word(oBigNbr, RSA_F4); // Generate the key: RSA_generate_key_ex(oRsaKey, iLength, oBigNbr, 0); // Write key to hard disk (for testing) FILE *oFile = fopen("C:\\MyKey.txt","w"); if (oFile!=0) { RSA_print_fp(oFile, oRsaKey, 100); // Here comes the crash. //RSA_print_fp(stdout, oRsaKey, 100); // Here comes the crash. fclose(oFile); } // Clean up: BN_free(oBigNbr); RSA_free(oRsaKey); } -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail _______________________________________________ xmlsec mailing list xmlsec@aleksey.com http://www.aleksey.com/mailman/listinfo/xmlsec