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.

153 lines
3.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1997 - 1999
  5. //
  6. // File: octxutil.h
  7. //
  8. // Contents: General Object Context Utility definitions and prototypes
  9. //
  10. // History: 29-Sep-97 kirtd Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #if !defined(__OCTXUTIL_H__)
  14. #define __OCTXUTIL_H__
  15. #include <origin.h>
  16. #define MAX_HASH_SIZE 20
  17. BOOL WINAPI
  18. ObjectContextGetOriginIdentifier (
  19. IN LPCSTR pszContextOid,
  20. IN LPVOID pvContext,
  21. IN PCCERT_CONTEXT pIssuer,
  22. IN DWORD dwFlags,
  23. OUT CRYPT_ORIGIN_IDENTIFIER OriginIdentifier
  24. );
  25. typedef struct _CRL_IS_VALID_EXTRA_INFO {
  26. // If > 0, check that the CRL's number is >=
  27. int iDeltaCrlIndicator;
  28. } CRL_IS_VALID_EXTRA_INFO, *PCRL_IS_VALID_EXTRA_INFO;
  29. BOOL WINAPI
  30. ObjectContextIsValidForSubject (
  31. IN LPCSTR pszContextOid,
  32. IN LPVOID pvContext,
  33. IN LPVOID pvSubject,
  34. IN OPTIONAL LPVOID pvExtraInfo
  35. );
  36. PCERT_EXTENSION WINAPI
  37. ObjectContextFindExtension (
  38. IN LPCSTR pszContextOid,
  39. IN LPVOID pvContext,
  40. IN LPCSTR pszExtOid
  41. );
  42. BOOL WINAPI
  43. ObjectContextGetProperty (
  44. IN LPCSTR pszContextOid,
  45. IN LPVOID pvContext,
  46. IN DWORD dwPropId,
  47. IN LPVOID pvData,
  48. IN DWORD* pcbData
  49. );
  50. BOOL WINAPI
  51. ObjectContextGetAttribute (
  52. IN LPCSTR pszContextOid,
  53. IN LPVOID pvContext,
  54. IN DWORD Index,
  55. IN DWORD dwFlags,
  56. IN LPCSTR pszAttrOid,
  57. IN PCRYPT_ATTRIBUTE pAttribute,
  58. IN OUT DWORD* pcbAttribute
  59. );
  60. LPVOID WINAPI
  61. ObjectContextDuplicate (
  62. IN LPCSTR pszContextOid,
  63. IN LPVOID pvContext
  64. );
  65. BOOL WINAPI
  66. ObjectContextCreate (
  67. IN LPCSTR pszContextOid,
  68. IN LPVOID pvContext,
  69. OUT LPVOID* ppvContext
  70. );
  71. BOOL WINAPI
  72. ObjectContextGetCreateAndExpireTimes (
  73. IN LPCSTR pszContextOid,
  74. IN LPVOID pvContext,
  75. OUT LPFILETIME pftCreateTime,
  76. OUT LPFILETIME pftExpireTime
  77. );
  78. BOOL WINAPI
  79. ObjectContextGetNextUpdateUrl (
  80. IN LPCSTR pszContextOid,
  81. IN LPVOID pvContext,
  82. IN PCCERT_CONTEXT pIssuer,
  83. IN LPWSTR pwszUrlHint,
  84. OUT PCRYPT_URL_ARRAY* ppUrlArray,
  85. OUT DWORD* pcbUrlArray,
  86. OUT DWORD* pPreferredUrlIndex,
  87. OUT OPTIONAL BOOL* pfHintInArray
  88. );
  89. VOID WINAPI
  90. ObjectContextFree (
  91. IN LPCSTR pszContextOid,
  92. IN LPVOID pvContext
  93. );
  94. BOOL WINAPI
  95. ObjectContextVerifySignature (
  96. IN LPCSTR pszContextOid,
  97. IN LPVOID pvContext,
  98. IN PCCERT_CONTEXT pSigner
  99. );
  100. BOOL WINAPI
  101. MapOidToPropertyId (
  102. IN LPCSTR pszOid,
  103. OUT DWORD* pPropId
  104. );
  105. // If ppszContextOid is nonNULL, will advance on to next pszContextOid
  106. LPVOID WINAPI
  107. ObjectContextEnumObjectsInStore (
  108. IN HCERTSTORE hStore,
  109. IN LPCSTR pszContextOid,
  110. IN LPVOID pvContext,
  111. OUT OPTIONAL LPCSTR* ppszContextOid = NULL
  112. );
  113. VOID WINAPI
  114. ObjectContextGetEncodedBits (
  115. IN LPCSTR pszContextOid,
  116. IN LPVOID pvContext,
  117. OUT DWORD* pcbEncoded,
  118. OUT LPBYTE* ppbEncoded
  119. );
  120. LPVOID WINAPI
  121. ObjectContextFindCorrespondingObject (
  122. IN HCERTSTORE hStore,
  123. IN LPCSTR pszContextOid,
  124. IN LPVOID pvContext
  125. );
  126. BOOL WINAPI
  127. ObjectContextDeleteAllObjectsFromStore (
  128. IN HCERTSTORE hStore
  129. );
  130. #endif