[xmlsec] Using OpenSSL beside XMLSec

Martin Salo Martin.Salo at gmx.net
Fri Aug 31 03:09:39 PDT 2007


Hello Kais,

I think Roumen was right. It has maybe something to do with the runtime. I tried several indent settings...


Regards

Martin


-------- Original-Nachricht --------
> Datum: Thu, 30 Aug 2007 10:48:45 -0700
> Von: Kais Belgaied <Kais.Belgaied at Sun.COM>
> An: Martin Salo <Martin.Salo at gmx.net>
> Betreff: Re: [xmlsec] Using OpenSSL beside XMLSec

> Martin Salo wrote:
> > 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.
> >   
> did you try with less than 100 spaces of indentation passed to 
> RSA_print_fp ?
> 
>     Kais
> 
> >     //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



More information about the xmlsec mailing list