Decryption failure error with crypt32.dll, CertGetSubjectCertificateFromStore API
Mehul Donga
0
Reputation points
We have an application which transfer EDI documents using AS2 protocol where when our business partner and send data to us, we can’t decrypt it.
We are reading the certificate from windows certificate store using CertGetSubjectCertificateFromStore api and trying to decrypt data and getting error code, Error = 0x8009200C (Cannot find the certificate and private key to use for decryption.
pEnvelopeCert = CertGetSubjectCertificateFromStore(dwCertStoreIdx, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, ptrCertInfo);
Same solution is working with every other partners. I really appreciate if someone help here, let me know if need more information.
Sign in to answer