hi all,

i've been having trouble with this pice of code, i get a segmentation fault 
when reading the public key, this is the way i generated both private and 
public keys.

priv Key: openssl genrsa -out priv.key 1024
pub Key: cat pub.key | openssl rsa -pubout > pub.key

does anyone have any idea about what does this happen?

i'm using rh linux 6.2 with openssl 0.9.6b 9 





int FOROLicense::LoadPublicKey (char *name)
{
   FILE *file;
   if ((file=fopen(name, "rb"))== NULL)
         return 0;

   pubKey=*PEM_read_RSAPublicKey(file, NULL, NULL, NULL);

   fclose (file);
   loadedPub=1;
   return loadedPub;
}
------------------------------------------------------------------
This email is confidential and intended solely for the use of the individual to whom 
it is addressed. Any views or opinions presented are solely those of the author and do 
not necessarily represent those of SchlumbergerSema. 
If you are not the intended recipient, be advised that you have received this email in 
error and that any use, dissemination, forwarding, printing, or copying of this email 
is strictly prohibited.
------------------------------------------------------------------

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

Reply via email to