Custom crypto OIDs extension : PFN_CMSG_CNG_IMPORT_KEY_AGREE is never called

Userhype 1 Reputation point

Hello! Please help. I don't undestand how it could be possible that when I try to decode KeyAgreementRecipientInfo, my custom PFN_CMSG_CNG_IMPORT_KEY_AGREE implementation is never called? Instead I face my PFN_CMSG_CNG_IMPORT_KEY_TRANS implemention is being called. Always.
I have rechecked registration code multiple times.
P.S. : for decoding I use low-level CMS functions :

  • CryptOpenToDecode.
  • CryptMsgUpdate,
  • ....
  • CryptMsgControl exactly with CMSG_CTRL_KEY_AGREE_DECRYPT control type and a pointer to CMSG_CTRL_KEY_AGREE_DECRYPT_PARA structure
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,512 questions
{count} votes