[openssl-users] Win32 - PEM_read_PrivateKey crash

Lloyd lloydkl.tech at gmail.com
Thu Feb 11 11:35:35 UTC 2016


Hi,

I have downloaded prebuilt version of openssl for windows. I am running on
Windows 7 64bit,  Using Visual Studio 2010, generating 32bit binary.

When I run a simple application which calling "PEM_read_PrivateKey" it
crashes with error "OPENSSL_Uplink(505D6000,08): no OPENSSL_Applink"

What could be the reason for this? Any hint is greatly appreciated.

Thanks,
  Lloyd

The following is my code -

int main() {
   EVP_PKEY *privkey;
   FILE *fp;
   RSA *rsakey;

   OpenSSL_add_all_algorithms();

   privkey = EVP_PKEY_new();
   fp = fopen ("G:\\temp\\mykey.pem", "r"); //File exists and it opens
   PEM_read_PrivateKey( fp, &privkey, NULL, NULL); //CRASH

   fclose(fp);

    ...

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160211/c782bccf/attachment.html>


More information about the openssl-users mailing list