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.

340 lines
6.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: softpub.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifdef _M_IX86
  11. #include <windows.h>
  12. #include <wincrypt.h>
  13. #include <wintrust.h>
  14. #include <prsht.h>
  15. STDAPI SoftpubDllRegisterServer(void);
  16. EXTERN_C
  17. __declspec(naked)
  18. HRESULT
  19. STDAPICALLTYPE
  20. DllRegisterServer()
  21. {
  22. __asm {
  23. jmp SoftpubDllRegisterServer
  24. }
  25. }
  26. STDAPI SoftpubDllUnregisterServer(void);
  27. EXTERN_C
  28. __declspec(naked)
  29. HRESULT
  30. STDAPICALLTYPE
  31. DllUnregisterServer()
  32. {
  33. __asm {
  34. jmp SoftpubDllUnregisterServer
  35. }
  36. }
  37. EXTERN_C
  38. HRESULT WINAPI SoftpubAuthenticode(CRYPT_PROVIDER_DATA *pProvData);
  39. EXTERN_C
  40. __declspec(naked)
  41. HRESULT WINAPI ForwardrSoftpubAuthenticode(CRYPT_PROVIDER_DATA *pProvData)
  42. {
  43. __asm {
  44. jmp SoftpubAuthenticode
  45. }
  46. }
  47. EXTERN_C
  48. HRESULT WINAPI SoftpubDumpStructure(CRYPT_PROVIDER_DATA *pProvData);
  49. EXTERN_C
  50. __declspec(naked)
  51. HRESULT WINAPI ForwardrSoftpubDumpStructure(CRYPT_PROVIDER_DATA *pProvData)
  52. {
  53. __asm {
  54. jmp SoftpubDumpStructure
  55. }
  56. }
  57. EXTERN_C
  58. HRESULT WINAPI SoftpubInitialize(CRYPT_PROVIDER_DATA *pProvData);
  59. EXTERN_C
  60. __declspec(naked)
  61. HRESULT WINAPI ForwardrSoftpubInitialize(CRYPT_PROVIDER_DATA *pProvData)
  62. {
  63. __asm {
  64. jmp SoftpubInitialize
  65. }
  66. }
  67. EXTERN_C
  68. HRESULT WINAPI SoftpubLoadMessage(CRYPT_PROVIDER_DATA *pProvData);
  69. EXTERN_C
  70. __declspec(naked)
  71. HRESULT WINAPI ForwardrSoftpubLoadMessage(CRYPT_PROVIDER_DATA *pProvData)
  72. {
  73. __asm {
  74. jmp SoftpubLoadMessage
  75. }
  76. }
  77. EXTERN_C
  78. HRESULT SoftpubLoadSignature(CRYPT_PROVIDER_DATA *pProvData);
  79. EXTERN_C
  80. __declspec(naked)
  81. HRESULT ForwardrSoftpubLoadSignature(CRYPT_PROVIDER_DATA *pProvData)
  82. {
  83. __asm {
  84. jmp SoftpubLoadSignature
  85. }
  86. }
  87. EXTERN_C
  88. BOOL WINAPI SoftpubCheckCert(CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner,
  89. BOOL fCounterSignerChain, DWORD idxCounterSigner);
  90. EXTERN_C
  91. __declspec(naked)
  92. BOOL WINAPI ForwardrSoftpubCheckCert(CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner,
  93. BOOL fCounterSignerChain, DWORD idxCounterSigner)
  94. {
  95. __asm {
  96. jmp SoftpubCheckCert
  97. }
  98. }
  99. EXTERN_C
  100. HRESULT WINAPI SoftpubCleanup(CRYPT_PROVIDER_DATA *pProvData);
  101. EXTERN_C
  102. __declspec(naked)
  103. HRESULT WINAPI ForwardrSoftpubCleanup(CRYPT_PROVIDER_DATA *pProvData)
  104. {
  105. __asm {
  106. jmp SoftpubCleanup
  107. }
  108. }
  109. HRESULT WINAPI SoftpubDefCertInit(CRYPT_PROVIDER_DATA *pProvData);
  110. __declspec(naked)
  111. HRESULT WINAPI ForwardrSoftpubDefCertInit(CRYPT_PROVIDER_DATA *pProvData)
  112. {
  113. __asm {
  114. jmp SoftpubDefCertInit
  115. }
  116. }
  117. HRESULT WINAPI HTTPSCertificateTrust(CRYPT_PROVIDER_DATA *pProvData);
  118. __declspec(naked)
  119. HRESULT WINAPI ForwardrHTTPSCertificateTrust(CRYPT_PROVIDER_DATA *pProvData)
  120. {
  121. __asm {
  122. jmp HTTPSCertificateTrust
  123. }
  124. }
  125. EXTERN_C
  126. HRESULT WINAPI HTTPSFinalProv(CRYPT_PROVIDER_DATA *pProvData);
  127. EXTERN_C
  128. __declspec(naked)
  129. HRESULT WINAPI ForwardrHTTPSFinalProv(CRYPT_PROVIDER_DATA *pProvData)
  130. {
  131. __asm {
  132. jmp HTTPSFinalProv
  133. }
  134. }
  135. EXTERN_C
  136. HRESULT WINAPI OfficeInitializePolicy(CRYPT_PROVIDER_DATA *pProvData);
  137. EXTERN_C
  138. __declspec(naked)
  139. HRESULT WINAPI ForwardrOfficeInitializePolicy(CRYPT_PROVIDER_DATA *pProvData)
  140. {
  141. __asm {
  142. jmp OfficeInitializePolicy
  143. }
  144. }
  145. EXTERN_C
  146. HRESULT WINAPI OfficeCleanupPolicy(CRYPT_PROVIDER_DATA *pProvData);
  147. EXTERN_C
  148. __declspec(naked)
  149. HRESULT WINAPI ForwardrOfficeCleanupPolicy(CRYPT_PROVIDER_DATA *pProvData)
  150. {
  151. __asm {
  152. jmp OfficeCleanupPolicy
  153. }
  154. }
  155. EXTERN_C
  156. HRESULT WINAPI DriverInitializePolicy(CRYPT_PROVIDER_DATA *pProvData);
  157. EXTERN_C
  158. __declspec(naked)
  159. HRESULT WINAPI ForwardrDriverInitializePolicy(CRYPT_PROVIDER_DATA *pProvData)
  160. {
  161. __asm {
  162. jmp DriverInitializePolicy
  163. }
  164. }
  165. EXTERN_C
  166. HRESULT WINAPI DriverFinalPolicy(CRYPT_PROVIDER_DATA *pProvData);
  167. EXTERN_C
  168. __declspec(naked)
  169. HRESULT WINAPI ForwardrDriverFinalPolicy(CRYPT_PROVIDER_DATA *pProvData)
  170. {
  171. __asm {
  172. jmp DriverFinalPolicy
  173. }
  174. }
  175. EXTERN_C
  176. HRESULT WINAPI DriverCleanupPolicy(CRYPT_PROVIDER_DATA *pProvData);
  177. EXTERN_C
  178. __declspec(naked)
  179. HRESULT WINAPI ForwardrDriverCleanupPolicy(CRYPT_PROVIDER_DATA *pProvData)
  180. {
  181. __asm {
  182. jmp DriverCleanupPolicy
  183. }
  184. }
  185. EXTERN_C
  186. BOOL WINAPI OpenPersonalTrustDBDialog(HWND hwndParent);
  187. EXTERN_C
  188. __declspec(naked)
  189. BOOL WINAPI ForwardrOpenPersonalTrustDBDialog(HWND hwndParent)
  190. {
  191. __asm {
  192. jmp OpenPersonalTrustDBDialog
  193. }
  194. }
  195. EXTERN_C
  196. BOOL CALLBACK AddPersonalTrustDBPages(
  197. LPVOID lpv,
  198. LPFNADDPROPSHEETPAGE lpfnAddPage,
  199. LPARAM lParam
  200. );
  201. EXTERN_C
  202. __declspec(naked)
  203. BOOL CALLBACK ForwardrAddPersonalTrustDBPages(
  204. LPVOID lpv,
  205. LPFNADDPROPSHEETPAGE lpfnAddPage,
  206. LPARAM lParam
  207. )
  208. {
  209. __asm {
  210. jmp AddPersonalTrustDBPages
  211. }
  212. }
  213. EXTERN_C
  214. __declspec(naked)
  215. HRESULT
  216. WINAPI
  217. ForwardrFindCertsByIssuer(
  218. OUT PCERT_CHAIN pCertChains,
  219. IN OUT DWORD *pcbCertChains,
  220. OUT DWORD *pcCertChains, // count of certificates chains returned
  221. IN BYTE* pbEncodedIssuerName, // DER encoded issuer name
  222. IN DWORD cbEncodedIssuerName, // count in bytes of encoded issuer name
  223. IN LPCWSTR pwszPurpose, // "ClientAuth" or "CodeSigning"
  224. IN DWORD dwKeySpec // only return signers supporting this
  225. // keyspec
  226. )
  227. {
  228. __asm {
  229. jmp FindCertsByIssuer
  230. }
  231. }
  232. BOOL WINAPI SoftpubLoadDefUsageCallData(const char *pszUsageOID, CRYPT_PROVIDER_DEFUSAGE *psDefUsage);
  233. __declspec(naked)
  234. BOOL WINAPI ForwardrSoftpubLoadDefUsageCallData(const char *pszUsageOID, CRYPT_PROVIDER_DEFUSAGE *psDefUsage)
  235. {
  236. __asm {
  237. jmp SoftpubLoadDefUsageCallData
  238. }
  239. }
  240. BOOL WINAPI SoftpubFreeDefUsageCallData(const char *pszUsageOID, CRYPT_PROVIDER_DEFUSAGE *psDefUsage);
  241. __declspec(naked)
  242. BOOL WINAPI ForwardrSoftpubFreeDefUsageCallData(const char *pszUsageOID, CRYPT_PROVIDER_DEFUSAGE *psDefUsage)
  243. {
  244. __asm {
  245. jmp SoftpubFreeDefUsageCallData
  246. }
  247. }
  248. HRESULT
  249. WINAPI
  250. GenericChainCertificateTrust(
  251. IN OUT PCRYPT_PROVIDER_DATA pProvData
  252. );
  253. __declspec(naked)
  254. HRESULT
  255. WINAPI
  256. ForwardrGenericChainCertificateTrust(
  257. IN OUT PCRYPT_PROVIDER_DATA pProvData
  258. )
  259. {
  260. __asm {
  261. jmp GenericChainCertificateTrust
  262. }
  263. }
  264. HRESULT
  265. WINAPI
  266. GenericChainFinalProv(
  267. IN OUT PCRYPT_PROVIDER_DATA pProvData
  268. );
  269. __declspec(naked)
  270. HRESULT
  271. WINAPI
  272. ForwardrGenericChainFinalProv(
  273. IN OUT PCRYPT_PROVIDER_DATA pProvData
  274. )
  275. {
  276. __asm {
  277. jmp GenericChainFinalProv
  278. }
  279. }
  280. #else
  281. static void Dummy()
  282. {
  283. }
  284. #endif