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.

257 lines
7.6 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: certadm.idl
  7. //
  8. // Contents: IDL source for certadm.dll
  9. //
  10. //---------------------------------------------------------------------------
  11. // This file will be processed by the MIDL tool to produce the type library
  12. // (certadm.tlb) and marshalling code.
  13. import "wtypes.idl";
  14. import "certview.idl";
  15. //+--------------------------------------------------------------------------
  16. // ICertAdmin::IsValidCertificate() returned Disposition:
  17. const LONG CA_DISP_INCOMPLETE = 0x00000000; // call did not complete
  18. const LONG CA_DISP_ERROR = 0x00000001; // call failed
  19. const LONG CA_DISP_REVOKED = 0x00000002; // cert revoked
  20. const LONG CA_DISP_VALID = 0x00000003; // cert still valid
  21. const LONG CA_DISP_INVALID = 0x00000004; // cert never issued
  22. const LONG CA_DISP_UNDER_SUBMISSION = 0x00000005; // taken under submission
  23. //+--------------------------------------------------------------------------
  24. // ICertAdmin::GetCAProperty(CR_PROP_KRACERTSTATE) returned Disposition:
  25. const LONG KRA_DISP_EXPIRED = 0x00000000; // cert expired
  26. const LONG KRA_DISP_NOTFOUND = 0x00000001; // cert not found
  27. const LONG KRA_DISP_REVOKED = 0x00000002; // cert revoked
  28. const LONG KRA_DISP_VALID = 0x00000003; // cert valid
  29. const LONG KRA_DISP_INVALID = 0x00000004; // cert invalid
  30. const LONG KRA_DISP_UNTRUSTED = 0x00000005; // cert untrusted
  31. const LONG KRA_DISP_NOTLOADED = 0x00000006; // cert not loaded
  32. // Cert server roles
  33. const LONG CA_ACCESS_ADMIN = 0x00000001; // CA administrator
  34. const LONG CA_ACCESS_OFFICER = 0x00000002; // certificate officer
  35. const LONG CA_ACCESS_AUDITOR = 0x00000004; // auditor
  36. const LONG CA_ACCESS_OPERATOR = 0x00000008; // backup operator
  37. const LONG CA_ACCESS_MASKROLES = 0x000000ff;
  38. // Cert server read/enroll access
  39. const LONG CA_ACCESS_READ = 0x00000100; // read only access to CA
  40. const LONG CA_ACCESS_ENROLL = 0x00000200; // enroll access to CA
  41. // do not publish this, reserved for internal use
  42. // const LONG CA_ACCESS_LOCALADMIN = 0x00008000; // builtin administrator
  43. // const LONG CA_ACCESS_DENIED = 0x00004000; // force an access denied
  44. //+--------------------------------------------------------------------------
  45. // ICertAdmin -- local COM interface, implementation uses DCOM
  46. //+--------------------------------------------------------------------------
  47. [
  48. object,
  49. uuid(34df6950-7fb6-11d0-8817-00a0c903b83c),
  50. dual,
  51. helpstring("ICertAdmin Interface"),
  52. pointer_default(unique)
  53. ]
  54. interface ICertAdmin: IDispatch
  55. {
  56. import "oaidl.idl";
  57. HRESULT IsValidCertificate(
  58. [in] BSTR const strConfig,
  59. [in] BSTR const strSerialNumber,
  60. [out, retval] LONG *pDisposition);
  61. HRESULT GetRevocationReason(
  62. [out, retval] LONG *pReason);
  63. HRESULT RevokeCertificate(
  64. [in] BSTR const strConfig,
  65. [in] BSTR const strSerialNumber,
  66. [in] LONG Reason,
  67. [in] DATE Date);
  68. HRESULT SetRequestAttributes(
  69. [in] BSTR const strConfig,
  70. [in] LONG RequestId,
  71. [in] BSTR const strAttributes);
  72. HRESULT SetCertificateExtension(
  73. [in] BSTR const strConfig,
  74. [in] LONG RequestId,
  75. [in] BSTR const strExtensionName,
  76. [in] LONG Type,
  77. [in] LONG Flags,
  78. [in] VARIANT const *pvarValue);
  79. HRESULT DenyRequest(
  80. [in] BSTR const strConfig,
  81. [in] LONG RequestId);
  82. HRESULT ResubmitRequest(
  83. [in] BSTR const strConfig,
  84. [in] LONG RequestId,
  85. [out, retval] LONG *pDisposition);
  86. HRESULT PublishCRL(
  87. [in] BSTR const strConfig,
  88. [in] DATE Date);
  89. // See certcli.idl/certcli.h for CR_OUT_* Flags.
  90. HRESULT GetCRL(
  91. [in] BSTR const strConfig,
  92. [in] LONG Flags, // CR_OUT_*
  93. [out, retval] BSTR *pstrCRL);
  94. HRESULT ImportCertificate(
  95. [in] BSTR const strConfig,
  96. [in] BSTR const strCertificate,
  97. [in] LONG Flags, // ICF_* | (CR_IN_ENCODEMASK & CR_IN_*)
  98. [out, retval] LONG *pRequestId);
  99. };
  100. const LONG CA_CRL_BASE = 0x00000001; // base CRL
  101. const LONG CA_CRL_DELTA = 0x00000002; // delta CRL
  102. const LONG CA_CRL_REPUBLISH = 0x00000010; // Republish CRL(s) only
  103. const LONG ICF_ALLOWFOREIGN = 0x00010000; // allow foreign cert, key
  104. const LONG IKF_OVERWRITE = 0x00010000; // allow overwriting key
  105. const LONG CDR_EXPIRED = 1; // expired certs, CRLs
  106. const LONG CDR_REQUEST_LAST_CHANGED = 2; // request last update
  107. //+--------------------------------------------------------------------------
  108. // ICertAdmin2 -- local COM interface, implementation uses DCOM
  109. //+--------------------------------------------------------------------------
  110. [
  111. object,
  112. uuid(f7c3ac41-b8ce-4fb4-aa58-3d1dc0e36b39),
  113. dual,
  114. helpstring("ICertAdmin2 Interface"),
  115. pointer_default(unique)
  116. ]
  117. interface ICertAdmin2: ICertAdmin
  118. {
  119. HRESULT PublishCRLs(
  120. [in] BSTR const strConfig,
  121. [in] DATE Date,
  122. [in] LONG CRLFlags); // CA_CRL_*
  123. // See certcli.idl/certcli.h for CR_PROP_* and CR_OUT_*.
  124. HRESULT GetCAProperty(
  125. [in] BSTR const strConfig,
  126. [in] LONG PropId, // CR_PROP_*
  127. [in] LONG PropIndex,
  128. [in] LONG PropType, // PROPTYPE_*
  129. [in] LONG Flags, // CR_OUT_*
  130. [out, retval] VARIANT *pvarPropertyValue);
  131. HRESULT SetCAProperty(
  132. [in] BSTR const strConfig,
  133. [in] LONG PropId, // CR_PROP_*
  134. [in] LONG PropIndex,
  135. [in] LONG PropType, // PROPTYPE_*
  136. [in] VARIANT *pvarPropertyValue);
  137. HRESULT GetCAPropertyFlags(
  138. [in] BSTR const strConfig,
  139. [in] LONG PropId, // CR_PROP_*
  140. [out, retval] LONG *pPropFlags); // PROPTYPE_* | PROPFLAGS_*
  141. HRESULT GetCAPropertyDisplayName(
  142. [in] BSTR const strConfig,
  143. [in] LONG PropId, // CR_PROP_*
  144. [out, retval] BSTR *pstrDisplayName);
  145. HRESULT GetArchivedKey(
  146. [in] BSTR const strConfig,
  147. [in] LONG RequestId,
  148. [in] LONG Flags, // CR_OUT_*
  149. [out, retval] BSTR *pstrArchivedKey);
  150. HRESULT GetConfigEntry(
  151. [in] BSTR const strConfig,
  152. [in] BSTR const strNodePath,
  153. [in] BSTR const strEntryName,
  154. [out, retval] VARIANT *pvarEntry);
  155. HRESULT SetConfigEntry(
  156. [in] BSTR const strConfig,
  157. [in] BSTR const strNodePath,
  158. [in] BSTR const strEntryName,
  159. [in] VARIANT *pvarEntry);
  160. HRESULT ImportKey(
  161. [in] BSTR const strConfig,
  162. [in] LONG RequestId, // -1: use strCertHash
  163. [in] BSTR const strCertHash, // OPTIONAL
  164. [in] LONG Flags, // IKF_* | (CR_IN_ENCODEMASK & CR_IN_*)
  165. [in] BSTR const strKey);
  166. HRESULT GetMyRoles(
  167. [in] BSTR const strConfig,
  168. [out, retval] LONG *pRoles); // CA_ACCESS_*
  169. HRESULT DeleteRow(
  170. [in] BSTR const strConfig,
  171. [in] LONG Flags, // CDR_*
  172. [in] DATE Date,
  173. [in] LONG Table, // CVRC_TABLE_*
  174. [in] LONG RowId,
  175. [out, retval] LONG *pcDeleted);
  176. };
  177. //+--------------------------------------------------------------------------
  178. // certadm Type library
  179. //+--------------------------------------------------------------------------
  180. [
  181. uuid(35de99a0-7fb6-11d0-8817-00a0c903b83c),
  182. version(1.0),
  183. helpstring("CertAdm 1.0 Type Library")
  184. ]
  185. library CERTADMINLib
  186. {
  187. importlib("stdole2.tlb");
  188. //------------------------------------------------
  189. // CCertAdmin
  190. [
  191. uuid(37eabaf0-7fb6-11d0-8817-00a0c903b83c),
  192. helpstring("CertAdmin Class")
  193. ]
  194. coclass CCertAdmin
  195. {
  196. [default] interface ICertAdmin2;
  197. };
  198. //------------------------------------------------
  199. // CCertView
  200. [
  201. uuid(a12d0f7a-1e84-11d1-9bd6-00c04fb683fa),
  202. helpstring("CertView Class")
  203. ]
  204. coclass CCertView
  205. {
  206. [default] interface ICertView2;
  207. };
  208. };