Hi every body.

I need some help because I'm trying to read a PEM file using PEM_read_X509
function,
it's compiling but crash on this function when I execute the code.

This code is very simple and I don't understand what is the problem! 

int main (int argc, char * * argv)   
{   
   FILE *fp;   
   X509 *x;   

   fp=fopen("cert.pem","r");

   x=X509_new();
   PEM_read_X509(fp,&x,NULL,NULL);
   //x=PEM_read_X509(fp,NULL,NULL,NULL);
   fclose(fp);   
   X509_free(x);   
   return 0;
}    

I really need some help, I'm so desesperate :,(
Thanks a lot.
-- 
View this message in context: 
http://www.nabble.com/Read-a-PEM-tp21056958p21056958.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to