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.

205 lines
3.8 KiB

  1. #include "dspch.h"
  2. #pragma hdrstop
  3. #include <wincrypt.h>
  4. #include <wintrust.h>
  5. #include <mscat.h>
  6. static
  7. LONG
  8. WINAPI
  9. WinVerifyTrust (
  10. HWND hwnd,
  11. GUID *pgActionID,
  12. LPVOID pWVTData
  13. )
  14. {
  15. return E_UNEXPECTED;
  16. }
  17. static
  18. LONG
  19. WINAPI
  20. WTHelperGetFileHash (
  21. IN LPCWSTR pwszFilename,
  22. IN DWORD dwFlags,
  23. IN OUT OPTIONAL PVOID *pvReserved,
  24. OUT OPTIONAL BYTE *pbFileHash,
  25. IN OUT OPTIONAL DWORD *pcbFileHash,
  26. OUT OPTIONAL ALG_ID *pHashAlgid
  27. )
  28. {
  29. return E_UNEXPECTED;
  30. }
  31. static
  32. CRYPT_PROVIDER_DATA *
  33. WINAPI
  34. WTHelperProvDataFromStateData(
  35. IN HANDLE hStateData
  36. )
  37. {
  38. return NULL;
  39. }
  40. static
  41. CRYPT_PROVIDER_SGNR *
  42. WINAPI
  43. WTHelperGetProvSignerFromChain(
  44. IN CRYPT_PROVIDER_DATA *pProvData,
  45. IN DWORD idxSigner,
  46. IN BOOL fCounterSigner,
  47. IN DWORD idxCounterSigner
  48. )
  49. {
  50. return NULL;
  51. }
  52. static
  53. CRYPT_PROVIDER_CERT *
  54. WINAPI
  55. WTHelperGetProvCertFromChain(
  56. IN CRYPT_PROVIDER_SGNR *pSgnr,
  57. IN DWORD idxCert
  58. )
  59. {
  60. return NULL;
  61. }
  62. static
  63. BOOL
  64. WINAPI
  65. CryptCATAdminAcquireContext(
  66. OUT HCATADMIN *phCatAdmin,
  67. IN const GUID *pgSubsystem,
  68. IN DWORD dwFlags)
  69. {
  70. SetLastError(ERROR_PROC_NOT_FOUND);
  71. return FALSE;
  72. }
  73. static
  74. HCATINFO
  75. WINAPI
  76. CryptCATAdminEnumCatalogFromHash(
  77. IN HCATADMIN hCatAdmin,
  78. IN BYTE *pbHash,
  79. IN DWORD cbHash,
  80. IN DWORD dwFlags,
  81. IN OUT HCATINFO *phPrevCatInfo)
  82. {
  83. SetLastError(ERROR_PROC_NOT_FOUND);
  84. return NULL;
  85. }
  86. static
  87. BOOL
  88. WINAPI
  89. CryptCATAdminCalcHashFromFileHandle(
  90. IN HANDLE hFile,
  91. IN OUT DWORD *pcbHash,
  92. OUT OPTIONAL BYTE *pbHash,
  93. IN DWORD dwFlags)
  94. {
  95. SetLastError(ERROR_PROC_NOT_FOUND);
  96. return FALSE;
  97. }
  98. static
  99. HCATINFO
  100. WINAPI
  101. CryptCATAdminAddCatalog(
  102. IN HCATADMIN hCatAdmin,
  103. IN WCHAR *pwszCatalogFile,
  104. IN OPTIONAL WCHAR *pwszSelectBaseName,
  105. IN DWORD dwFlags)
  106. {
  107. SetLastError(ERROR_PROC_NOT_FOUND);
  108. return NULL;
  109. }
  110. static
  111. BOOL
  112. WINAPI
  113. CryptCATCatalogInfoFromContext(
  114. IN HCATINFO hCatInfo,
  115. IN OUT CATALOG_INFO *psCatInfo,
  116. IN DWORD dwFlags)
  117. {
  118. SetLastError(ERROR_PROC_NOT_FOUND);
  119. return FALSE;
  120. }
  121. static
  122. BOOL
  123. WINAPI
  124. CryptCATAdminReleaseContext(
  125. IN HCATADMIN hCatAdmin,
  126. IN DWORD dwFlags)
  127. {
  128. SetLastError(ERROR_PROC_NOT_FOUND);
  129. return FALSE;
  130. }
  131. static
  132. BOOL
  133. WINAPI
  134. CryptCATAdminReleaseCatalogContext(
  135. IN HCATADMIN hCatAdmin,
  136. IN HCATINFO hCatInfo,
  137. IN DWORD dwFlags)
  138. {
  139. SetLastError(ERROR_PROC_NOT_FOUND);
  140. return FALSE;
  141. }
  142. static
  143. BOOL
  144. WINAPI
  145. CryptCATAdminRemoveCatalog(
  146. IN HCATADMIN hCatAdmin,
  147. IN LPCWSTR pwszCatalogFile,
  148. IN DWORD dwFlags)
  149. {
  150. SetLastError(ERROR_PROC_NOT_FOUND);
  151. return FALSE;
  152. }
  153. static
  154. BOOL
  155. WINAPI
  156. CryptCATAdminResolveCatalogPath(
  157. IN HCATADMIN hCatAdmin,
  158. IN WCHAR *pwszCatalogFile,
  159. IN OUT CATALOG_INFO *psCatInfo,
  160. IN DWORD dwFlags)
  161. {
  162. SetLastError(ERROR_PROC_NOT_FOUND);
  163. return FALSE;
  164. }
  165. //
  166. // !! WARNING !! The entries below must be in alphabetical order
  167. // and are CASE SENSITIVE (i.e., lower case comes last!)
  168. //
  169. DEFINE_PROCNAME_ENTRIES(wintrust)
  170. {
  171. DLPENTRY(CryptCATAdminAcquireContext)
  172. DLPENTRY(CryptCATAdminAddCatalog)
  173. DLPENTRY(CryptCATAdminCalcHashFromFileHandle)
  174. DLPENTRY(CryptCATAdminEnumCatalogFromHash)
  175. DLPENTRY(CryptCATAdminReleaseCatalogContext)
  176. DLPENTRY(CryptCATAdminReleaseContext)
  177. DLPENTRY(CryptCATAdminRemoveCatalog)
  178. DLPENTRY(CryptCATAdminResolveCatalogPath)
  179. DLPENTRY(CryptCATCatalogInfoFromContext)
  180. DLPENTRY(WTHelperGetFileHash)
  181. DLPENTRY(WTHelperGetProvCertFromChain)
  182. DLPENTRY(WTHelperGetProvSignerFromChain)
  183. DLPENTRY(WTHelperProvDataFromStateData)
  184. DLPENTRY(WinVerifyTrust)
  185. };
  186. DEFINE_PROCNAME_MAP(wintrust)