Error when decrypting pkcs#12 file (TCAdES) - LoadCertAndKeyFromPKCS12Certificate from PFXFile

I have this error on client machine: "Error when decrypting pkcs#12 file"
When i run the VCL APP on develop machine works fine, but when i distribute the app, some machines show this error. There is a way to discover what is wrong in the specific machine?
Certificate file is the same and SSL libraries (OpenSSL reside on network share).

(TCAdES) - LoadCertAndKeyFromPKCS12Certificate from PFXFile

This is a tough question without more details.
Is the same certificate used on all machines? How what it deployed? What the OS version?
PFX is a complex and cumbersome format. Why chose it?

  • Is the same certificate used on all machines? - Yes
  • How what it deployed? Use a networkfolder that is configured on APP to SSLPath and Certificates.
  • What the OS version? All Machines are Windows 11 Pro 21H2 / 64bits.
  • PFX is a complex and cumbersome format. Why chose it? Here im my Country (Brazil) we use A1 Certificate (PFX file) to store the certificate on database or network share for use on ERP Applications.

-> Its possible to convert PFX file to other format?

That's strange.
Who generated the certificate?
You may want to check the integrity of the certificate before it is decrypted (in case of corruption during transfer/install - but unlikely).
If you don't use the Windows store you may very well use an X.509 certificate or a PEM certificate format.

I found a solution... i replace the OpenSSL with the most recent version
A simple test is double click the openSSL.exe from the remote shared folder on the target machine to see if it works or not.

Thank you.

Good move! However note there is a critical flaw in OpenSSL that will be fixed on November 1. You will need to upgrade as soon as possible.


This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.