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.

420 lines
7.7 KiB

  1. #include "dspch.h"
  2. #pragma hdrstop
  3. #define _CERTCLI_
  4. #include <certca.h>
  5. #include <winldap.h>
  6. static
  7. HRESULT
  8. WINAPI
  9. CAAccessCheck(
  10. IN HCAINFO hCAInfo,
  11. IN HANDLE ClientToken
  12. )
  13. {
  14. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  15. }
  16. static
  17. HRESULT
  18. WINAPI
  19. CACertTypeAccessCheck(
  20. IN HCERTTYPE hCertType,
  21. IN HANDLE ClientToken
  22. )
  23. {
  24. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  25. }
  26. static
  27. HRESULT
  28. WINAPI
  29. CACloseCA(
  30. IN HCAINFO hCA
  31. )
  32. {
  33. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  34. }
  35. static
  36. HRESULT
  37. WINAPI
  38. CACloseCertType(
  39. IN HCERTTYPE hCertType
  40. )
  41. {
  42. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  43. }
  44. static
  45. DWORD
  46. WINAPI
  47. CACountCAs(
  48. IN HCAINFO hCAInfo
  49. )
  50. {
  51. return 0;
  52. }
  53. static
  54. DWORD
  55. WINAPI
  56. CACountCertTypes(
  57. IN HCERTTYPE hCertType
  58. )
  59. {
  60. return 0;
  61. }
  62. static
  63. CERTCLIAPI
  64. HRESULT
  65. WINAPI
  66. CACreateLocalAutoEnrollmentObject(
  67. IN LPCWSTR pwszCertType,
  68. IN OPTIONAL WCHAR ** awszCAs,
  69. IN OPTIONAL PCMSG_SIGNED_ENCODE_INFO pSignerInfo,
  70. IN DWORD dwFlags
  71. )
  72. {
  73. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  74. }
  75. static
  76. HRESULT
  77. WINAPI
  78. CAEnumCertTypesForCA(
  79. IN HCAINFO hCAInfo,
  80. IN DWORD dwFlags,
  81. OUT HCERTTYPE * phCertType
  82. )
  83. {
  84. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  85. }
  86. static
  87. HRESULT
  88. WINAPI
  89. CAEnumCertTypesForCAEx(
  90. IN HCAINFO hCAInfo,
  91. IN LPCWSTR wszScope,
  92. IN DWORD dwFlags,
  93. OUT HCERTTYPE * phCertType
  94. )
  95. {
  96. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  97. }
  98. static
  99. HRESULT
  100. WINAPI
  101. CAEnumFirstCA(
  102. IN LPCWSTR wszScope,
  103. IN DWORD fFlags,
  104. OUT HCAINFO * phCAInfo
  105. )
  106. {
  107. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  108. }
  109. static
  110. HRESULT
  111. WINAPI
  112. CAEnumNextCA(
  113. IN HCAINFO hPrevCA,
  114. OUT HCAINFO * phCAInfo
  115. )
  116. {
  117. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  118. }
  119. static
  120. HRESULT
  121. WINAPI
  122. CAEnumNextCertType(
  123. IN HCERTTYPE hPrevCertType,
  124. OUT HCERTTYPE * phCertType
  125. )
  126. {
  127. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  128. }
  129. static
  130. HRESULT
  131. CAFindByIssuerDN(
  132. IN CERT_NAME_BLOB const * pIssuerDN,
  133. IN LPCWSTR wszScope,
  134. IN DWORD fFlags,
  135. OUT HCAINFO * phCAInfo
  136. )
  137. {
  138. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  139. }
  140. static
  141. HRESULT
  142. WINAPI
  143. CAFindByName(
  144. IN LPCWSTR wszCAName,
  145. IN LPCWSTR wszScope,
  146. IN DWORD dwFlags,
  147. OUT HCAINFO * phCAInfo
  148. )
  149. {
  150. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  151. }
  152. static
  153. HRESULT
  154. WINAPI
  155. CAFindCertTypeByName(
  156. IN LPCWSTR wszCertType,
  157. IN HCAINFO hCAInfo,
  158. IN DWORD dwFlags,
  159. OUT HCERTTYPE * phCertType
  160. )
  161. {
  162. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  163. }
  164. static
  165. HRESULT
  166. WINAPI
  167. CAFreeCAProperty(
  168. IN HCAINFO hCAInfo,
  169. LPWSTR * awszPropertyValue
  170. )
  171. {
  172. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  173. }
  174. static
  175. HRESULT
  176. WINAPI
  177. CAFreeCertTypeExtensions(
  178. IN HCERTTYPE hCertType,
  179. IN PCERT_EXTENSIONS pCertExtensions
  180. )
  181. {
  182. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  183. }
  184. static
  185. HRESULT
  186. WINAPI
  187. CAFreeCertTypeProperty(
  188. IN HCERTTYPE hCertType,
  189. IN LPWSTR * awszPropertyValue
  190. )
  191. {
  192. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  193. }
  194. static
  195. HRESULT
  196. WINAPI
  197. CAGetCACertificate(
  198. IN HCAINFO hCAInfo,
  199. OUT PCCERT_CONTEXT *ppCert
  200. )
  201. {
  202. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  203. }
  204. static
  205. HRESULT
  206. WINAPI
  207. CAGetCAProperty(
  208. IN HCAINFO hCAInfo,
  209. IN LPCWSTR wszPropertyName,
  210. OUT LPWSTR ** pawszPropertyValue
  211. )
  212. {
  213. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  214. }
  215. static
  216. HRESULT
  217. WINAPI
  218. CAGetCertTypeExpiration(
  219. IN HCERTTYPE hCertType,
  220. OUT OPTIONAL FILETIME * pftExpiration,
  221. OUT OPTIONAL FILETIME * pftOverlap
  222. )
  223. {
  224. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  225. }
  226. static
  227. HRESULT
  228. WINAPI
  229. CAGetCertTypeExtensions(
  230. IN HCERTTYPE hCertType,
  231. OUT PCERT_EXTENSIONS * ppCertExtensions
  232. )
  233. {
  234. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  235. }
  236. static
  237. HRESULT
  238. WINAPI
  239. CAGetCertTypeExtensionsEx(
  240. IN HCERTTYPE hCertType,
  241. IN DWORD dwFlags,
  242. IN LPVOID pParam,
  243. OUT PCERT_EXTENSIONS * ppCertExtensions
  244. )
  245. {
  246. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  247. }
  248. static
  249. HRESULT
  250. WINAPI
  251. CAGetCertTypeFlags(
  252. IN HCERTTYPE hCertType,
  253. OUT DWORD * pdwFlags
  254. )
  255. {
  256. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  257. }
  258. static
  259. HRESULT
  260. WINAPI
  261. CAGetCertTypeFlagsEx(
  262. IN HCERTTYPE hCertType,
  263. IN DWORD dwOption,
  264. OUT DWORD * pdwFlags
  265. )
  266. {
  267. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  268. }
  269. static
  270. HRESULT
  271. WINAPI
  272. CAGetCertTypeKeySpec(
  273. IN HCERTTYPE hCertType,
  274. OUT DWORD * pdwKeySpec
  275. )
  276. {
  277. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  278. }
  279. static
  280. HRESULT
  281. WINAPI
  282. CAGetCertTypeProperty(
  283. IN HCERTTYPE hCertType,
  284. IN LPCWSTR wszPropertyName,
  285. OUT LPWSTR ** pawszPropertyValue
  286. )
  287. {
  288. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  289. }
  290. static
  291. HRESULT
  292. WINAPI
  293. CAGetCertTypePropertyEx(
  294. IN HCERTTYPE hCertType,
  295. IN LPCWSTR wszPropertyName,
  296. OUT LPVOID pPropertyValue)
  297. {
  298. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  299. }
  300. static
  301. HRESULT
  302. WINAPI
  303. myRobustLdapBind(
  304. OUT LDAP ** ppldap,
  305. IN BOOL fGC
  306. )
  307. {
  308. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  309. }
  310. static
  311. HRESULT
  312. WINAPI
  313. CertServerSubmitRequest(
  314. IN DWORD Flags,
  315. IN BYTE const *pbRequest,
  316. IN DWORD cbRequest,
  317. OPTIONAL IN WCHAR const *pwszRequestAttributes,
  318. IN WCHAR const *pwszServerName,
  319. IN WCHAR const *pwszAuthority,
  320. OUT CERTSERVERENROLL **ppcsEnroll) // free via CertServerFreeMemory
  321. {
  322. return HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
  323. }
  324. static
  325. VOID
  326. WINAPI
  327. CertServerFreeMemory(
  328. IN VOID *pv)
  329. {
  330. NOTHING;
  331. }
  332. //
  333. // !! WARNING !! The entries below must be in alphabetical order, and are CASE SENSITIVE (eg lower case comes last!)
  334. //
  335. DEFINE_PROCNAME_ENTRIES(certcli)
  336. {
  337. DLPENTRY(CAAccessCheck)
  338. DLPENTRY(CACertTypeAccessCheck)
  339. DLPENTRY(CACloseCA)
  340. DLPENTRY(CACloseCertType)
  341. DLPENTRY(CACountCAs)
  342. DLPENTRY(CACountCertTypes)
  343. DLPENTRY(CACreateLocalAutoEnrollmentObject)
  344. DLPENTRY(CAEnumCertTypesForCA)
  345. DLPENTRY(CAEnumCertTypesForCAEx)
  346. DLPENTRY(CAEnumFirstCA)
  347. DLPENTRY(CAEnumNextCA)
  348. DLPENTRY(CAEnumNextCertType)
  349. DLPENTRY(CAFindByIssuerDN)
  350. DLPENTRY(CAFindByName)
  351. DLPENTRY(CAFindCertTypeByName)
  352. DLPENTRY(CAFreeCAProperty)
  353. DLPENTRY(CAFreeCertTypeExtensions)
  354. DLPENTRY(CAFreeCertTypeProperty)
  355. DLPENTRY(CAGetCACertificate)
  356. DLPENTRY(CAGetCAProperty)
  357. DLPENTRY(CAGetCertTypeExpiration)
  358. DLPENTRY(CAGetCertTypeExtensions)
  359. DLPENTRY(CAGetCertTypeExtensionsEx)
  360. DLPENTRY(CAGetCertTypeFlags)
  361. DLPENTRY(CAGetCertTypeFlagsEx)
  362. DLPENTRY(CAGetCertTypeKeySpec)
  363. DLPENTRY(CAGetCertTypeProperty)
  364. DLPENTRY(CAGetCertTypePropertyEx)
  365. };
  366. DEFINE_PROCNAME_MAP(certcli)
  367. //
  368. // !! WARNING !! The entries below must be in order by ORDINAL
  369. //
  370. DEFINE_ORDINAL_ENTRIES(certcli)
  371. {
  372. DLOENTRY(214,myRobustLdapBind)
  373. DLOENTRY(219,CertServerSubmitRequest)
  374. DLOENTRY(221,CertServerFreeMemory)
  375. };
  376. DEFINE_ORDINAL_MAP(certcli)