hi all,
i have this piece of code, it crashes on PEM_write_RSA_PUBKEY (segfault),
it's the same if i use PEM_write_rsa_PublicKey instead..
does anyone have any idea about how to fix it?
i've created the private key with openssl grnrsa -out priv.key 1024
thanks.
Ricardo
RSA *privKey ;
FILE *file;
if ((file=fopen(name, "rb"))== NULL)
return 0;
privKey = *PEM_read_RSAPrivateKey(file, NULL, NULL, NULL);
fclose(file);
file=fopen(name,"user.pub");
PEM_write_RSA_PUBKEY(file,&privKey);
fclose(file);
------------------------------------------------------------------
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]