I'm not an openssl pro but I'm pretty sure you should
do this:

//This means that PRNG is seeded
DBS_cblock pKey;
DES_random_key(&pKey); 

Pierre

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of banti modi
Sent: 4 décembre, 2003 15:23
To: [EMAIL PROTECTED]
Subject: 

Sir,

I am new to openSSL i am trying to generate a random DES key i get
segmentation fault. I m using following code


int main()
{
int iStatus = RAND_status();

if(iStatus != 1)
{
   return 0;
}
//This means that PRNG is seeded
DBS_cblock* pKey;
DES_random_key(pKey);
}

here RAND_status() function returns 1 so PRNG is seeded then why 
DES_random_key is throwing an error???

Also if you can give a link to any tutorial on using opnSSL then it will be 
of great help. Thanking you in advance,

Banti

_________________________________________________________________
Big guns are booming! Bollywood is a war zone! 
http://server1.msn.co.in/features/decmovies03/index.asp Catch all the filmi 
action this December.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to