Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.6 KiB

  1. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Microsoft Windows, Copyright (C) Microsoft Corporation, 2000 - 2001.
  3. File: MsgHlpr.h
  4. Content: Declaration of the messaging helper functions.
  5. History: 09-07-2001 dsie created
  6. ------------------------------------------------------------------------------*/
  7. #ifndef __MSGHLPR_H_
  8. #define __MSGHLPR_H_
  9. #include "Debug.h"
  10. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  11. Function : GetMsgParam
  12. Synopsis : Allocate memory and retrieve requested message parameter using
  13. CryptGetMsgParam() API.
  14. Parameter: HCRYPTMSG hMsg - Message handler.
  15. DWORD dwMsgType - Message param type to retrieve.
  16. DWORD dwIndex - Index (should be 0 most of the time).
  17. void ** ppvData - Pointer to receive buffer.
  18. DWORD * pcbData - Size of buffer.
  19. Remark :
  20. ------------------------------------------------------------------------------*/
  21. HRESULT GetMsgParam (HCRYPTMSG hMsg,
  22. DWORD dwMsgType,
  23. DWORD dwIndex,
  24. void ** ppvData,
  25. DWORD * pcbData);
  26. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  27. Function : FindSignerCertInMessage
  28. Synopsis : Find the signer's cert in the bag of certs of the message for the
  29. specified signer.
  30. Parameter: HCRYPTMSG hMsg - Message handle.
  31. CERT_NAME_BLOB * pIssuerNameBlob - Pointer to issuer' name
  32. blob of signer's cert.
  33. CRYPT_INTEGERT_BLOB * pSerialNumberBlob - Pointer to serial number
  34. blob of signer's cert.
  35. PCERT_CONTEXT * ppCertContext - Pointer to PCERT_CONTEXT
  36. to receive the found
  37. cert, or NULL to only
  38. know the result.
  39. Remark :
  40. ------------------------------------------------------------------------------*/
  41. HRESULT FindSignerCertInMessage (HCRYPTMSG hMsg,
  42. CERT_NAME_BLOB * pIssuerNameBlob,
  43. CRYPT_INTEGER_BLOB * pSerialNumberBlob,
  44. PCERT_CONTEXT * ppCertContext);
  45. #endif //__MSGHLPR_H_