CertCli.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:8k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File:        certcli.idl
  7. //
  8. // Contents:    IDL source for certcli.dll
  9. //
  10. //---------------------------------------------------------------------------
  11. // This file will be processed by the MIDL tool to produce the type library
  12. // (certcli.tlb) and marshalling code.
  13. import "wtypes.idl";
  14. import "certif.idl";
  15. //+--------------------------------------------------------------------------
  16. // ICertGetConfig class -- local COM interface, local implementation
  17. //+--------------------------------------------------------------------------
  18. [
  19.     object,
  20.     uuid(c7ea09c0-ce17-11d0-8833-00a0c903b83c),
  21.     dual,
  22.     helpstring("ICertGetConfig Interface"),
  23.     pointer_default(unique)
  24. ]
  25. interface ICertGetConfig: IDispatch
  26. {
  27.     import "oaidl.idl";
  28.     HRESULT GetConfig(
  29. [in] LONG Flags,
  30. [out, retval] BSTR *pstrOut);
  31. };
  32. //+--------------------------------------------------------------------------
  33. // ICertConfig::GetField()
  34. // strFieldName parameter values:
  35.      cpp_quote("#define wszCONFIG_COMMONNAME  L"CommonName"")
  36.      cpp_quote("#define wszCONFIG_ORGUNIT  L"OrgUnit"")
  37.      cpp_quote("#define wszCONFIG_ORGANIZATION  L"Organization"")
  38.      cpp_quote("#define wszCONFIG_LOCALITY  L"Locality"")
  39.      cpp_quote("#define wszCONFIG_STATE L"State"")
  40.      cpp_quote("#define wszCONFIG_COUNTRY L"Country"")
  41.      cpp_quote("#define wszCONFIG_CONFIG L"Config"")
  42.      cpp_quote("#define wszCONFIG_EXCHANGECERTIFICATE L"ExchangeCertificate"")
  43.      cpp_quote("#define wszCONFIG_SIGNATURECERTIFICATE L"SignatureCertificate"")
  44.      cpp_quote("#define wszCONFIG_DESCRIPTION L"Description"")
  45.      cpp_quote("#define wszCONFIG_COMMENT L"Comment" // obsolete: use Description")
  46.      cpp_quote("#define wszCONFIG_SERVER  L"Server"")
  47.      cpp_quote("#define wszCONFIG_AUTHORITY  L"Authority"")
  48.      cpp_quote("#define wszCONFIG_SANITIZEDNAME L"SanitizedName"")
  49.      cpp_quote("#define wszCONFIG_SHORTNAME L"ShortName"")
  50.      cpp_quote("#define wszCONFIG_SANITIZEDSHORTNAME L"SanitizedShortName"")
  51.      cpp_quote("#define wszCONFIG_FLAGS L"Flags"")
  52. // Flags setting
  53. const LONG CAIF_DSENTRY           = 0x00000001; // bit set for CA from DS
  54. const LONG CAIF_SHAREDFOLDERENTRY = 0x00000002; // bit set for CA from
  55.                                                 // shared folder
  56. //+--------------------------------------------------------------------------
  57. // ICertConfig class -- local COM interface, local implementation
  58. //+--------------------------------------------------------------------------
  59. [
  60.     object,
  61.     uuid(372fce34-4324-11d0-8810-00a0c903b83c),
  62.     dual,
  63.     helpstring("ICertConfig Interface"),
  64.     pointer_default(unique)
  65. ]
  66. interface ICertConfig: IDispatch
  67. {
  68.     import "oaidl.idl";
  69.     HRESULT Reset(
  70. [in] LONG Index,
  71. [out, retval] LONG *pCount);
  72.     HRESULT Next(
  73. [out, retval] LONG *pIndex);
  74.     HRESULT GetField(
  75. [in] BSTR const strFieldName,
  76. [out, retval] BSTR *pstrOut);
  77.     HRESULT GetConfig(
  78. [in] LONG Flags,
  79. [out, retval] BSTR *pstrOut);
  80. };
  81. //+--------------------------------------------------------------------------
  82. // ICertRequest::Submit()
  83. // Flags for request and attributes encoding and type:
  84. const LONG CR_IN_BASE64HEADER = 0x00000000; // BASE64 with begin/end
  85. const LONG CR_IN_BASE64 =       0x00000001; // BASE64 w/o begin/end
  86. const LONG CR_IN_BINARY =       0x00000002; // binary request
  87. const LONG CR_IN_ENCODEANY = 0x000000ff;  // Could be any of the above
  88. const LONG CR_IN_ENCODEMASK = 0x000000ff; // request encoding mask
  89. const LONG CR_IN_FORMATANY = 0x00000000;  // Could be any of the below
  90. const LONG CR_IN_PKCS10 = 0x00000100;  // PKCS 10 request
  91. const LONG CR_IN_KEYGEN = 0x00000200;  // Keygen request
  92. const LONG CR_IN_PKCS7 = 0x00000300;  // PKCS 7 renewal request
  93. const LONG CR_IN_FORMATMASK = 0x0000ff00; // request format mask
  94. const LONG CR_IN_RPC =          0x00020000; // Use RPC instead of DCOM
  95. // Flags for GetConfig flag
  96. const LONG CC_DEFAULTCONFIG = 0x00000000; // ask to get 1st pingable CA config
  97. const LONG CC_UIPICKCONFIG  = 0x00000001; // invoke a UI to pick CA config
  98. const LONG CC_FIRSTCONFIG  = 0x00000002; // pick first CA config
  99. //+--------------------------------------------------------------------------
  100. // ICertRequest::Submit(), ICertRequest::RetrievePending() and
  101. // returned Disposition:
  102. const LONG CR_DISP_INCOMPLETE = 0x00000000; // request did not complete
  103. const LONG CR_DISP_ERROR = 0x00000001; // request failed
  104. const LONG CR_DISP_DENIED = 0x00000002; // request denied
  105. const LONG CR_DISP_ISSUED = 0x00000003; // cert issued
  106. const LONG CR_DISP_ISSUED_OUT_OF_BAND = 0x00000004; // cert issued separately
  107. const LONG CR_DISP_UNDER_SUBMISSION =   0x00000005; // taken under submission
  108. const LONG CR_DISP_REVOKED =         0x00000006; // issued and revoked
  109. //+--------------------------------------------------------------------------
  110. // ICertRequest::GetCACertificate(), ICertRequest::GetCertificate() and
  111. // ICertAdmin::GetCRL()
  112. // Flags for certificate encoding:
  113. const LONG CR_OUT_BASE64HEADER = 0x00000000; // BASE64 with begin/end
  114. const LONG CR_OUT_BASE64 =       0x00000001; // BASE64 w/o begin/end
  115. const LONG CR_OUT_BINARY =       0x00000002; // binary certificate
  116. const LONG CR_OUT_ENCODEMASK =  0x000000ff; // certificate encoding mask
  117. const LONG CR_OUT_CHAIN =  0x00000100; // return certificate chain
  118. const LONG CR_OUT_DELTACRL =  0x00000200; // ICertAdmin::GetCRL() only
  119. //+--------------------------------------------------------------------------
  120. // ICertRequest class -- local COM interface, implementation uses DCOM
  121. //+--------------------------------------------------------------------------
  122. [
  123.     object,
  124.     uuid(014e4840-5523-11d0-8812-00a0c903b83c),
  125.     dual,
  126.     helpstring("ICertRequest Interface"),
  127.     pointer_default(unique)
  128. ]
  129. interface ICertRequest: IDispatch
  130. {
  131.     import "oaidl.idl";
  132.     HRESULT Submit(
  133. [in] LONG Flags,
  134. [in] BSTR const strRequest,
  135. [in] BSTR const strAttributes,
  136. [in] BSTR const strConfig,
  137. [out, retval] LONG *pDisposition);
  138.     HRESULT RetrievePending(
  139. [in] LONG RequestId,
  140. [in] BSTR const strConfig,
  141. [out, retval] LONG *pDisposition);
  142.     HRESULT GetLastStatus(
  143. [out, retval] LONG *pStatus);
  144.     HRESULT GetRequestId(
  145. [out, retval] LONG *pRequestId);
  146.     HRESULT GetDispositionMessage(
  147. [out, retval] BSTR *pstrDispositionMessage);
  148.     HRESULT GetCACertificate(
  149. [in] LONG fExchangeCertificate,
  150. [in] BSTR const strConfig,
  151. [in] LONG Flags,
  152. [out, retval] BSTR *pstrCertificate);
  153.     HRESULT GetCertificate(
  154. [in] LONG Flags,
  155. [out, retval] BSTR *pstrCertificate);
  156. };
  157. //+--------------------------------------------------------------------------
  158. // certcli Type library
  159. //+--------------------------------------------------------------------------
  160. [
  161.     uuid(372fce32-4324-11d0-8810-00a0c903b83c),
  162.     version(1.0),
  163.     helpstring("CertCli 1.0 Type Library")
  164. ]
  165. library CERTCLIENTLib
  166. {
  167.     importlib("stdole2.tlb");
  168.     [
  169. uuid(c6cc49b0-ce17-11d0-8833-00a0c903b83c),
  170. helpstring("CertGetConfig Class")
  171.     ]
  172.     coclass CCertGetConfig
  173.     {
  174. [default] interface ICertGetConfig;
  175.     };
  176.     [
  177. uuid(372fce38-4324-11d0-8810-00a0c903b83c),
  178. helpstring("CertConfig Class")
  179.     ]
  180.     coclass CCertConfig
  181.     {
  182. [default] interface ICertConfig;
  183.     };
  184.     [
  185. uuid(98aff3f0-5524-11d0-8812-00a0c903b83c),
  186. helpstring("CertRequest Class")
  187.     ]
  188.     coclass CCertRequest
  189.     {
  190. [default] interface ICertRequest;
  191.     };
  192.     [
  193. uuid(aa000926-ffbe-11cf-8800-00a0c903b83c),
  194. helpstring("CertServerPolicy Class")
  195.     ]
  196.     coclass CCertServerPolicy
  197.     {
  198. [default] interface ICertServerPolicy;
  199.     };
  200.     [
  201. uuid(4c4a5e40-732c-11d0-8816-00a0c903b83c),
  202. helpstring("CertServerExit Class")
  203.     ]
  204.     coclass CCertServerExit
  205.     {
  206. [default] interface ICertServerExit;
  207.     };
  208. };