Title: PEM_read_PrivateKey

Hi
I have been trying to read private key on the latest version of Openssl.
However when it runs the new command: PEM_read_PrivateKey I got the error message: Unhandled exception in NTDLL.DLL 0:0xC000005 Access Violation. I put NULL at the place of new userdata parameter (void *u).

Here is code:
EVP_PKEY * pkey;
FILE * fp;
X509 * x509;
ERR_load_crypto_strings();

/* Read private key */

fp = fopen (keyfile, "r");
if (fp == NULL) exit (1);

pkey = PEM_read_PrivateKey(fp, NULL, NULL,NULL);
fclose (fp);
the key.pem is from /demos/maurice/ directory.
Is there some problem with my dll libraries or my code is not correct.
Thanks in advance
Alex Cosic

Reply via email to