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.

274 lines
7.2 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1997 - 1999
  5. //
  6. // File: urlprov.h
  7. //
  8. // Contents: CryptGetObjectUrl provider definitions
  9. //
  10. // History: 16-Sep-97 kirtd Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #if !defined(__URLPROV_H__)
  14. #define __URLPROV_H__
  15. #if defined(__cplusplus)
  16. extern "C" {
  17. #endif
  18. //
  19. // CryptGetObjectUrl provider prototypes
  20. //
  21. typedef BOOL (WINAPI *PFN_GET_OBJECT_URL_FUNC) (
  22. IN LPCSTR pszUrlOid,
  23. IN LPVOID pvPara,
  24. IN DWORD dwFlags,
  25. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  26. IN OUT DWORD* pcbUrlArray,
  27. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  28. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  29. IN OPTIONAL LPVOID pvReserved
  30. );
  31. BOOL WINAPI
  32. CertificateIssuerGetObjectUrl (
  33. IN LPCSTR pszUrlOid,
  34. IN LPVOID pvPara,
  35. IN DWORD dwFlags,
  36. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  37. IN OUT DWORD* pcbUrlArray,
  38. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  39. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  40. IN OPTIONAL LPVOID pvReserved
  41. );
  42. BOOL WINAPI
  43. CertificateCrlDistPointGetObjectUrl (
  44. IN LPCSTR pszUrlOid,
  45. IN LPVOID pvPara,
  46. IN DWORD dwFlags,
  47. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  48. IN OUT DWORD* pcbUrlArray,
  49. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  50. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  51. IN LPVOID pvReserved
  52. );
  53. typedef struct _URL_OID_CTL_ISSUER_PARAM {
  54. PCCTL_CONTEXT pCtlContext;
  55. DWORD SignerIndex;
  56. } URL_OID_CTL_ISSUER_PARAM, *PURL_OID_CTL_ISSUER_PARAM;
  57. BOOL WINAPI
  58. CtlIssuerGetObjectUrl (
  59. IN LPCSTR pszUrlOid,
  60. IN LPVOID pvPara,
  61. IN DWORD dwFlags,
  62. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  63. IN OUT DWORD* pcbUrlArray,
  64. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  65. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  66. IN LPVOID pvReserved
  67. );
  68. BOOL WINAPI
  69. CtlNextUpdateGetObjectUrl (
  70. IN LPCSTR pszUrlOid,
  71. IN LPVOID pvPara,
  72. IN DWORD dwFlags,
  73. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  74. IN OUT DWORD* pcbUrlArray,
  75. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  76. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  77. IN LPVOID pvReserved
  78. );
  79. BOOL WINAPI
  80. CrlIssuerGetObjectUrl (
  81. IN LPCSTR pszUrlOid,
  82. IN LPVOID pvPara,
  83. IN DWORD dwFlags,
  84. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  85. IN OUT DWORD* pcbUrlArray,
  86. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  87. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  88. IN LPVOID pvReserved
  89. );
  90. BOOL WINAPI
  91. CertificateFreshestCrlGetObjectUrl(
  92. IN LPCSTR pszUrlOid,
  93. IN LPVOID pvPara,
  94. IN DWORD dwFlags,
  95. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  96. IN OUT DWORD* pcbUrlArray,
  97. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  98. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  99. IN OPTIONAL LPVOID pvReserved
  100. );
  101. BOOL WINAPI
  102. CrlFreshestCrlGetObjectUrl(
  103. IN LPCSTR pszUrlOid,
  104. IN LPVOID pvPara,
  105. IN DWORD dwFlags,
  106. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  107. IN OUT DWORD* pcbUrlArray,
  108. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  109. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  110. IN OPTIONAL LPVOID pvReserved
  111. );
  112. BOOL WINAPI
  113. CertificateCrossCertDistPointGetObjectUrl(
  114. IN LPCSTR pszUrlOid,
  115. IN LPVOID pvPara,
  116. IN DWORD dwFlags,
  117. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  118. IN OUT DWORD* pcbUrlArray,
  119. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  120. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  121. IN LPVOID pvReserved
  122. );
  123. //
  124. // CryptGetObjectUrl helper function prototypes
  125. //
  126. BOOL WINAPI
  127. ObjectContextUrlFromInfoAccess (
  128. IN LPCSTR pszContextOid,
  129. IN LPVOID pvContext,
  130. IN DWORD Index,
  131. IN LPCSTR pszInfoAccessOid,
  132. IN DWORD dwFlags,
  133. IN LPCSTR pszAccessMethodOid,
  134. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  135. IN OUT DWORD* pcbUrlArray,
  136. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  137. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  138. IN LPVOID pvReserved
  139. );
  140. BOOL WINAPI
  141. ObjectContextUrlFromCrlDistPoint (
  142. IN LPCSTR pszContextOid,
  143. IN LPVOID pvContext,
  144. IN DWORD Index,
  145. IN DWORD dwFlags,
  146. IN LPCSTR pszSourceOid,
  147. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  148. IN OUT DWORD* pcbUrlArray,
  149. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  150. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  151. IN LPVOID pvReserved
  152. );
  153. BOOL WINAPI
  154. ObjectContextUrlFromNextUpdateLocation (
  155. IN LPCSTR pszContextOid,
  156. IN LPVOID pvContext,
  157. IN DWORD Index,
  158. IN DWORD dwFlags,
  159. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  160. IN OUT DWORD* pcbUrlArray,
  161. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  162. IN OUT OPTIONAL DWORD* pcbUrlInfo,
  163. IN LPVOID pvReserved
  164. );
  165. VOID WINAPI
  166. InitializeDefaultUrlInfo (
  167. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  168. IN OUT DWORD* pcbUrlInfo
  169. );
  170. #define MAX_RAW_URL_DATA 4
  171. typedef struct _CRYPT_RAW_URL_DATA {
  172. DWORD dwFlags;
  173. LPVOID pvData;
  174. } CRYPT_RAW_URL_DATA, *PCRYPT_RAW_URL_DATA;
  175. BOOL WINAPI
  176. ObjectContextGetRawUrlData (
  177. IN LPCSTR pszContextOid,
  178. IN LPVOID pvContext,
  179. IN DWORD Index,
  180. IN DWORD dwFlags,
  181. IN LPCSTR pszSourceOid,
  182. OUT PCRYPT_RAW_URL_DATA aRawUrlData,
  183. IN OUT DWORD* pcRawUrlData
  184. );
  185. VOID WINAPI
  186. ObjectContextFreeRawUrlData (
  187. IN DWORD cRawUrlData,
  188. IN PCRYPT_RAW_URL_DATA aRawUrlData
  189. );
  190. BOOL WINAPI
  191. GetUrlArrayAndInfoFromInfoAccess (
  192. IN DWORD cRawUrlData,
  193. IN PCRYPT_RAW_URL_DATA aRawUrlData,
  194. IN LPCSTR pszAccessMethodOid,
  195. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  196. IN OUT DWORD* pcbUrlArray,
  197. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  198. IN OUT OPTIONAL DWORD* pcbUrlInfo
  199. );
  200. BOOL WINAPI
  201. GetUrlArrayAndInfoFromCrlDistPoint (
  202. IN DWORD cRawUrlData,
  203. IN PCRYPT_RAW_URL_DATA aRawUrlData,
  204. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  205. IN OUT DWORD* pcbUrlArray,
  206. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  207. IN OUT OPTIONAL DWORD* pcbUrlInfo
  208. );
  209. BOOL WINAPI
  210. GetUrlArrayAndInfoFromNextUpdateLocation (
  211. IN DWORD cRawUrlData,
  212. IN PCRYPT_RAW_URL_DATA aRawUrlData,
  213. OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
  214. IN OUT DWORD* pcbUrlArray,
  215. OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
  216. IN OUT OPTIONAL DWORD* pcbUrlInfo
  217. );
  218. BOOL WINAPI
  219. CopyUrlArray (
  220. IN PCRYPT_URL_ARRAY pDest,
  221. IN PCRYPT_URL_ARRAY pSource,
  222. IN DWORD cbDest
  223. );
  224. VOID WINAPI
  225. GetUrlArrayIndex (
  226. IN PCRYPT_URL_ARRAY pUrlArray,
  227. IN LPWSTR pwszUrl,
  228. IN DWORD DefaultIndex,
  229. OUT DWORD* pUrlIndex,
  230. OUT BOOL* pfHintInArray
  231. );
  232. //
  233. // Provider table externs
  234. //
  235. extern HCRYPTOIDFUNCSET hGetObjectUrlFuncSet;
  236. #if defined(__cplusplus)
  237. }
  238. #endif
  239. #endif