Hi,
Another simpler possibility is that fopen is returning NULL and
PEM_read_X509 crashes because fp is NULL.
I suppose you already checked that...
Cheers,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr
Mounir IDRASSI wrote:
Hi,
Your code doesn't crash for me (and it should not).
Do you have a stack trace of the crash? What version of openssl are
you using? Can you post the pem file you are using? Maybe it has some
special content encoding.
Cheers,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr
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
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org