Hi,

In this case, you should post the stack trace when the crash happens: It will show us where the problem is located.
Use gdb or VisualStudio for that, depending on your platform.

--
Mounir IDRASSI
IDRIX
http://www.idrix.fr

Moribius wrote:
fp is not NULL;

But perhaps my certificate has special contents, I can't imagine another
origin for that problem.
I can't post the certificate because it's a private one, sorry.

So can anyone explain me how to process whith specials content?

On an other hand, I've tried another solution:

    string certificateFile = "cert.pem";
    X509* cert;
    BIO* bio_cert = BIO_new_file(certificateFile.c_str(), "rb");
PEM_read_bio_X509(bio_cert, &cert, NULL, NULL); Same problem!

:confused:


Moribius wrote:
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.



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to