Curl failed with error #58: could not load PEM

Solved! Go to solution
Regular Visitor

Curl failed with error #58: could not load PEM

"Curl failed with error #58: could not load PEM client certificate, OpenSSL error error:02001002:system library:fopen:No such file or directory, (no key found, wrong pass phrase, or wrong file format?) " 


Even i added production pem files , it doesn't work ! 

Visa Developer Support Specialist

Re: Curl failed with error #58: could not load PEM

Hey @zinminthu,


You mentioned that you've added production pem files and it doesn't work, if you are a production client then we have a dedicated support staff to assist you, please reach out to I think we received the same question from you via email at too.


To resolve the curl error issue, can you check if you have “openssl-pkcs11 (aka engine_pkcs11} package installed?

Also, instead of using the “relative path” can you try using the “absolute path” for the certificates?

20200123 Curl Error Zin Min Thu


You should also try using our sample codes since they will be a helpful guide for you. To access sample code, login to your Visa Developer account and from your dashboard go to your project app and on the left side tab click on Sample Code. Sample Code will be available for download from there.

20200123 Sample Code Download example.jpg





Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.