signature verification issue with crypt32.dll CryptMsgControl api

Mehul Donga 0 Reputation points
2024-10-11T14:56:22.9666667+00:00

We have an application which transfer EDI documents using AS2 protocol where When we send data to one of our business partner and try to verify the signature of the MDN that business partner return to us and we can`t verify the signature of the MDN that business partner return to us.

We are reading the certificate from windows certificate store using CertGetSubjectCertificateFromStore api and verifying the signature using the below code. error code return from the below code - CRYPT_E_SIGNER_NOT_FOUND

if (CryptMsgControl(m_hCryptMsg, 0, CMSG_CTRL_VERIFY_SIGNATURE, pRet->pCertInfo))
{
     bSigVerified = true;
     dwError = 0;
}
else
{
     dwError = GetLastError();
}


Same solution is working every other partners that we are transferring the files. we have check with partner but so far did not find any solution, I really appreciate if someone help here, let me know if need more information.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,402 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,621 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,734 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.