@Bill: Thanks, but I hope it is not necessary.

Can someone help me with this code? Why doese my program crash on executing 
RSA_print_fp()? I'm using WindowsXP and Visual Studio 6.

I found some postings on this mailinglist with the advice to look into the FAQ. 
But the only topic that matches my error was the advice to switch the runtime 
lib. I have tried all 6 settings, but none helped. (In the docu of my pre 
compiled ssl Version is written I should switch to Multithreaded DLL)

Can somone help me?

Martin


int main() {
// 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.
        fclose(oFile);
}

// Clean up:
BN_free(oBigNbr);
RSA_free(oRsaKey);
}
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to