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.

97 lines
3.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1992 - 1999
  5. //
  6. // File: ekuhlpr.h
  7. //
  8. // Contents: Certificate Enhanced Key Usage Helper API implementation
  9. //
  10. // History: 22-May-97 kirtd Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #if !defined(__EKUHLPR_H__)
  14. #define __EKUHLPR_H__
  15. PCRYPT_OBJID_BLOB EkuGetExtension (
  16. PCCERT_CONTEXT pCertContext,
  17. BOOL *pfAppCertPolicies
  18. );
  19. HRESULT EkuGetProperty (
  20. PCCERT_CONTEXT pCertContext,
  21. PCRYPT_OBJID_BLOB pEkuBlob
  22. );
  23. HRESULT EkuSetProperty (
  24. PCCERT_CONTEXT pCertContext,
  25. PCRYPT_OBJID_BLOB pEkuBlob
  26. );
  27. HRESULT EkuDecodeCertPoliciesAndConvertToUsage (
  28. PCRYPT_OBJID_BLOB pEkuBlob,
  29. DWORD* pcbSize,
  30. PCERT_ENHKEY_USAGE pUsage // OPTIONAL
  31. );
  32. HRESULT EkuGetDecodedSize (
  33. PCRYPT_OBJID_BLOB pEkuBlob,
  34. DWORD* pcbSize
  35. );
  36. HRESULT EkuGetDecodedUsageSizes (
  37. BOOL fExtCertPolicies,
  38. PCRYPT_OBJID_BLOB pExtBlob,
  39. PCRYPT_OBJID_BLOB pPropBlob,
  40. DWORD* pcbSize,
  41. DWORD* pcbExtSize,
  42. DWORD* pcbPropSize
  43. );
  44. HRESULT EkuGetDecodedUsage (
  45. PCRYPT_OBJID_BLOB pEkuBlob,
  46. DWORD* pcbSize,
  47. PCERT_ENHKEY_USAGE pUsage
  48. );
  49. HRESULT EkuMergeUsage (
  50. DWORD cbSize1,
  51. PCERT_ENHKEY_USAGE pUsage1,
  52. DWORD cbSize2,
  53. PCERT_ENHKEY_USAGE pUsage2,
  54. DWORD cbSizeM,
  55. PCERT_ENHKEY_USAGE pUsageM
  56. );
  57. HRESULT EkuGetMergedDecodedUsage (
  58. BOOL fExtCertPolicies,
  59. PCRYPT_OBJID_BLOB pExtBlob,
  60. PCRYPT_OBJID_BLOB pPropBlob,
  61. DWORD* pcbSize,
  62. PCERT_ENHKEY_USAGE pUsage
  63. );
  64. HRESULT EkuEncodeUsage (
  65. PCERT_ENHKEY_USAGE pUsage,
  66. PCRYPT_OBJID_BLOB pEkuBlob
  67. );
  68. HRESULT EkuGetUsage (
  69. PCCERT_CONTEXT pCertContext,
  70. DWORD dwFlags,
  71. DWORD* pcbSize,
  72. PCERT_ENHKEY_USAGE* ppUsage
  73. );
  74. #define CERT_FIND_ALL_ENHKEY_USAGE_FLAG (CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG |\
  75. CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG)
  76. BOOL
  77. EkuGetIntersectedUsageViaGetValidUsages (
  78. PCCERT_CONTEXT pCertContext,
  79. DWORD* pcbSize,
  80. PCERT_ENHKEY_USAGE pUsage
  81. );
  82. #endif