Source code of Windows XP (NT5)
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.

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