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.

2672 lines
102 KiB

  1. // CAPICOM.idl : IDL source for CAPICOM.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (CAPICOM.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. import "ocidl.idl";
  7. import "wincrypt.idl";
  8. //
  9. // CAPICOM
  10. //
  11. [
  12. uuid(BD26B198-EE42-4725-9B23-AFA912434229),
  13. version(2.0),
  14. helpstring("CAPICOM v2.0 Type Library")
  15. ]
  16. library CAPICOM
  17. {
  18. importlib("stdole32.tlb");
  19. importlib("stdole2.tlb");
  20. //
  21. // Error codes.
  22. //
  23. typedef enum CAPICOM_ERROR_CODE
  24. {
  25. CAPICOM_E_ENCODE_INVALID_TYPE = 0x80880100,
  26. CAPICOM_E_EKU_INVALID_OID = 0x80880200,
  27. CAPICOM_E_EKU_OID_NOT_INITIALIZED = 0x80880201,
  28. CAPICOM_E_CERTIFICATE_NOT_INITIALIZED = 0x80880210,
  29. CAPICOM_E_CERTIFICATE_NO_PRIVATE_KEY = 0x80880211,
  30. CAPICOM_E_CHAIN_NOT_BUILT = 0x80880220,
  31. CAPICOM_E_STORE_NOT_OPENED = 0x80880230,
  32. CAPICOM_E_STORE_EMPTY = 0x80880231,
  33. CAPICOM_E_STORE_INVALID_OPEN_MODE = 0x80880232,
  34. CAPICOM_E_STORE_INVALID_SAVE_AS_TYPE = 0x80880233,
  35. CAPICOM_E_ATTRIBUTE_NAME_NOT_INITIALIZED = 0x80880240,
  36. CAPICOM_E_ATTRIBUTE_VALUE_NOT_INITIALIZED = 0x80880241,
  37. CAPICOM_E_ATTRIBUTE_INVALID_NAME = 0x80880242,
  38. CAPICOM_E_ATTRIBUTE_INVALID_VALUE = 0x80880243,
  39. CAPICOM_E_SIGNER_NOT_INITIALIZED = 0x80880250,
  40. CAPICOM_E_SIGNER_NOT_FOUND = 0x80880251,
  41. CAPICOM_E_SIGNER_NO_CHAIN = 0x80880252, // v2.0
  42. CAPICOM_E_SIGNER_INVALID_USAGE = 0x80880253, // v2.0
  43. CAPICOM_E_SIGN_NOT_INITIALIZED = 0x80880260,
  44. CAPICOM_E_SIGN_INVALID_TYPE = 0x80880261,
  45. CAPICOM_E_SIGN_NOT_SIGNED = 0x80880262,
  46. CAPICOM_E_INVALID_ALGORITHM = 0x80880270,
  47. CAPICOM_E_INVALID_KEY_LENGTH = 0x80880271,
  48. CAPICOM_E_ENVELOP_NOT_INITIALIZED = 0x80880280,
  49. CAPICOM_E_ENVELOP_INVALID_TYPE = 0x80880281,
  50. CAPICOM_E_ENVELOP_NO_RECIPIENT = 0x80880282,
  51. CAPICOM_E_ENVELOP_RECIPIENT_NOT_FOUND = 0x80880283,
  52. CAPICOM_E_ENCRYPT_NOT_INITIALIZED = 0x80880290,
  53. CAPICOM_E_ENCRYPT_INVALID_TYPE = 0x80880291,
  54. CAPICOM_E_ENCRYPT_NO_SECRET = 0x80880292,
  55. CAPICOM_E_NOT_SUPPORTED = 0x80880900,
  56. CAPICOM_E_UI_DISABLED = 0x80880901,
  57. CAPICOM_E_CANCELLED = 0x80880902,
  58. CAPICOM_E_NOT_ALLOWED = 0x80880903, // v2.0
  59. CAPICOM_E_OUT_OF_RESOURCE = 0x80880904, // v2.0
  60. CAPICOM_E_INTERNAL = 0x80880911,
  61. CAPICOM_E_UNKNOWN = 0x80880999,
  62. //
  63. // CAPICOM v2.0.
  64. //
  65. CAPICOM_E_PRIVATE_KEY_NOT_INITIALIZED = 0x80880300,
  66. CAPICOM_E_PRIVATE_KEY_NOT_EXPORTABLE = 0x80880301,
  67. CAPICOM_E_ENCODE_NOT_INITIALIZED = 0x80880320,
  68. CAPICOM_E_EXTENSION_NOT_INITIALIZED = 0x80880330,
  69. CAPICOM_E_PROPERTY_NOT_INITIALIZED = 0x80880340,
  70. CAPICOM_E_FIND_INVALID_TYPE = 0x80880350,
  71. CAPICOM_E_FIND_INVALID_PREDEFINED_POLICY = 0x80880351,
  72. CAPICOM_E_CODE_NOT_INITIALIZED = 0x80880360,
  73. CAPICOM_E_CODE_NOT_SIGNED = 0x80880361,
  74. CAPICOM_E_CODE_DESCRIPTION_NOT_INITIALIZED = 0x80880362,
  75. CAPICOM_E_CODE_DESCRIPTION_URL_NOT_INITIALIZED = 0x80880363,
  76. CAPICOM_E_CODE_INVALID_TIMESTAMP_URL = 0x80880364,
  77. CAPICOM_E_HASH_NO_DATA = 0x80880370,
  78. CAPICOM_E_INVALID_CONVERT_TYPE = 0x80880380,
  79. } CAPICOM_ERROR_CODE;
  80. //
  81. // Enumerated data types.
  82. //
  83. typedef enum CAPICOM_ENCODING_TYPE
  84. {
  85. CAPICOM_ENCODE_BASE64 = 0,
  86. CAPICOM_ENCODE_BINARY = 1,
  87. // v2.0
  88. CAPICOM_ENCODE_ANY = 0xffffffff,
  89. } CAPICOM_ENCODING_TYPE;
  90. typedef enum CAPICOM_EKU
  91. {
  92. CAPICOM_EKU_OTHER = 0,
  93. CAPICOM_EKU_SERVER_AUTH = 1,
  94. CAPICOM_EKU_CLIENT_AUTH = 2,
  95. CAPICOM_EKU_CODE_SIGNING = 3,
  96. CAPICOM_EKU_EMAIL_PROTECTION = 4,
  97. // v2.0
  98. CAPICOM_EKU_SMARTCARD_LOGON = 5,
  99. CAPICOM_EKU_ENCRYPTING_FILE_SYSTEM = 6,
  100. } CAPICOM_EKU;
  101. typedef enum CAPICOM_CHECK_FLAG
  102. {
  103. CAPICOM_CHECK_NONE = 0x00000000,
  104. CAPICOM_CHECK_TRUSTED_ROOT = 0x00000001,
  105. CAPICOM_CHECK_TIME_VALIDITY = 0x00000002,
  106. CAPICOM_CHECK_SIGNATURE_VALIDITY = 0x00000004,
  107. CAPICOM_CHECK_ONLINE_REVOCATION_STATUS = 0x00000008,
  108. CAPICOM_CHECK_OFFLINE_REVOCATION_STATUS = 0x00000010,
  109. // v2.0
  110. CAPICOM_CHECK_COMPLETE_CHAIN = 0x00000020,
  111. CAPICOM_CHECK_NAME_CONSTRAINTS = 0x00000040,
  112. CAPICOM_CHECK_BASIC_CONSTRAINTS = 0x00000080,
  113. CAPICOM_CHECK_NESTED_VALIDITY_PERIOD = 0x00000100,
  114. CAPICOM_CHECK_ONLINE_ALL = 0x000001EF,
  115. CAPICOM_CHECK_OFFLINE_ALL = 0x000001F7,
  116. } CAPICOM_CHECK_FLAG;
  117. //
  118. // The upper 16 bits are used for additional flags.
  119. //
  120. cpp_quote("#define CAPICOM_CHECK_FLAG_LO_MASK 0x0000ffff")
  121. cpp_quote("#define CAPICOM_CHECK_FLAG_HI_MASK 0xffff0000")
  122. cpp_quote("#define CAPICOM_CHECK_APPLICATION_USAGE 0x00010000")
  123. cpp_quote("#define CAPICOM_CHECK_CERTIFICATE_POLICY 0x00020000")
  124. cpp_quote("#define CAPICOM_CHECK_REVOCATION_END_CERT_ONLY 0x00040000")
  125. cpp_quote("#define CAPICOM_CHECK_REVOCATION_ENTIRE_CHAIN 0x00080000")
  126. typedef enum CAPICOM_CERT_INFO_TYPE
  127. {
  128. CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0,
  129. CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1,
  130. CAPICOM_CERT_INFO_SUBJECT_EMAIL_NAME = 2,
  131. CAPICOM_CERT_INFO_ISSUER_EMAIL_NAME = 3,
  132. // v2.0
  133. CAPICOM_CERT_INFO_SUBJECT_UPN = 4,
  134. CAPICOM_CERT_INFO_ISSUER_UPN = 5,
  135. CAPICOM_CERT_INFO_SUBJECT_DNS_NAME = 6,
  136. CAPICOM_CERT_INFO_ISSUER_DNS_NAME = 7,
  137. //CAPICOM_CERT_INFO_SUBJECT_IP_ADDRESS = 8,
  138. //CAPICOM_CERT_INFO_ISSUER_IP_ADDRESS = 9,
  139. } CAPICOM_CERT_INFO_TYPE;
  140. typedef enum CAPICOM_STORE_LOCATION
  141. {
  142. CAPICOM_MEMORY_STORE = 0,
  143. CAPICOM_LOCAL_MACHINE_STORE = 1,
  144. CAPICOM_CURRENT_USER_STORE = 2,
  145. CAPICOM_ACTIVE_DIRECTORY_USER_STORE = 3,
  146. // v2.0
  147. CAPICOM_SMART_CARD_USER_STORE = 4,
  148. } CAPICOM_STORE_LOCATION;
  149. typedef enum CAPICOM_STORE_OPEN_MODE
  150. {
  151. CAPICOM_STORE_OPEN_READ_ONLY = 0,
  152. CAPICOM_STORE_OPEN_READ_WRITE = 1,
  153. CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2,
  154. // v2.0
  155. CAPICOM_STORE_OPEN_EXISTING_ONLY = 128,
  156. CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = 256,
  157. } CAPICOM_STORE_OPEN_MODE;
  158. typedef enum CAPICOM_ACTIVE_DIRECTORY_SEARCH_LOCATION
  159. {
  160. CAPICOM_SEARCH_ANY = 0,
  161. CAPICOM_SEARCH_GLOBAL_CATALOG = 1,
  162. CAPICOM_SEARCH_DEFAULT_DOMAIN = 2,
  163. } CAPICOM_ACTIVE_DIRECTORY_SEARCH_LOCATION;
  164. typedef enum CAPICOM_STORE_SAVE_AS_TYPE
  165. {
  166. CAPICOM_STORE_SAVE_AS_SERIALIZED = 0,
  167. CAPICOM_STORE_SAVE_AS_PKCS7 = 1,
  168. } CAPICOM_STORE_SAVE_AS_TYPE;
  169. typedef enum CAPICOM_ATTRIBUTE
  170. {
  171. CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0,
  172. CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1,
  173. CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2,
  174. } CAPICOM_ATTRIBUTE;
  175. typedef enum CAPICOM_SIGNED_DATA_VERIFY_FLAG
  176. {
  177. CAPICOM_VERIFY_SIGNATURE_ONLY = 0,
  178. CAPICOM_VERIFY_SIGNATURE_AND_CERTIFICATE = 1,
  179. } CAPICOM_SIGNED_DATA_VERIFY_FLAG;
  180. typedef enum CAPICOM_ENCRYPTION_ALGORITHM
  181. {
  182. CAPICOM_ENCRYPTION_ALGORITHM_RC2 = 0,
  183. CAPICOM_ENCRYPTION_ALGORITHM_RC4 = 1,
  184. CAPICOM_ENCRYPTION_ALGORITHM_DES = 2,
  185. CAPICOM_ENCRYPTION_ALGORITHM_3DES = 3,
  186. // v2.0
  187. CAPICOM_ENCRYPTION_ALGORITHM_AES = 4,
  188. } CAPICOM_ENCRYPTION_ALGORITHM;
  189. typedef enum CAPICOM_ENCRYPTION_KEY_LENGTH
  190. {
  191. CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM = 0,
  192. CAPICOM_ENCRYPTION_KEY_LENGTH_40_BITS = 1,
  193. CAPICOM_ENCRYPTION_KEY_LENGTH_56_BITS = 2,
  194. CAPICOM_ENCRYPTION_KEY_LENGTH_128_BITS = 3,
  195. // v2.0 (AES only)
  196. CAPICOM_ENCRYPTION_KEY_LENGTH_192_BITS = 4,
  197. CAPICOM_ENCRYPTION_KEY_LENGTH_256_BITS = 5,
  198. } CAPICOM_ENCRYPTION_KEY_LENGTH;
  199. typedef enum CAPICOM_SECRET_TYPE
  200. {
  201. CAPICOM_SECRET_PASSWORD = 0,
  202. } CAPICOM_SECRET_TYPE;
  203. typedef enum CAPICOM_KEY_ALGORITHM
  204. {
  205. CAPICOM_KEY_ALGORITHM_OTHER = 0,
  206. CAPICOM_KEY_ALGORITHM_RSA = 1,
  207. CAPICOM_KEY_ALGORITHM_DSS = 2,
  208. } CAPICOM_KEY_ALGORITHM;
  209. ////////////////////////////////////////////////////////////////////////////
  210. //
  211. // CAPICOM v2.0
  212. //
  213. typedef enum CAPICOM_OID
  214. {
  215. CAPICOM_OID_OTHER = 0,
  216. // id-ce
  217. CAPICOM_OID_AUTHORITY_KEY_IDENTIFIER_EXTENSION = 1,
  218. CAPICOM_OID_KEY_ATTRIBUTES_EXTENSION = 2,
  219. CAPICOM_OID_CERT_POLICIES_95_EXTENSION = 3,
  220. CAPICOM_OID_KEY_USAGE_RESTRICTION_EXTENSION = 4,
  221. CAPICOM_OID_LEGACY_POLICY_MAPPINGS_EXTENSION = 5,
  222. CAPICOM_OID_SUBJECT_ALT_NAME_EXTENSION = 6,
  223. CAPICOM_OID_ISSUER_ALT_NAME_EXTENSION = 7,
  224. CAPICOM_OID_BASIC_CONSTRAINTS_EXTENSION = 8,
  225. CAPICOM_OID_SUBJECT_KEY_IDENTIFIER_EXTENSION = 9,
  226. CAPICOM_OID_KEY_USAGE_EXTENSION = 10,
  227. CAPICOM_OID_PRIVATEKEY_USAGE_PERIOD_EXTENSION = 11,
  228. CAPICOM_OID_SUBJECT_ALT_NAME2_EXTENSION = 12,
  229. CAPICOM_OID_ISSUER_ALT_NAME2_EXTENSION = 13,
  230. CAPICOM_OID_BASIC_CONSTRAINTS2_EXTENSION = 14,
  231. CAPICOM_OID_NAME_CONSTRAINTS_EXTENSION = 15,
  232. CAPICOM_OID_CRL_DIST_POINTS_EXTENSION = 16,
  233. CAPICOM_OID_CERT_POLICIES_EXTENSION = 17,
  234. CAPICOM_OID_POLICY_MAPPINGS_EXTENSION = 18,
  235. CAPICOM_OID_AUTHORITY_KEY_IDENTIFIER2_EXTENSION = 19,
  236. CAPICOM_OID_POLICY_CONSTRAINTS_EXTENSION = 20,
  237. CAPICOM_OID_ENHANCED_KEY_USAGE_EXTENSION = 21,
  238. CAPICOM_OID_CERTIFICATE_TEMPLATE_EXTENSION = 22,
  239. CAPICOM_OID_APPLICATION_CERT_POLICIES_EXTENSION = 23,
  240. CAPICOM_OID_APPLICATION_POLICY_MAPPINGS_EXTENSION = 24,
  241. CAPICOM_OID_APPLICATION_POLICY_CONSTRAINTS_EXTENSION = 25,
  242. // id-pe
  243. CAPICOM_OID_AUTHORITY_INFO_ACCESS_EXTENSION = 26,
  244. // eku
  245. CAPICOM_OID_SERVER_AUTH_EKU = 100,
  246. CAPICOM_OID_CLIENT_AUTH_EKU = 101,
  247. CAPICOM_OID_CODE_SIGNING_EKU = 102,
  248. CAPICOM_OID_EMAIL_PROTECTION_EKU = 103,
  249. CAPICOM_OID_IPSEC_END_SYSTEM_EKU = 104,
  250. CAPICOM_OID_IPSEC_TUNNEL_EKU = 105,
  251. CAPICOM_OID_IPSEC_USER_EKU = 106,
  252. CAPICOM_OID_TIME_STAMPING_EKU = 107,
  253. CAPICOM_OID_CTL_USAGE_SIGNING_EKU = 108,
  254. CAPICOM_OID_TIME_STAMP_SIGNING_EKU = 109,
  255. CAPICOM_OID_SERVER_GATED_CRYPTO_EKU = 110,
  256. CAPICOM_OID_ENCRYPTING_FILE_SYSTEM_EKU = 111,
  257. CAPICOM_OID_EFS_RECOVERY_EKU = 112,
  258. CAPICOM_OID_WHQL_CRYPTO_EKU = 113,
  259. CAPICOM_OID_NT5_CRYPTO_EKU = 114,
  260. CAPICOM_OID_OEM_WHQL_CRYPTO_EKU = 115,
  261. CAPICOM_OID_EMBEDED_NT_CRYPTO_EKU = 116,
  262. CAPICOM_OID_ROOT_LIST_SIGNER_EKU = 117,
  263. CAPICOM_OID_QUALIFIED_SUBORDINATION_EKU = 118,
  264. CAPICOM_OID_KEY_RECOVERY_EKU = 119,
  265. CAPICOM_OID_DIGITAL_RIGHTS_EKU = 120,
  266. CAPICOM_OID_LICENSES_EKU = 121,
  267. CAPICOM_OID_LICENSE_SERVER_EKU = 122,
  268. CAPICOM_OID_SMART_CARD_LOGON_EKU = 123,
  269. // Policy Qualifier
  270. CAPICOM_OID_PKIX_POLICY_QUALIFIER_CPS = 124,
  271. CAPICOM_OID_PKIX_POLICY_QUALIFIER_USERNOTICE = 125,
  272. } CAPICOM_OID;
  273. typedef enum CAPICOM_PROPID
  274. {
  275. CAPICOM_PROPID_UNKNOWN = 0,
  276. CAPICOM_PROPID_KEY_PROV_HANDLE = 1,
  277. CAPICOM_PROPID_KEY_PROV_INFO = 2,
  278. CAPICOM_PROPID_SHA1_HASH = 3,
  279. CAPICOM_PROPID_HASH_PROP = 3,
  280. CAPICOM_PROPID_MD5_HASH = 4,
  281. CAPICOM_PROPID_KEY_CONTEXT = 5,
  282. CAPICOM_PROPID_KEY_SPEC = 6,
  283. CAPICOM_PROPID_IE30_RESERVED = 7,
  284. CAPICOM_PROPID_PUBKEY_HASH_RESERVED = 8,
  285. CAPICOM_PROPID_ENHKEY_USAGE = 9,
  286. CAPICOM_PROPID_CTL_USAGE = 9,
  287. CAPICOM_PROPID_NEXT_UPDATE_LOCATION = 10,
  288. CAPICOM_PROPID_FRIENDLY_NAME = 11,
  289. CAPICOM_PROPID_PVK_FILE = 12,
  290. CAPICOM_PROPID_DESCRIPTION = 13,
  291. CAPICOM_PROPID_ACCESS_STATE = 14,
  292. CAPICOM_PROPID_SIGNATURE_HASH = 15,
  293. CAPICOM_PROPID_SMART_CARD_DATA = 16,
  294. CAPICOM_PROPID_EFS = 17,
  295. CAPICOM_PROPID_FORTEZZA_DATA = 18,
  296. CAPICOM_PROPID_ARCHIVED = 19,
  297. CAPICOM_PROPID_KEY_IDENTIFIER = 20,
  298. CAPICOM_PROPID_AUTO_ENROLL = 21,
  299. CAPICOM_PROPID_PUBKEY_ALG_PARA = 22,
  300. CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = 23,
  301. CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = 24,
  302. CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = 25,
  303. CAPICOM_PROPID_ENROLLMENT = 26,
  304. CAPICOM_PROPID_DATE_STAMP = 27,
  305. CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = 28,
  306. CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = 29,
  307. CAPICOM_PROPID_EXTENDED_ERROR_INFO = 30,
  308. // Note, 32 - 35 are reserved for the CERT, CRL 32 - 35 are reserved for the CERT, CRL, CTL and
  309. // 36 - 63 are reserved for future elemen 36 - 63 are reserved for future element IDs.
  310. CAPICOM_PROPID_RENEWAL = 64,
  311. CAPICOM_PROPID_ARCHIVED_KEY_HASH = 65,
  312. CAPICOM_PROPID_FIRST_RESERVED = 66,
  313. CAPICOM_PROPID_LAST_RESERVED = 0x00007FFF,
  314. CAPICOM_PROPID_FIRST_USER = 0x00008000,
  315. CAPICOM_PROPID_LAST_USER = 0x0000FFFF,
  316. } CAPICOM_PROPID;
  317. //
  318. // Provider type.
  319. //
  320. typedef enum CAPICOM_PROV_TYPE
  321. {
  322. CAPICOM_PROV_RSA_FULL = 1,
  323. CAPICOM_PROV_RSA_SIG = 2,
  324. CAPICOM_PROV_DSS = 3,
  325. CAPICOM_PROV_FORTEZZA = 4,
  326. CAPICOM_PROV_MS_EXCHANGE = 5,
  327. CAPICOM_PROV_SSL = 6,
  328. CAPICOM_PROV_RSA_SCHANNEL = 12,
  329. CAPICOM_PROV_DSS_DH = 13,
  330. CAPICOM_PROV_EC_ECDSA_SIG = 14,
  331. CAPICOM_PROV_EC_ECNRA_SIG = 15,
  332. CAPICOM_PROV_EC_ECDSA_FULL = 16,
  333. CAPICOM_PROV_EC_ECNRA_FULL = 17,
  334. CAPICOM_PROV_DH_SCHANNEL = 18,
  335. CAPICOM_PROV_SPYRUS_LYNKS = 20,
  336. CAPICOM_PROV_RNG = 21,
  337. CAPICOM_PROV_INTEL_SEC = 22,
  338. CAPICOM_PROV_REPLACE_OWF = 23,
  339. CAPICOM_PROV_RSA_AES = 24,
  340. } CAPICOM_PROV_TYPE;
  341. //
  342. // Certificate save as type.
  343. //
  344. typedef enum CAPICOM_CERTIFICATE_SAVE_AS_TYPE
  345. {
  346. CAPICOM_CERTIFICATE_SAVE_AS_PFX = 0,
  347. CAPICOM_CERTIFICATE_SAVE_AS_CER = 1,
  348. } CAPICOM_CERTIFICATE_SAVE_AS_TYPE;
  349. typedef enum CAPICOM_CERTIFICATES_SAVE_AS_TYPE
  350. {
  351. CAPICOM_CERTIFICATES_SAVE_AS_SERIALIZED = 0,
  352. CAPICOM_CERTIFICATES_SAVE_AS_PKCS7 = 1,
  353. CAPICOM_CERTIFICATES_SAVE_AS_PFX = 2,
  354. } CAPICOM_CERTIFICATES_SAVE_AS_TYPE;
  355. //
  356. // Signer options.
  357. //
  358. typedef enum CAPICOM_CERTIFICATE_INCLUDE_OPTION
  359. {
  360. CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0,
  361. CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1,
  362. CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2,
  363. } CAPICOM_CERTIFICATE_INCLUDE_OPTION;
  364. //
  365. // Key spec.
  366. //
  367. typedef enum CAPICOM_KEY_SPEC
  368. {
  369. CAPICOM_KEY_SPEC_KEYEXCHANGE = 1,
  370. CAPICOM_KEY_SPEC_SIGNATURE = 2,
  371. } CAPICOM_KEY_SPEC;
  372. //
  373. // Key storage location.
  374. //
  375. typedef enum CAPICOM_KEY_LOCATION
  376. {
  377. CAPICOM_CURRENT_USER_KEY = 0,
  378. CAPICOM_LOCAL_MACHINE_KEY = 1,
  379. } CAPICOM_KEY_LOCATION;
  380. //
  381. // Key storage flag.
  382. //
  383. typedef enum CAPICOM_KEY_STORAGE_FLAG
  384. {
  385. CAPICOM_KEY_STORAGE_DEFAULT = 0,
  386. CAPICOM_KEY_STORAGE_EXPORTABLE = 1,
  387. CAPICOM_KEY_STORAGE_USER_PROTECTED = 2,
  388. } CAPICOM_KEY_STORAGE_FLAG;
  389. //
  390. // PFX export flag.
  391. //
  392. typedef enum CAPICOM_EXPORT_FLAG
  393. {
  394. CAPICOM_EXPORT_DEFAULT = 0,
  395. CAPICOM_EXPORT_IGNORE_PRIVATE_KEY_NOT_EXPORTABLE_ERROR = 1,
  396. } CAPICOM_EXPORT_FLAG;
  397. //
  398. // Key usage bit values.
  399. //
  400. typedef enum CAPICOM_KEY_USAGE
  401. {
  402. CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 0x00000080,
  403. CAPICOM_NON_REPUDIATION_KEY_USAGE = 0x00000040,
  404. CAPICOM_KEY_ENCIPHERMENT_KEY_USAGE = 0x00000020,
  405. CAPICOM_DATA_ENCIPHERMENT_KEY_USAGE = 0x00000010,
  406. CAPICOM_KEY_AGREEMENT_KEY_USAGE = 0x00000008,
  407. CAPICOM_KEY_CERT_SIGN_KEY_USAGE = 0x00000004,
  408. CAPICOM_OFFLINE_CRL_SIGN_KEY_USAGE = 0x00000002,
  409. CAPICOM_CRL_SIGN_KEY_USAGE = 0x00000002,
  410. CAPICOM_ENCIPHER_ONLY_KEY_USAGE = 0x00000001,
  411. CAPICOM_DECIPHER_ONLY_KEY_USAGE = 0x00008000,
  412. } CAPICOM_KEY_USAGE;
  413. //
  414. // Find type.
  415. //
  416. typedef enum CAPICOM_CERTIFICATE_FIND_TYPE
  417. {
  418. CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0,
  419. CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1,
  420. CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2,
  421. CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3,
  422. CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4,
  423. CAPICOM_CERTIFICATE_FIND_EXTENSION = 5,
  424. CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6,
  425. CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7,
  426. CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8,
  427. CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9,
  428. CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10,
  429. CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11,
  430. CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12,
  431. } CAPICOM_CERTIFICATE_FIND_TYPE;
  432. #if (0)
  433. //
  434. // Pre-defined policy for CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY.
  435. //
  436. typedef enum CAPICOM_CERTIFICATE_FIND_PREDEFINED_POLICY
  437. {
  438. CAPICOM_CERTIFICATE_FIND_DATA_SIGNINING_POLICY = 0,
  439. CAPICOM_CERTIFICATE_FIND_AUTHENTICODE_POLICY = 1,
  440. CAPICOM_CERTIFICATE_FIND_SECURE_EMAIL_POLICY = 2,
  441. CAPICOM_CERTIFICATE_FIND_CLIENT_AUTHENTICATION_POLICY = 3,
  442. CAPICOM_CERTIFICATE_FIND_SERVER_AUTHENTICATION_POLICY = 4,
  443. CAPICOM_CERTIFICATE_FIND_SMARTCARD_LOGON_POLICY = 5,
  444. CAPICOM_CERTIFICATE_FIND_WIRELESS_POLICY = 6,
  445. } CAPICOM_CERTIFICATE_FIND_PREDEFINED_POLICY;
  446. #endif
  447. //
  448. // Hashing algorithm.
  449. //
  450. typedef enum CAPICOM_HASH_ALGORITHM
  451. {
  452. CAPICOM_HASH_ALGORITHM_SHA1 = 0,
  453. CAPICOM_HASH_ALGORITHM_MD2 = 1,
  454. CAPICOM_HASH_ALGORITHM_MD4 = 2,
  455. CAPICOM_HASH_ALGORITHM_MD5 = 3,
  456. // CAPICOM_HASH_ALGORITHM_SHA_256 = 4,
  457. // CAPICOM_HASH_ALGORITHM_SHA_384 = 5,
  458. // CAPICOM_HASH_ALGORITHM_SHA_512 = 6,
  459. } CAPICOM_HASH_ALGORITHM;
  460. //
  461. // Constants.
  462. //
  463. [dllname("CAPICOM")]
  464. module Constants
  465. {
  466. //
  467. // CAPICOM version.
  468. //
  469. const long CAPICOM_MAJOR_VERSION = 2;
  470. const long CAPICOM_MINOR_VERSION = 0;
  471. const LPSTR CAPICOM_VERSION_INFO = "CAPICOM v2.0";
  472. const LPSTR CAPICOM_COPY_RIGHT = "Copyright (c) Microsoft Corporation 1999-2002. All rights reserved.";
  473. //
  474. // System store names.
  475. //
  476. const LPSTR CAPICOM_MY_STORE = "My";
  477. const LPSTR CAPICOM_CA_STORE = "Ca";
  478. const LPSTR CAPICOM_ROOT_STORE = "Root";
  479. const LPSTR CAPICOM_OTHER_STORE = "AddressBook";
  480. //
  481. // Enhanced Key Usage OIDs (obselete, use the new constants below instead).
  482. //
  483. const LPSTR CAPICOM_OID_SERVER_AUTH = "1.3.6.1.5.5.7.3.1";
  484. const LPSTR CAPICOM_OID_CLIENT_AUTH = "1.3.6.1.5.5.7.3.2";
  485. const LPSTR CAPICOM_OID_CODE_SIGNING = "1.3.6.1.5.5.7.3.3";
  486. const LPSTR CAPICOM_OID_EMAIL_PROTECTION = "1.3.6.1.5.5.7.3.4";
  487. const LPSTR CAPICOM_OID_IPSEC_END_SYSTEM = "1.3.6.1.5.5.7.3.5";
  488. const LPSTR CAPICOM_OID_IPSEC_TUNNEL = "1.3.6.1.5.5.7.3.6";
  489. const LPSTR CAPICOM_OID_IPSEC_USER = "1.3.6.1.5.5.7.3.7";
  490. const LPSTR CAPICOM_OID_TIME_STAMPING = "1.3.6.1.5.5.7.3.8";
  491. const LPSTR CAPICOM_OID_CTL_USAGE_SIGNING = "1.3.6.1.4.1.311.10.3.1";
  492. const LPSTR CAPICOM_OID_TIME_STAMP_SIGNING = "1.3.6.1.4.1.311.10.3.2";
  493. const LPSTR CAPICOM_OID_SERVER_GATED_CRYPTO = "1.3.6.1.4.1.311.10.3.3";
  494. const LPSTR CAPICOM_OID_ENCRYPTING_FILE_SYSTEM = "1.3.6.1.4.1.311.10.3.4";
  495. const LPSTR CAPICOM_OID_EFS_RECOVERY = "1.3.6.1.4.1.311.10.3.4.1";
  496. const LPSTR CAPICOM_OID_WHQL_CRYPTO = "1.3.6.1.4.1.311.10.3.5";
  497. const LPSTR CAPICOM_OID_NT5_CRYPTO = "1.3.6.1.4.1.311.10.3.6";
  498. const LPSTR CAPICOM_OID_OEM_WHQL_CRYPTO = "1.3.6.1.4.1.311.10.3.7";
  499. const LPSTR CAPICOM_OID_EMBEDED_NT_CRYPTO = "1.3.6.1.4.1.311.10.3.8";
  500. const LPSTR CAPICOM_OID_ROOT_LIST_SIGNER = "1.3.6.1.4.1.311.10.3.9";
  501. const LPSTR CAPICOM_OID_QUALIFIED_SUBORDINATION = "1.3.6.1.4.1.311.10.3.10";
  502. const LPSTR CAPICOM_OID_KEY_RECOVERY = "1.3.6.1.4.1.311.10.3.11";
  503. const LPSTR CAPICOM_OID_DIGITAL_RIGHTS = "1.3.6.1.4.1.311.10.5.1";
  504. const LPSTR CAPICOM_OID_LICENSES = "1.3.6.1.4.1.311.10.6.1";
  505. const LPSTR CAPICOM_OID_LICENSE_SERVER = "1.3.6.1.4.1.311.10.6.2";
  506. const LPSTR CAPICOM_OID_SMART_CARD_LOGON = "1.3.6.1.4.1.311.20.2.2";
  507. //
  508. // New usage OIDs.
  509. //
  510. const LPSTR CAPICOM_SERVER_AUTH_OID = "1.3.6.1.5.5.7.3.1";
  511. const LPSTR CAPICOM_CLIENT_AUTH_OID = "1.3.6.1.5.5.7.3.2";
  512. const LPSTR CAPICOM_CODE_SIGNING_OID = "1.3.6.1.5.5.7.3.3";
  513. const LPSTR CAPICOM_EMAIL_PROTECTION_OID = "1.3.6.1.5.5.7.3.4";
  514. const LPSTR CAPICOM_IPSEC_END_SYSTEM_OID = "1.3.6.1.5.5.7.3.5";
  515. const LPSTR CAPICOM_IPSEC_TUNNEL_OID = "1.3.6.1.5.5.7.3.6";
  516. const LPSTR CAPICOM_IPSEC_USER_OID = "1.3.6.1.5.5.7.3.7";
  517. const LPSTR CAPICOM_TIME_STAMPING_OID = "1.3.6.1.5.5.7.3.8";
  518. const LPSTR CAPICOM_CTL_USAGE_SIGNING_OID = "1.3.6.1.4.1.311.10.3.1";
  519. const LPSTR CAPICOM_TIME_STAMP_SIGNING_OID = "1.3.6.1.4.1.311.10.3.2";
  520. const LPSTR CAPICOM_SERVER_GATED_CRYPTO_OID = "1.3.6.1.4.1.311.10.3.3";
  521. const LPSTR CAPICOM_ENCRYPTING_FILE_SYSTEM_OID = "1.3.6.1.4.1.311.10.3.4";
  522. const LPSTR CAPICOM_EFS_RECOVERY_OID = "1.3.6.1.4.1.311.10.3.4.1";
  523. const LPSTR CAPICOM_WHQL_CRYPTO_OID = "1.3.6.1.4.1.311.10.3.5";
  524. const LPSTR CAPICOM_NT5_CRYPTO_OID = "1.3.6.1.4.1.311.10.3.6";
  525. const LPSTR CAPICOM_OEM_WHQL_CRYPTO_OID = "1.3.6.1.4.1.311.10.3.7";
  526. const LPSTR CAPICOM_EMBEDED_NT_CRYPTO_OID = "1.3.6.1.4.1.311.10.3.8";
  527. const LPSTR CAPICOM_ROOT_LIST_SIGNER_OID = "1.3.6.1.4.1.311.10.3.9";
  528. const LPSTR CAPICOM_QUALIFIED_SUBORDINATION_OID = "1.3.6.1.4.1.311.10.3.10";
  529. const LPSTR CAPICOM_KEY_RECOVERY_OID = "1.3.6.1.4.1.311.10.3.11";
  530. const LPSTR CAPICOM_DIGITAL_RIGHTS_OID = "1.3.6.1.4.1.311.10.5.1";
  531. const LPSTR CAPICOM_LICENSES_OID = "1.3.6.1.4.1.311.10.6.1";
  532. const LPSTR CAPICOM_LICENSE_SERVER_OID = "1.3.6.1.4.1.311.10.6.2";
  533. const LPSTR CAPICOM_SMART_CARD_LOGON_OID = "1.3.6.1.4.1.311.20.2.2";
  534. const LPSTR CAPICOM_ANY_APPLICATION_POLICY_OID = "1.3.6.1.4.1.311.10.12.1";
  535. const LPSTR CAPICOM_ANY_CERT_POLICY_OID = "2.5.29.32.0";
  536. //
  537. // Extension OIDs.
  538. //
  539. const LPSTR CAPICOM_AUTHORITY_KEY_IDENTIFIER_OID = "2.5.29.1";
  540. const LPSTR CAPICOM_KEY_ATTRIBUTES_OID = "2.5.29.2";
  541. const LPSTR CAPICOM_CERT_POLICIES_95_OID = "2.5.29.3";
  542. const LPSTR CAPICOM_KEY_USAGE_RESTRICTION_OID = "2.5.29.4";
  543. const LPSTR CAPICOM_LEGACY_POLICY_MAPPINGS_OID = "2.5.29.5";
  544. const LPSTR CAPICOM_SUBJECT_ALT_NAME_OID = "2.5.29.7";
  545. const LPSTR CAPICOM_ISSUER_ALT_NAME_OID = "2.5.29.8";
  546. const LPSTR CAPICOM_BASIC_CONSTRAINTS_OID = "2.5.29.10";
  547. const LPSTR CAPICOM_SUBJECT_KEY_IDENTIFIER_OID = "2.5.29.14";
  548. const LPSTR CAPICOM_KEY_USAGE_OID = "2.5.29.15";
  549. const LPSTR CAPICOM_PRIVATEKEY_USAGE_PERIOD_OID = "2.5.29.16";
  550. const LPSTR CAPICOM_SUBJECT_ALT_NAME2_OID = "2.5.29.17";
  551. const LPSTR CAPICOM_ISSUER_ALT_NAME2_OID = "2.5.29.18";
  552. const LPSTR CAPICOM_BASIC_CONSTRAINTS2_OID = "2.5.29.19";
  553. const LPSTR CAPICOM_NAME_CONSTRAINTS_OID = "2.5.29.30";
  554. const LPSTR CAPICOM_CRL_DIST_POINTS_OID = "2.5.29.31";
  555. const LPSTR CAPICOM_CERT_POLICIES_OID = "2.5.29.32";
  556. const LPSTR CAPICOM_POLICY_MAPPINGS_OID = "2.5.29.33";
  557. const LPSTR CAPICOM_AUTHORITY_KEY_IDENTIFIER2_OID = "2.5.29.35";
  558. const LPSTR CAPICOM_POLICY_CONSTRAINTS_OID = "2.5.29.36";
  559. const LPSTR CAPICOM_ENHANCED_KEY_USAGE_OID = "2.5.29.37";
  560. const LPSTR CAPICOM_CERTIFICATE_TEMPLATE_OID = "1.3.6.1.4.1.311.21.7";
  561. const LPSTR CAPICOM_APPLICATION_CERT_POLICIES_OID = "1.3.6.1.4.1.311.21.10";
  562. const LPSTR CAPICOM_APPLICATION_POLICY_MAPPINGS_OID = "1.3.6.1.4.1.311.21.11";
  563. const LPSTR CAPICOM_APPLICATION_POLICY_CONSTRAINTS_OID = "1.3.6.1.4.1.311.21.12";
  564. const LPSTR CAPICOM_AUTHORITY_INFO_ACCESS_OID = "1.3.6.1.5.5.7.1.1";
  565. const LPSTR CAPICOM_PKIX_POLICY_QUALIFIER_CPS_OID = "1.3.6.1.5.5.7.2.1";
  566. const LPSTR CAPICOM_PKIX_POLICY_QUALIFIER_USERNOTICE_OID = "1.3.6.1.5.5.7.2.2";
  567. //
  568. // Chain status.
  569. //
  570. const long CAPICOM_TRUST_IS_NOT_TIME_VALID = 0x00000001;
  571. const long CAPICOM_TRUST_IS_NOT_TIME_NESTED = 0x00000002;
  572. const long CAPICOM_TRUST_IS_REVOKED = 0x00000004;
  573. const long CAPICOM_TRUST_IS_NOT_SIGNATURE_VALID = 0x00000008;
  574. const long CAPICOM_TRUST_IS_NOT_VALID_FOR_USAGE = 0x00000010;
  575. const long CAPICOM_TRUST_IS_UNTRUSTED_ROOT = 0x00000020;
  576. const long CAPICOM_TRUST_REVOCATION_STATUS_UNKNOWN = 0x00000040;
  577. const long CAPICOM_TRUST_IS_CYCLIC = 0x00000080;
  578. const long CAPICOM_TRUST_INVALID_EXTENSION = 0x00000100;
  579. const long CAPICOM_TRUST_INVALID_POLICY_CONSTRAINTS = 0x00000200;
  580. const long CAPICOM_TRUST_INVALID_BASIC_CONSTRAINTS = 0x00000400;
  581. const long CAPICOM_TRUST_INVALID_NAME_CONSTRAINTS = 0x00000800;
  582. const long CAPICOM_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 0x00001000;
  583. const long CAPICOM_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT = 0x00002000;
  584. const long CAPICOM_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 0x00004000;
  585. const long CAPICOM_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT = 0x00008000;
  586. const long CAPICOM_TRUST_IS_OFFLINE_REVOCATION = 0x01000000;
  587. const long CAPICOM_TRUST_NO_ISSUANCE_CHAIN_POLICY = 0x02000000;
  588. const long CAPICOM_TRUST_IS_PARTIAL_CHAIN = 0x00010000;
  589. const long CAPICOM_TRUST_CTL_IS_NOT_TIME_VALID = 0x00020000;
  590. const long CAPICOM_TRUST_CTL_IS_NOT_SIGNATURE_VALID = 0x00040000;
  591. const long CAPICOM_TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 0x00080000;
  592. //
  593. // CSP providers.
  594. //
  595. const LPSTR CAPICOM_PROV_MS_DEF_PROV = "Microsoft Base Cryptographic Provider v1.0";
  596. const LPSTR CAPICOM_PROV_MS_ENHANCED_PROV = "Microsoft Enhanced Cryptographic Provider v1.0";
  597. const LPSTR CAPICOM_PROV_MS_STRONG_PROV = "Microsoft Strong Cryptographic Provider";
  598. const LPSTR CAPICOM_PROV_MS_DEF_RSA_SIG_PROV = "Microsoft RSA Signature Cryptographic Provider";
  599. const LPSTR CAPICOM_PROV_MS_DEF_RSA_SCHANNEL_PROV = "Microsoft RSA SChannel Cryptographic Provider";
  600. const LPSTR CAPICOM_PROV_MS_DEF_DSS_PROV = "Microsoft Base DSS Cryptographic Provider";
  601. const LPSTR CAPICOM_PROV_MS_DEF_DSS_DH_PROV = "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider";
  602. const LPSTR CAPICOM_PROV_MS_ENH_DSS_DH_PROV = "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider";
  603. const LPSTR CAPICOM_PROV_MS_DEF_DH_SCHANNEL_PROV = "Microsoft DH SChannel Cryptographic Provider";
  604. const LPSTR CAPICOM_PROV_MS_SCARD_PROV = "Microsoft Base Smart Card Crypto Provider";
  605. const LPSTR CAPICOM_PROV_MS_ENH_RSA_AES_PROV = "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)";
  606. };
  607. ////////////////////////////////////////////////////////////////////////////////
  608. //
  609. // coclass
  610. //
  611. //
  612. // Settings
  613. //
  614. [
  615. uuid(A996E48C-D3DC-4244-89F7-AFA33EC60679),
  616. helpstring("Settings Class")
  617. ]
  618. coclass Settings
  619. {
  620. [default] interface ISettings;
  621. };
  622. //
  623. // EKU
  624. //
  625. [
  626. uuid(8535F9A1-738A-40D0-8FB1-10CC8F74E7D3),
  627. helpstring("EKU Class"),
  628. noncreatable
  629. ]
  630. coclass EKU
  631. {
  632. [default] interface IEKU;
  633. };
  634. //
  635. // EKUs
  636. //
  637. [
  638. uuid(F1800663-5BFC-4D1A-8D44-56CE02DDA34F),
  639. helpstring("EKUs Class"),
  640. noncreatable
  641. ]
  642. coclass EKUs
  643. {
  644. [default] interface IEKUs;
  645. };
  646. //
  647. // KeyUsage
  648. //
  649. [
  650. uuid(9226C95C-38BE-4CC4-B3A2-A867F5199C13),
  651. helpstring("KeyUsage Class"),
  652. noncreatable
  653. ]
  654. coclass KeyUsage
  655. {
  656. [default] interface IKeyUsage;
  657. };
  658. //
  659. // Extended key usage
  660. //
  661. [
  662. uuid(42C18607-1B4B-4126-8F1B-76E2DC7F631A),
  663. helpstring("ExtendedKeyUsage Class"),
  664. noncreatable
  665. ]
  666. coclass ExtendedKeyUsage
  667. {
  668. [default] interface IExtendedKeyUsage;
  669. };
  670. //
  671. // BasicConstraints
  672. [
  673. uuid(C05AAC6E-3A58-45A9-A203-56952E961E48),
  674. helpstring("BasicConstraints Class"),
  675. noncreatable
  676. ]
  677. coclass BasicConstraints
  678. {
  679. [default] interface IBasicConstraints;
  680. };
  681. //
  682. // CertificateStatus
  683. //
  684. [
  685. uuid(16951EE6-A455-47CA-A78B-F98DA566B604),
  686. helpstring("CertificateStatus Class"),
  687. noncreatable
  688. ]
  689. coclass CertificateStatus
  690. {
  691. [default] interface ICertificateStatus2;
  692. interface ICertificateStatus;
  693. };
  694. //
  695. // Certificate
  696. //
  697. [
  698. uuid(E38FD381-6404-4041-B5E9-B2739258941F),
  699. helpstring("Certificate Class")
  700. ]
  701. coclass Certificate
  702. {
  703. [default] interface ICertificate2;
  704. interface ICertificate;
  705. interface ICertContext;
  706. };
  707. //
  708. // Certificates
  709. //
  710. [
  711. uuid(FBAB033B-CDD0-4C5E-81AB-AEA575CD1338),
  712. helpstring("Certificates Class")
  713. ]
  714. coclass Certificates
  715. {
  716. [default] interface ICertificates2;
  717. interface ICertificates;
  718. interface ICCertificates;
  719. };
  720. //
  721. // Chain
  722. //
  723. [
  724. uuid(65104D73-BA60-4160-A95A-4B4782E7AA62),
  725. helpstring("Chain Class")
  726. ]
  727. coclass Chain
  728. {
  729. [default] interface IChain2;
  730. interface IChain;
  731. interface IChainContext;
  732. };
  733. //
  734. // Store
  735. //
  736. [
  737. uuid(78E61E52-0E57-4456-A2F2-517492BCBF8F),
  738. helpstring("Store Class")
  739. ]
  740. coclass Store
  741. {
  742. [default] interface IStore2;
  743. interface IStore;
  744. interface ICertStore;
  745. };
  746. //
  747. // Attribute
  748. //
  749. [
  750. uuid(54BA1E8F-818D-407F-949D-BAE1692C5C18),
  751. helpstring("Attribute Class")
  752. ]
  753. coclass Attribute
  754. {
  755. [default] interface IAttribute;
  756. };
  757. //
  758. // IAttributes
  759. //
  760. [
  761. uuid(933013A9-64C8-4485-ACEF-4908C3692A33),
  762. helpstring("Attributes Class"),
  763. noncreatable
  764. ]
  765. coclass Attributes
  766. {
  767. [default] interface IAttributes;
  768. };
  769. //
  770. // Signer
  771. //
  772. [
  773. uuid(60A9863A-11FD-4080-850E-A8E184FC3A3C),
  774. helpstring("Signer Class")
  775. ]
  776. coclass Signer
  777. {
  778. [default] interface ISigner2;
  779. interface ISigner;
  780. interface ICSigner;
  781. };
  782. //
  783. // Signers
  784. //
  785. [
  786. uuid(1314C1D8-D3A8-4F8A-BED0-811FD7A8A633),
  787. helpstring("Signers Class"),
  788. noncreatable
  789. ]
  790. coclass Signers
  791. {
  792. [default] interface ISigners;
  793. };
  794. //
  795. // SignedData
  796. //
  797. [
  798. uuid(94AFFFCC-6C05-4814-B123-A941105AA77F),
  799. helpstring("SignedData Class")
  800. ]
  801. coclass SignedData
  802. {
  803. [default] interface ISignedData;
  804. };
  805. //
  806. // Algorithm
  807. //
  808. [
  809. uuid(A1EEF42F-5026-4A32-BC5C-2E552B70FD96),
  810. helpstring("Algorithm Class"),
  811. noncreatable
  812. ]
  813. coclass Algorithm
  814. {
  815. [default] interface IAlgorithm;
  816. };
  817. //
  818. // Recipients
  819. //
  820. [
  821. uuid(96A1B8B0-8F9A-436A-84DE-E23CD6818DA5),
  822. helpstring("Recipients Class"),
  823. noncreatable
  824. ]
  825. coclass Recipients
  826. {
  827. [default] interface IRecipients;
  828. };
  829. //
  830. // EnvelopedData
  831. //
  832. [
  833. uuid(F3A12E08-EDE9-4160-8B51-334D982A9AD0),
  834. helpstring("EnvelopedData Class")
  835. ]
  836. coclass EnvelopedData
  837. {
  838. [default] interface IEnvelopedData;
  839. };
  840. //
  841. // EncryptedData
  842. //
  843. [
  844. uuid(A440BD76-CFE1-4D46-AB1F-15F238437A3D),
  845. helpstring("EncryptedData Class")
  846. ]
  847. coclass EncryptedData
  848. {
  849. [default] interface IEncryptedData;
  850. };
  851. ///////////////////////////////////////////////////////////////////////////
  852. //
  853. // CAPICOM v2.0
  854. //
  855. //
  856. // OID
  857. //
  858. [
  859. uuid(7BF3AC5C-CC84-429A-ACA5-74D916AD6B8C),
  860. helpstring("OID Class")
  861. ]
  862. coclass OID
  863. {
  864. [default] interface IOID;
  865. };
  866. //
  867. // OIDs
  868. //
  869. [
  870. uuid(FD661131-D716-4D15-A187-AEAAB161C8AD),
  871. helpstring("OIDs Class"),
  872. noncreatable
  873. ]
  874. coclass OIDs
  875. {
  876. [default] interface IOIDs;
  877. };
  878. //
  879. // NoticeNumbers
  880. //
  881. [
  882. uuid(A6FDF22A-8E00-464B-B15D-1A891D88B6ED),
  883. helpstring("NoticeNumbers Class"),
  884. noncreatable
  885. ]
  886. coclass NoticeNumbers
  887. {
  888. [default] interface INoticeNumbers;
  889. };
  890. //
  891. // Qualifier
  892. //
  893. [
  894. uuid(E5F29B74-0902-4654-8A9A-21C5201DFA61),
  895. helpstring("Qualifier Class"),
  896. noncreatable
  897. ]
  898. coclass Qualifier
  899. {
  900. [default] interface IQualifier;
  901. };
  902. //
  903. // Qualifiers
  904. //
  905. [
  906. uuid(6C8006C0-F649-4783-B4A6-617DD0B270C7),
  907. helpstring("Qualifiers Class"),
  908. noncreatable
  909. ]
  910. coclass Qualifiers
  911. {
  912. [default] interface IQualifiers;
  913. };
  914. //
  915. // PolicyInformation
  916. //
  917. [
  918. uuid(0AAF88F4-1C22-4F65-A0E3-289D97DCE994),
  919. helpstring("PolicyInformation Class"),
  920. noncreatable
  921. ]
  922. coclass PolicyInformation
  923. {
  924. [default] interface IPolicyInformation;
  925. };
  926. //
  927. // CertificatePolicies
  928. //
  929. [
  930. uuid(988583C2-00C7-4D22-9241-E810E35EED1B),
  931. helpstring("CertificatePolicies Class"),
  932. noncreatable
  933. ]
  934. coclass CertificatePolicies
  935. {
  936. [default] interface ICertificatePolicies;
  937. };
  938. //
  939. // EncodedData
  940. //
  941. [
  942. uuid(7083C0AA-E7B9-48A4-8EFB-D6A109EBEC13),
  943. helpstring("EncodedData Class"),
  944. noncreatable
  945. ]
  946. coclass EncodedData
  947. {
  948. [default] interface IEncodedData;
  949. };
  950. //
  951. // Extension
  952. //
  953. [
  954. uuid(D2359E2C-82D6-458F-BB6F-41559155E693),
  955. helpstring("Extension Class"),
  956. noncreatable
  957. ]
  958. coclass Extension
  959. {
  960. [default] interface IExtension;
  961. };
  962. //
  963. // Extensions
  964. //
  965. [
  966. uuid(7C92E131-C1DC-4CA1-B02C-F513A08B41ED),
  967. helpstring("Extensions Class"),
  968. noncreatable
  969. ]
  970. coclass Extensions
  971. {
  972. [default] interface IExtensions;
  973. };
  974. //
  975. // ExtendedProperty
  976. //
  977. [
  978. uuid(9E7EA907-5810-4FCA-B817-CD0BBA8496FC),
  979. helpstring("ExtendedProperty Class")
  980. ]
  981. coclass ExtendedProperty
  982. {
  983. [default] interface IExtendedProperty;
  984. };
  985. //
  986. // ExtendedProperties
  987. //
  988. [
  989. uuid(90E7143D-1A07-438D-8F85-3DBB0B73D314),
  990. helpstring("ExtendedProperties Class"),
  991. noncreatable
  992. ]
  993. coclass ExtendedProperties
  994. {
  995. [default] interface IExtendedProperties;
  996. };
  997. //
  998. // Template
  999. //
  1000. [
  1001. uuid(61F0D2BD-373E-4F3C-962E-59B7C42C1B22),
  1002. helpstring("Template Class"),
  1003. noncreatable
  1004. ]
  1005. coclass Template
  1006. {
  1007. [default] interface ITemplate;
  1008. };
  1009. //
  1010. // PublicKey
  1011. //
  1012. [
  1013. uuid(301FC658-4055-4D76-9703-AA38E6D7236A),
  1014. helpstring("PublicKey Class"),
  1015. noncreatable
  1016. ]
  1017. coclass PublicKey
  1018. {
  1019. [default] interface IPublicKey;
  1020. };
  1021. //
  1022. // PrivateKey
  1023. //
  1024. [
  1025. uuid(03ACC284-B757-4B8F-9951-86E600D2CD06),
  1026. helpstring("PrivateKey Class")
  1027. ]
  1028. coclass PrivateKey
  1029. {
  1030. [default] interface IPrivateKey;
  1031. interface ICPrivateKey;
  1032. };
  1033. //
  1034. // SignedCode
  1035. //
  1036. [
  1037. uuid(8C3E4934-9FA4-4693-9253-A29A05F99186),
  1038. helpstring("SignedCode Class")
  1039. ]
  1040. coclass SignedCode
  1041. {
  1042. [default] interface ISignedCode;
  1043. };
  1044. //
  1045. // HashedData
  1046. //
  1047. [
  1048. uuid(CE32ABF6-475D-41F6-BF82-D27F03E3D38B),
  1049. helpstring("HashedData Class")
  1050. ]
  1051. coclass HashedData
  1052. {
  1053. [default] interface IHashedData;
  1054. };
  1055. //
  1056. // Utilities
  1057. //
  1058. [
  1059. uuid(22A85CE1-F011-4231-B9E4-7E7A0438F71B),
  1060. helpstring("Utilities Class")
  1061. ]
  1062. coclass Utilities
  1063. {
  1064. [default] interface IUtilities;
  1065. };
  1066. };
  1067. ////////////////////////////////////////////////////////////////////////////////
  1068. //
  1069. // Interfaces
  1070. //
  1071. //
  1072. // Settings
  1073. //
  1074. [
  1075. object,
  1076. uuid(A24104F5-46D0-4C0F-926D-665565908E91),
  1077. dual,
  1078. helpstring("ISettings Interface"),
  1079. pointer_default(unique)
  1080. ]
  1081. interface ISettings : IDispatch
  1082. {
  1083. [propget, id(1), helpstring("Property to get the current setting to enable/disable dialog box to prompt for certificate used to sign/decrypt a message.")]
  1084. HRESULT EnablePromptForCertificateUI([out, retval] VARIANT_BOOL * pVal);
  1085. [propput, id(1), helpstring("Property to enable/disable dialog box to prompt for certificate used to sign/decrypt a message.")]
  1086. HRESULT EnablePromptForCertificateUI([in, defaultvalue(0)] VARIANT_BOOL newVal);
  1087. [propget, id(2), helpstring("Property to get the current Active Directory search location.")]
  1088. HRESULT ActiveDirectorySearchLocation([out, retval] CAPICOM_ACTIVE_DIRECTORY_SEARCH_LOCATION * pVal);
  1089. [propput, id(2), helpstring("Property to set the Active Directory search location. By default, search location is unspecified, in which case Global Catalog will be searched if the userCertificate attribute is published there, otherwise the default domain will be searched.")]
  1090. HRESULT ActiveDirectorySearchLocation([in, defaultvalue(CAPICOM_SEARCH_ANY)] CAPICOM_ACTIVE_DIRECTORY_SEARCH_LOCATION newVal);
  1091. };
  1092. //
  1093. // IEKU
  1094. //
  1095. [
  1096. object,
  1097. uuid(976B7E6D-1002-4051-BFD4-824A74BD74E2),
  1098. dual,
  1099. helpstring("IEKU Interface"),
  1100. pointer_default(unique)
  1101. ]
  1102. interface IEKU : IDispatch
  1103. {
  1104. [propget, id(0), helpstring("Default property to get EKU name.")]
  1105. HRESULT Name([out, retval] CAPICOM_EKU * pVal);
  1106. [propput, id(0), helpstring("Default property to set EKU name.")]
  1107. HRESULT Name([in] CAPICOM_EKU newVal);
  1108. [propget, id(1), helpstring("Property to get the actual EKU OID string as defined in WinCrypt.h.")]
  1109. HRESULT OID([out, retval] BSTR * pVal);
  1110. [propput, id(1), helpstring("Property to set the actual EKU OID string as defined in WinCrypt.h.")]
  1111. HRESULT OID([in] BSTR newVal);
  1112. };
  1113. //
  1114. // IEKUs
  1115. //
  1116. [
  1117. object,
  1118. uuid(47C87CEC-8C4B-4E3C-8D22-34280274EFD1),
  1119. dual,
  1120. helpstring("IEKUs Interface"),
  1121. pointer_default(unique)
  1122. ]
  1123. interface IEKUs : IDispatch
  1124. {
  1125. //
  1126. // Property
  1127. //
  1128. [propget, id(0), helpstring("Property Item.")]
  1129. HRESULT Item([in] long Index, [out, retval] VARIANT * pVal);
  1130. [propget, id(1), helpstring("Property Count.")]
  1131. HRESULT Count([out, retval] long * pVal);
  1132. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1133. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1134. };
  1135. //
  1136. // IKeyUsage
  1137. //
  1138. [
  1139. object,
  1140. uuid(41DD35A8-9FF9-45A6-9A7C-F65B2F085D1F),
  1141. dual,
  1142. helpstring("IKeyUsage Interface"),
  1143. pointer_default(unique)
  1144. ]
  1145. interface IKeyUsage : IDispatch
  1146. {
  1147. //
  1148. // Property
  1149. //
  1150. [propget, id(1), helpstring("Property to check if the KeyUsage extension is present.")]
  1151. HRESULT IsPresent([out, retval] VARIANT_BOOL * pVal);
  1152. [propget, id(2), helpstring("Property to check if the KeyUsage extension is marked critical.")]
  1153. HRESULT IsCritical([out, retval] VARIANT_BOOL * pVal);
  1154. [propget, id(3), helpstring("Property to check if the digitalSignature bit is set.")]
  1155. HRESULT IsDigitalSignatureEnabled([out, retval] VARIANT_BOOL * pVal);
  1156. [propget, id(4), helpstring("Property to check if the nonRepudiation bit is set.")]
  1157. HRESULT IsNonRepudiationEnabled([out, retval] VARIANT_BOOL *pVal);
  1158. [propget, id(5), helpstring("Property to check if the keyEncipherment bit is set.")]
  1159. HRESULT IsKeyEnciphermentEnabled([out, retval] VARIANT_BOOL * pVal);
  1160. [propget, id(6), helpstring("Property to check if the dataEncipherment bit is set.")]
  1161. HRESULT IsDataEnciphermentEnabled([out, retval] VARIANT_BOOL * pVal);
  1162. [propget, id(7), helpstring("Property to check if the keyAgreement bit is set.")]
  1163. HRESULT IsKeyAgreementEnabled([out, retval] VARIANT_BOOL * pVal);
  1164. [propget, id(8), helpstring("Property to check if the keyCertSign bit is set.")]
  1165. HRESULT IsKeyCertSignEnabled([out, retval] VARIANT_BOOL * pVal);
  1166. [propget, id(9), helpstring("Property to check if the cRLSign bit is set.")]
  1167. HRESULT IsCRLSignEnabled([out, retval] VARIANT_BOOL * pVal);
  1168. [propget, id(10), helpstring("Property to check if the encipherOnly bit is set.")]
  1169. HRESULT IsEncipherOnlyEnabled([out, retval] VARIANT_BOOL * pVal);
  1170. [propget, id(11), helpstring("Property to check if the decipherOnly bit is set.")]
  1171. HRESULT IsDecipherOnlyEnabled([out, retval] VARIANT_BOOL * pVal);
  1172. };
  1173. //
  1174. // IExtendedKeyUsage
  1175. //
  1176. [
  1177. object,
  1178. uuid(7289D408-987D-45D1-8DEE-CF9E91C2E90E),
  1179. dual,
  1180. helpstring("IExtendedKeyUsage Interface"),
  1181. pointer_default(unique)
  1182. ]
  1183. interface IExtendedKeyUsage : IDispatch
  1184. {
  1185. //
  1186. // Property
  1187. //
  1188. [propget, id(1), helpstring("Property to check if the EKU extension is present.")]
  1189. HRESULT IsPresent([out, retval] VARIANT_BOOL * pVal);
  1190. [propget, id(2), helpstring("Property to check if the EKU extension is marked critical.")]
  1191. HRESULT IsCritical([out, retval] VARIANT_BOOL * pVal);
  1192. [propget, id(3), helpstring("Property to return an EKUs collection object.")]
  1193. HRESULT EKUs([out, retval] IEKUs ** pVal);
  1194. };
  1195. //
  1196. // IBasicConstraints
  1197. //
  1198. [
  1199. object,
  1200. uuid(4E298C47-ABA6-459E-851B-993D6C626EAD),
  1201. dual,
  1202. helpstring("IBasicConstraints Interface"),
  1203. pointer_default(unique)
  1204. ]
  1205. interface IBasicConstraints : IDispatch
  1206. {
  1207. [propget, id(1), helpstring("Property to check if the BasicConstraints extension is present.")]
  1208. HRESULT IsPresent([out, retval] VARIANT_BOOL * pVal);
  1209. [propget, id(2), helpstring("Property to check if the BasicConstraints extension is marked critical.")]
  1210. HRESULT IsCritical([out, retval] VARIANT_BOOL * pVal);
  1211. [propget, id(3), helpstring("Property to check if it is a certificate authority.")]
  1212. HRESULT IsCertificateAuthority([out, retval] VARIANT_BOOL * pVal);
  1213. [propget, id(4), helpstring("Property to check if the path length constraint value is present.")]
  1214. HRESULT IsPathLenConstraintPresent([out, retval] VARIANT_BOOL * pVal);
  1215. [propget, id(5), helpstring("Property to get the path length constraint value.")]
  1216. HRESULT PathLenConstraint([out, retval] long * pVal);
  1217. };
  1218. //
  1219. // ICertificateStatus
  1220. //
  1221. [
  1222. object,
  1223. uuid(AB769053-6D38-49D4-86EF-5FA85ED3AF27),
  1224. dual,
  1225. helpstring("ICertificateStatus Interface"),
  1226. pointer_default(unique)
  1227. ]
  1228. interface ICertificateStatus : IDispatch
  1229. {
  1230. [propget, id(0), helpstring("Default property to get the certificate validity result.")]
  1231. HRESULT Result([out, retval] VARIANT_BOOL * pVal);
  1232. [propget, id(1), helpstring("Property to get validity check flag.")]
  1233. HRESULT CheckFlag([out, retval] CAPICOM_CHECK_FLAG * pVal);
  1234. [propput, id(1), helpstring("Property to set validity check flag (values can be ORed together and default check flag is CHECK_SIGNATURE_VALIDITY OR CHECK_TIME_VALIDITY OR CHECK_TRUSTED_ROOT).")]
  1235. HRESULT CheckFlag([in] CAPICOM_CHECK_FLAG newVal);
  1236. [id(2), helpstring("Method to return an IEKU object for setting extended key usage to check (default is no EKU check).")]
  1237. HRESULT EKU([out, retval] IEKU ** pVal);
  1238. };
  1239. //
  1240. // ICertificate
  1241. //
  1242. [
  1243. object,
  1244. uuid(0BBA0B86-766C-4755-A443-243FF2BD8D29),
  1245. dual,
  1246. helpstring("ICertificate Interface"),
  1247. pointer_default(unique)
  1248. ]
  1249. interface ICertificate : IDispatch
  1250. {
  1251. //
  1252. // Property
  1253. //
  1254. [propget, id(1), helpstring("Property to get the version number.")]
  1255. HRESULT Version([out, retval] long * pVal);
  1256. [propget, id(2), helpstring("Property to get the serial number.")]
  1257. HRESULT SerialNumber([out, retval] BSTR * pVal);
  1258. [propget, id(3), helpstring("Property to get the subject's name.")]
  1259. HRESULT SubjectName([out, retval] BSTR * pVal);
  1260. [propget, id(4), helpstring("Property to get the issuer's name.")]
  1261. HRESULT IssuerName([out, retval] BSTR * pVal);
  1262. [propget, id(5), helpstring("Property to get the valid notBefore date.")]
  1263. HRESULT ValidFromDate([out, retval] DATE * pVal);
  1264. [propget, id(6), helpstring("Property to get the valid notAfter date.")]
  1265. HRESULT ValidToDate([out, retval] DATE * pVal);
  1266. [propget, id(7), helpstring("Property to get the SHA1 hash.")]
  1267. HRESULT Thumbprint([out, retval] BSTR * pVal);
  1268. //
  1269. // Method
  1270. //
  1271. [id(10), helpstring("Method to check if private key is available.")]
  1272. HRESULT HasPrivateKey([out, retval] VARIANT_BOOL * pVal);
  1273. [id(11), helpstring("Method to get other simple information of the certificate.")]
  1274. HRESULT GetInfo([in] CAPICOM_CERT_INFO_TYPE InfoType, [out, retval] BSTR * pVal);
  1275. [id(12), helpstring("Method to return the ICertificateStatus object for checking if the certificate is valid.")]
  1276. HRESULT IsValid([out, retval] ICertificateStatus ** pVal);
  1277. [id(13), helpstring("Method to return the KeyUsage object.")]
  1278. HRESULT KeyUsage([out, retval] IKeyUsage ** pVal);
  1279. [id(14), helpstring("Method to return the ExtendedKeyUsage object.")]
  1280. HRESULT ExtendedKeyUsage([out, retval] IExtendedKeyUsage ** pVal);
  1281. [id(15), helpstring("Method to return the BasicConstraints object.")]
  1282. HRESULT BasicConstraints([out, retval] IBasicConstraints ** pVal);
  1283. [id(16), helpstring("Method to export the certificate.")]
  1284. HRESULT Export([in, defaultvalue(CAPICOM_ENCODE_BASE64)] CAPICOM_ENCODING_TYPE EncodingType,
  1285. [out, retval] BSTR * pVal);
  1286. [id(17), helpstring("Method to import a certificate.")]
  1287. HRESULT Import([in] BSTR EncodedCertificate);
  1288. [id(18), helpstring("Method to display the certificate.")]
  1289. HRESULT Display();
  1290. };
  1291. //
  1292. // ICertificates
  1293. //
  1294. [
  1295. object,
  1296. uuid(68646716-BDA0-4046-AB82-4444BC93B84A),
  1297. dual,
  1298. helpstring("ICertificates Interface"),
  1299. pointer_default(unique)
  1300. ]
  1301. interface ICertificates : IDispatch
  1302. {
  1303. //
  1304. // Property
  1305. //
  1306. [propget, id(0), helpstring("Property Item.")]
  1307. HRESULT Item([in] long Index, [out, retval] VARIANT * pVal);
  1308. [propget, id(1), helpstring("Property Count.")]
  1309. HRESULT Count([out, retval] long * pVal);
  1310. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1311. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1312. };
  1313. //
  1314. // IChain
  1315. //
  1316. [
  1317. object,
  1318. uuid(77F6F881-5D3A-4F2F-AEF0-E4A2F9AA689D),
  1319. dual,
  1320. helpstring("IChain Interface"),
  1321. pointer_default(unique)
  1322. ]
  1323. interface IChain : IDispatch
  1324. {
  1325. [propget, id(0), helpstring("Default property to get an ordered certificates collection object representing the chain, where Item(1) represents the end certificate and Item(Count()) represents the root certificate.")]
  1326. HRESULT Certificates([out, retval] ICertificates ** pVal);
  1327. [propget, id(1), helpstring("Property to get validity status of the chain or a particular certficate. For overall chain status, specify Index of 0, otherwise specify the 1 for the end certificate, and Certificates.Count() for the root certificate.")]
  1328. HRESULT Status([in, defaultvalue(0)] long Index, [out,retval] long * pVal);
  1329. [id(2), helpstring("Method to build the certificate chain and get the overall result of the chain validity.")]
  1330. HRESULT Build([in] ICertificate * pICertificate, [out, retval] VARIANT_BOOL * pVal);
  1331. };
  1332. //
  1333. // IStore
  1334. //
  1335. [
  1336. object,
  1337. uuid(E860EF75-1B63-4254-AF47-960DAA3DD337),
  1338. dual,
  1339. helpstring("IStore Interface"),
  1340. pointer_default(unique)
  1341. ]
  1342. interface IStore : IDispatch
  1343. {
  1344. [propget, id(0), helpstring("Default property to get a Certificates collection object.")]
  1345. HRESULT Certificates([out, retval] ICertificates ** pVal);
  1346. [id(1), helpstring("Method to open a store.")]
  1347. HRESULT Open([in, defaultvalue(CAPICOM_CURRENT_USER_STORE)] CAPICOM_STORE_LOCATION StoreLocation,
  1348. [in, defaultvalue("My")] BSTR StoreName,
  1349. [in, defaultvalue(CAPICOM_STORE_OPEN_READ_ONLY)] CAPICOM_STORE_OPEN_MODE OpenMode);
  1350. [id(2), helpstring("Method to add a certificate to the store.")]
  1351. HRESULT Add([in] ICertificate * pVal);
  1352. [id(3), helpstring("Method to remove a certificate from the store.")]
  1353. HRESULT Remove([in] ICertificate * pVal);
  1354. [id(4), helpstring("Method to export the store.")]
  1355. HRESULT Export([in, defaultvalue(CAPICOM_STORE_SAVE_AS_SERIALIZED)] CAPICOM_STORE_SAVE_AS_TYPE SaveAs,
  1356. [in, defaultvalue(CAPICOM_ENCODE_BASE64)] CAPICOM_ENCODING_TYPE EncodingType,
  1357. [out, retval] BSTR * pVal);
  1358. [id(5), helpstring("Method to import a store.")]
  1359. HRESULT Import([in] BSTR EncodedStore);
  1360. };
  1361. //
  1362. // IAttribute
  1363. //
  1364. [
  1365. object,
  1366. uuid(B17A8D78-B5A6-45F7-BA21-01AB94B08415),
  1367. dual,
  1368. helpstring("IAttribute Interface"),
  1369. pointer_default(unique)
  1370. ]
  1371. interface IAttribute : IDispatch
  1372. {
  1373. [propget, id(0), helpstring("Default property to get attribute name.")]
  1374. HRESULT Name([out, retval] CAPICOM_ATTRIBUTE * pVal);
  1375. [propput, id(0), helpstring("Default property to set attribute name.")]
  1376. HRESULT Name([in] CAPICOM_ATTRIBUTE newVal);
  1377. [propget, id(1), helpstring("Property to get attribute value.")]
  1378. HRESULT Value([out, retval] VARIANT * pVal);
  1379. [propput, id(1), helpstring("Property to set attribute value.")]
  1380. HRESULT Value([in] VARIANT newVal);
  1381. };
  1382. //
  1383. // IAttributes
  1384. //
  1385. [
  1386. object,
  1387. uuid(6ADC653E-D5B9-422A-991A-A2B0119CEDAC),
  1388. dual,
  1389. helpstring("IAttributes Interface"),
  1390. pointer_default(unique)
  1391. ]
  1392. interface IAttributes : IDispatch
  1393. {
  1394. //
  1395. // Property
  1396. //
  1397. [propget, id(0), helpstring("Property Item.")]
  1398. HRESULT Item([in] long Index, [out, retval] VARIANT * pVal);
  1399. [propget, id(1), helpstring("Property Count.")]
  1400. HRESULT Count([out, retval] long * pVal);
  1401. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1402. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1403. [id(2), helpstring("Method Add.")]
  1404. HRESULT Add([in] IAttribute * pVal);
  1405. [id(3), helpstring("Method Remove.")]
  1406. HRESULT Remove([in] long Index);
  1407. [id(4), helpstring("Method Clear.")]
  1408. HRESULT Clear();
  1409. };
  1410. //
  1411. // ISigner
  1412. //
  1413. [
  1414. object,
  1415. uuid(51017B88-1913-49AD-82BE-6BB7C417DCF2),
  1416. dual,
  1417. helpstring("ISigner Interface"),
  1418. pointer_default(unique)
  1419. ]
  1420. interface ISigner : IDispatch
  1421. {
  1422. [propget, id(0), helpstring("Default property to get signer's certificate.")]
  1423. HRESULT Certificate([out, retval] ICertificate ** pVal);
  1424. [propput, id(0), helpstring("Default property to set signer's certificate.")]
  1425. HRESULT Certificate([in] ICertificate * newVal);
  1426. [propget, id(1), helpstring("Property to add/remove authenticated attributes.")]
  1427. HRESULT AuthenticatedAttributes([out, retval] IAttributes ** pVal);
  1428. };
  1429. //
  1430. // ISigners
  1431. //
  1432. [
  1433. object,
  1434. uuid(5A0780F8-9E6B-4BB0-BF54-87CD9627A8B4),
  1435. dual,
  1436. helpstring("ISigners Interface"),
  1437. pointer_default(unique)
  1438. ]
  1439. interface ISigners : IDispatch
  1440. {
  1441. //
  1442. // Property
  1443. //
  1444. [propget, id(0), helpstring("Property Item.")]
  1445. HRESULT Item([in] long Index, [out, retval] VARIANT * pVal);
  1446. [propget, id(1), helpstring("Property Count.")]
  1447. HRESULT Count([out, retval] long * pVal);
  1448. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1449. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1450. };
  1451. //
  1452. // ISignedData
  1453. //
  1454. [
  1455. object,
  1456. uuid(AE9C454B-FC65-4C10-B130-CD9B45BA948B),
  1457. dual,
  1458. helpstring("ISignedData Interface"),
  1459. pointer_default(unique)
  1460. ]
  1461. interface ISignedData : IDispatch
  1462. {
  1463. [propput, id(0), helpstring("Default property to set content to be signed.")]
  1464. HRESULT Content([in] BSTR newVal);
  1465. [propget, id(0), helpstring("Default property to get content to be signed.")]
  1466. HRESULT Content([out, retval] BSTR * pVal);
  1467. [propget, id(1), helpstring("Property to get all the content signers as an ISigners collection object.")]
  1468. HRESULT Signers([out, retval] ISigners ** pVal);
  1469. [propget, id(2), helpstring("Property to get all certificates in the signed message.")]
  1470. HRESULT Certificates([out, retval] ICertificates ** pVal);
  1471. [id(3), helpstring("Method to sign the message.")]
  1472. HRESULT Sign([in, defaultvalue(NULL)] ISigner * pSigner,
  1473. [in, defaultvalue(0)] VARIANT_BOOL bDetached,
  1474. [in, defaultvalue(CAPICOM_ENCODE_BASE64)] CAPICOM_ENCODING_TYPE EncodingType,
  1475. [out, retval] BSTR * pVal);
  1476. [id(4), helpstring("Method to CoSign the message.")]
  1477. HRESULT CoSign([in, defaultvalue(NULL)] ISigner * pSigner,
  1478. [in, defaultvalue(CAPICOM_ENCODE_BASE64)] CAPICOM_ENCODING_TYPE EncodingType,
  1479. [out, retval] BSTR * pVal);
  1480. [id(5), helpstring("Method to verify if signature(s) in the signed message is cryptographically valid.")]
  1481. HRESULT Verify([in] BSTR SignedMessage,
  1482. [in, defaultvalue(0)] VARIANT_BOOL bDetached,
  1483. [in, defaultvalue(CAPICOM_VERIFY_SIGNATURE_AND_CERTIFICATE)] CAPICOM_SIGNED_DATA_VERIFY_FLAG VerifyFlag);
  1484. };
  1485. //
  1486. // IAlgorithm
  1487. //
  1488. [
  1489. object,
  1490. uuid(BF3D04A9-B0DA-4153-B45E-6CCFA5AC715B),
  1491. dual,
  1492. helpstring("IAlgorithm Interface"),
  1493. pointer_default(unique)
  1494. ]
  1495. interface IAlgorithm : IDispatch
  1496. {
  1497. [propget, id(0), helpstring("Default property to get encryption algorithm.")]
  1498. HRESULT Name([out, retval] CAPICOM_ENCRYPTION_ALGORITHM * pVal);
  1499. [propput, id(0), helpstring("Default property to set encryption algorithm.")]
  1500. HRESULT Name([in] CAPICOM_ENCRYPTION_ALGORITHM newVal);
  1501. [propget, id(1), helpstring("Property to get encryption key length. This property is ignored for DES or 3DES.")]
  1502. HRESULT KeyLength([out, retval] CAPICOM_ENCRYPTION_KEY_LENGTH * pVal);
  1503. [propput, id(1), helpstring("Property to set encryption key length. This property is ignored for DES or 3DES.")]
  1504. HRESULT KeyLength([in] CAPICOM_ENCRYPTION_KEY_LENGTH newVal);
  1505. };
  1506. //
  1507. // Recipients
  1508. //
  1509. [
  1510. object,
  1511. uuid(A694C896-FC38-4C34-AE61-3B1A95984C14),
  1512. dual,
  1513. helpstring("IRecipients Interface"),
  1514. pointer_default(unique)
  1515. ]
  1516. interface IRecipients : IDispatch
  1517. {
  1518. //
  1519. // Property
  1520. //
  1521. [propget, id(0), helpstring("Property Item.")]
  1522. HRESULT Item([in] long Index, [out, retval] VARIANT * pVal);
  1523. [propget, id(1), helpstring("Property Count.")]
  1524. HRESULT Count([out, retval] long * pVal);
  1525. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1526. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1527. [id(2), helpstring("Method Add.")]
  1528. HRESULT Add([in] ICertificate * pVal);
  1529. [id(3), helpstring("Method Remove.")]
  1530. HRESULT Remove([in] long Index);
  1531. [id(4), helpstring("Method Clear.")]
  1532. HRESULT Clear();
  1533. };
  1534. //
  1535. // IEnvelopedData
  1536. //
  1537. [
  1538. object,
  1539. uuid(F6CB6A20-CC18-4424-AE57-6F2AA3DC2059),
  1540. dual,
  1541. helpstring("IEnvelopedData Interface"),
  1542. pointer_default(unique)
  1543. ]
  1544. interface IEnvelopedData : IDispatch
  1545. {
  1546. [propput, id(0), helpstring("Default property to set the content to be enveloped.")]
  1547. HRESULT Content([in] BSTR newVal);
  1548. [propget, id(0), helpstring("Default property to get the content to be enveloped.")]
  1549. HRESULT Content([out, retval] BSTR * pVal);
  1550. [propget, id(1), helpstring("Property to get/set the encryption algorithm.")]
  1551. HRESULT Algorithm([out, retval] IAlgorithm ** pVal);
  1552. [propget, id(2), helpstring("Property to add/remove recipients.")]
  1553. HRESULT Recipients([out, retval] IRecipients ** pVal);
  1554. [id(3), helpstring("Method to envelop the content.")]
  1555. HRESULT Encrypt([in, defaultvalue(CAPICOM_ENCODE_BASE64)] CAPICOM_ENCODING_TYPE EncodingType,
  1556. [out, retval] BSTR * pVal);
  1557. [id(4), helpstring("Method to decrypt the enveloped content.")]
  1558. HRESULT Decrypt([in] BSTR EnvelopedMessage);
  1559. };
  1560. //
  1561. // IEncryptedData
  1562. //
  1563. [
  1564. object,
  1565. uuid(C4778A66-972F-42E4-87C5-5CC16F7931CA),
  1566. dual,
  1567. helpstring("IEncryptedData Interface"),
  1568. pointer_default(unique)
  1569. ]
  1570. interface IEncryptedData : IDispatch
  1571. {
  1572. [propput, id(0), helpstring("Default property to set the content to be encrypted.")]
  1573. HRESULT Content([in] BSTR newVal);
  1574. [propget, id(0), helpstring("Default property to get the content to be encrypted.")]
  1575. HRESULT Content([out, retval] BSTR * pVal);
  1576. [propget, id(1), helpstring("Property to get/set the encryption algorithm.")]
  1577. HRESULT Algorithm([out, retval] IAlgorithm ** pVal);
  1578. [id(2), helpstring("Method to set the secret used to generate the symmetric key.")]
  1579. HRESULT SetSecret([in] BSTR newVal,
  1580. [in, defaultvalue(CAPICOM_SECRET_PASSWORD)] CAPICOM_SECRET_TYPE SecretType);
  1581. [id(3), helpstring("Method to encrypt the content.")]
  1582. HRESULT Encrypt([in, defaultvalue(CAPICOM_ENCODE_BASE64)] CAPICOM_ENCODING_TYPE EncodingType,
  1583. [out, retval] BSTR * pVal);
  1584. [id(4), helpstring("Method to decrypt the encrypted content.")]
  1585. HRESULT Decrypt([in] BSTR EncryptedMessage);
  1586. };
  1587. ////////////////////////////////////////////////////////////////////////////////
  1588. //
  1589. // CAPICOM v2.0
  1590. //
  1591. //
  1592. // IOID
  1593. //
  1594. [
  1595. object,
  1596. uuid(208E5E9B-58B1-4086-970F-161B582A846F),
  1597. dual,
  1598. helpstring("IOID Interface"),
  1599. pointer_default(unique)
  1600. ]
  1601. interface IOID : IDispatch
  1602. {
  1603. [propget, id(0), helpstring("Default property to get name.")]
  1604. HRESULT Name([out, retval] CAPICOM_OID * pVal);
  1605. [propput, id(0), helpstring("Default property to set name.")]
  1606. HRESULT Name([in] CAPICOM_OID newVal);
  1607. [propget, id(1), helpstring("Default property to get friendly name.")]
  1608. HRESULT FriendlyName([out, retval] BSTR * pVal);
  1609. [propput, id(1), helpstring("Default property to set friendly name.")]
  1610. HRESULT FriendlyName([in] BSTR newVal);
  1611. [propget, id(2), helpstring("Property to get the OID string value as defined in WinCrypt.h.")]
  1612. HRESULT Value([out, retval] BSTR * pVal);
  1613. [propput, id(2), helpstring("Property to set the OID string value as defined in WinCrypt.h.")]
  1614. HRESULT Value([in] BSTR newVal);
  1615. };
  1616. //
  1617. // IOID
  1618. //
  1619. [
  1620. object,
  1621. uuid(DA55E8FC-8E27-451B-AEA8-1470D80FAD42),
  1622. dual,
  1623. helpstring("IOIDs Interface"),
  1624. pointer_default(unique)
  1625. ]
  1626. interface IOIDs : IDispatch
  1627. {
  1628. [propget, id(0), helpstring("Property Item.")]
  1629. HRESULT Item([in] VARIANT Index, [out, retval] VARIANT * pVal);
  1630. [propget, id(1), helpstring("Property Count.")]
  1631. HRESULT Count([out, retval] long * pVal);
  1632. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1633. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1634. [id(2), helpstring("Method Add.")]
  1635. HRESULT Add([in] IOID * pVal);
  1636. [id(3), helpstring("Method Remove.")]
  1637. HRESULT Remove([in] VARIANT Index);
  1638. [id(4), helpstring("Method Clear.")]
  1639. HRESULT Clear();
  1640. };
  1641. //
  1642. // INoticeNumbers
  1643. //
  1644. [
  1645. object,
  1646. uuid(EE2C051D-33A1-4157-86B4-9280E29782F2),
  1647. dual,
  1648. helpstring("INoticeNumbers Interface"),
  1649. pointer_default(unique)
  1650. ]
  1651. interface INoticeNumbers : IDispatch
  1652. {
  1653. //
  1654. // Property
  1655. //
  1656. [propget, id(0), helpstring("Property Item.")]
  1657. HRESULT Item([in] long Index, [out, retval] VARIANT * pVal);
  1658. [propget, id(1), helpstring("Property Count.")]
  1659. HRESULT Count([out, retval] long * pVal);
  1660. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1661. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1662. };
  1663. //
  1664. // IQualifier
  1665. //
  1666. [
  1667. object,
  1668. uuid(3604C9DD-A22E-4A15-A469-8181C0C113DE),
  1669. dual,
  1670. helpstring("IQualifier Interface"),
  1671. pointer_default(unique)
  1672. ]
  1673. interface IQualifier : IDispatch
  1674. {
  1675. [propget, id(0), helpstring("Default property to get the OID.")]
  1676. HRESULT OID([out, retval] IOID ** pVal);
  1677. [propget, id(1), helpstring("Property to get the URI for the Certificate Practice Statement (CPS).")]
  1678. HRESULT CPSPointer([out, retval] BSTR * pVal);
  1679. [propget, id(2), helpstring("Property to get the organization name.")]
  1680. HRESULT OrganizationName([out, retval] BSTR * pVal);
  1681. [propget, id(3), helpstring("Property to get the notice numbers.")]
  1682. HRESULT NoticeNumbers([out, retval] INoticeNumbers ** pVal);
  1683. [propget, id(4), helpstring("Property to get the explicit text.")]
  1684. HRESULT ExplicitText([out, retval] BSTR * pVal);
  1685. };
  1686. //
  1687. // IQualifiers
  1688. //
  1689. [
  1690. object,
  1691. uuid(6B5A8AB6-597D-4398-AC63-1036EF546348),
  1692. dual,
  1693. helpstring("IQualifiers Interface"),
  1694. pointer_default(unique)
  1695. ]
  1696. interface IQualifiers : IDispatch
  1697. {
  1698. //
  1699. // Property
  1700. //
  1701. [propget, id(0), helpstring("Property Item.")]
  1702. HRESULT Item([in] long Index, [out, retval] VARIANT * pVal);
  1703. [propget, id(1), helpstring("Property Count.")]
  1704. HRESULT Count([out, retval] long * pVal);
  1705. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1706. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1707. };
  1708. //
  1709. // IPolicyInformation
  1710. //
  1711. [
  1712. object,
  1713. uuid(8973710C-8411-4951-9E65-D45FD524FFDF),
  1714. dual,
  1715. helpstring("IPolicyInformation Interface"),
  1716. pointer_default(unique)
  1717. ]
  1718. interface IPolicyInformation : IDispatch
  1719. {
  1720. [propget, id(0), helpstring("Default property to get the OID.")]
  1721. HRESULT OID([out, retval] IOID ** pVal);
  1722. [propget, id(1), helpstring("Property to get the qualifiers collection object.")]
  1723. HRESULT Qualifiers([out, retval] IQualifiers ** pVal);
  1724. };
  1725. //
  1726. // ICertificatePolicies
  1727. //
  1728. [
  1729. object,
  1730. uuid(CC7A72A7-C83A-4049-85F4-4292DE9DBFD3),
  1731. dual,
  1732. helpstring("ICertificatePolicies Interface"),
  1733. pointer_default(unique)
  1734. ]
  1735. interface ICertificatePolicies : IDispatch
  1736. {
  1737. //
  1738. // Property
  1739. //
  1740. [propget, id(0), helpstring("Property Item.")]
  1741. HRESULT Item([in] long Index, [out, retval] VARIANT * pVal);
  1742. [propget, id(1), helpstring("Property Count.")]
  1743. HRESULT Count([out, retval] long * pVal);
  1744. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1745. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1746. };
  1747. //
  1748. // IEncodedData
  1749. //
  1750. [
  1751. object,
  1752. uuid(D3D460F2-E7F3-4AF3-8EC6-8EB68C61C567),
  1753. dual,
  1754. helpstring("IEncodedData Interface"),
  1755. pointer_default(unique)
  1756. ]
  1757. interface IEncodedData : IDispatch
  1758. {
  1759. [propget, id(0), helpstring("Default property to get the encoded data.")]
  1760. HRESULT Value([in, defaultvalue(CAPICOM_ENCODE_BASE64)] CAPICOM_ENCODING_TYPE EncodingType,
  1761. [out, retval] BSTR * pVal);
  1762. [id(1), helpstring("Method to format the encoded data for display purpose.")]
  1763. HRESULT Format([in, defaultvalue(0)] VARIANT_BOOL bMultiLines,
  1764. [out, retval] BSTR * pVal);
  1765. [id(2), helpstring("Method to return the decoder object (IDispatch), which can be NULL.")]
  1766. HRESULT Decoder([out, retval] IDispatch ** pVal);
  1767. };
  1768. //
  1769. // IExtension
  1770. //
  1771. [
  1772. object,
  1773. uuid(ED4E4ED4-FDD8-476E-AED9-5239E7948257),
  1774. dual,
  1775. helpstring("IExtension Interface"),
  1776. pointer_default(unique)
  1777. ]
  1778. interface IExtension : IDispatch
  1779. {
  1780. [propget, id(0), helpstring("Default property to get the IOID object.")]
  1781. HRESULT OID([out, retval] IOID ** pVal);
  1782. [propget, id(1), helpstring("Property to get IsCritical setting.")]
  1783. HRESULT IsCritical([out, retval] VARIANT_BOOL * pVal);
  1784. [propget, id(2), helpstring("Property to get the EncodedData object.")]
  1785. HRESULT EncodedData([out, retval] IEncodedData ** pVal);
  1786. };
  1787. //
  1788. // IExtensions
  1789. //
  1790. [
  1791. object,
  1792. uuid(BC530D61-E692-4225-9E7A-07B90B45856A),
  1793. dual,
  1794. helpstring("IExtensions Interface"),
  1795. pointer_default(unique)
  1796. ]
  1797. interface IExtensions : IDispatch
  1798. {
  1799. [propget, id(0), helpstring("Property Item.")]
  1800. HRESULT Item([in] VARIANT Index, [out, retval] VARIANT * pVal);
  1801. [propget, id(1), helpstring("Property Count.")]
  1802. HRESULT Count([out, retval] long * pVal);
  1803. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1804. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1805. };
  1806. //
  1807. // IExtendedProperty
  1808. //
  1809. [
  1810. object,
  1811. uuid(ECB8A5C8-562C-4989-B49D-FA37D40F8FC4),
  1812. dual,
  1813. helpstring("IExtendedProperty Interface"),
  1814. pointer_default(unique)
  1815. ]
  1816. interface IExtendedProperty : IDispatch
  1817. {
  1818. [propget, id(0), helpstring("Default property to get PropID.")]
  1819. HRESULT PropID([out, retval] CAPICOM_PROPID * pVal);
  1820. [propput, id(0), helpstring("Default property to set PropID.")]
  1821. HRESULT PropID([in] CAPICOM_PROPID newVal);
  1822. [propget, id(1), helpstring("Property to get the extended property data.")]
  1823. HRESULT Value([in, defaultvalue(CAPICOM_ENCODE_BASE64)] CAPICOM_ENCODING_TYPE EncodingType,
  1824. [out, retval] BSTR * pVal);
  1825. [propput, id(1), helpstring("Property to set the extended property data.")]
  1826. HRESULT Value([in, defaultvalue(CAPICOM_ENCODE_BASE64)] CAPICOM_ENCODING_TYPE EncodingType,
  1827. [in] BSTR newVal);
  1828. };
  1829. //
  1830. // IExtendedProperties
  1831. //
  1832. [
  1833. object,
  1834. uuid(3B096E87-6218-4A3B-A880-F6CB951E7805),
  1835. dual,
  1836. helpstring("IExtendedProperties Interface"),
  1837. pointer_default(unique)
  1838. ]
  1839. interface IExtendedProperties : IDispatch
  1840. {
  1841. //
  1842. // Property
  1843. //
  1844. [propget, id(0), helpstring("Property Item.")]
  1845. HRESULT Item([in] long Index, [out, retval] VARIANT * pVal);
  1846. [propget, id(1), helpstring("Property Count.")]
  1847. HRESULT Count([out, retval] long * pVal);
  1848. [propget, id(DISPID_NEWENUM), helpstring("Property _NewEnum."), restricted]
  1849. HRESULT _NewEnum([out, retval] LPUNKNOWN * pVal);
  1850. [id(2), helpstring("Method Add.")]
  1851. HRESULT Add([in] IExtendedProperty * pVal);
  1852. [id(3), helpstring("Method Remove.")]
  1853. HRESULT Remove([in] CAPICOM_PROPID PropId);
  1854. };
  1855. //
  1856. // ITemplate
  1857. //
  1858. [
  1859. object,
  1860. uuid(5F10FFCE-C922-476F-AA76-DF99D5BDFA2C),
  1861. dual,
  1862. helpstring("ITemplate Interface"),
  1863. pointer_default(unique)
  1864. ]
  1865. interface ITemplate : IDispatch
  1866. {
  1867. //
  1868. // Property
  1869. //
  1870. [propget, id(1), helpstring("Property to check if the CertificateTemplate extension is present.")]
  1871. HRESULT IsPresent([out, retval] VARIANT_BOOL * pVal);
  1872. [propget, id(2), helpstring("Property to check if the CertificateTemplate extension is marked critical.")]
  1873. HRESULT IsCritical([out, retval] VARIANT_BOOL * pVal);
  1874. [propget, id(3), helpstring("Property to get the name of the CertificateTemplate extension.")]
  1875. HRESULT Name([out, retval] BSTR * pVal);
  1876. [propget, id(4), helpstring("Property to get the OID object.")]
  1877. HRESULT OID([out, retval] IOID ** pVal);
  1878. [propget, id(5), helpstring("Property to get the major version number.")]
  1879. HRESULT MajorVersion([out, retval] long * pVal);
  1880. [propget, id(6), helpstring("Property to get the minor version number.")]
  1881. HRESULT MinorVersion([out, retval] long * pVal);
  1882. };
  1883. //
  1884. // IPublicKey
  1885. //
  1886. [
  1887. object,
  1888. uuid(72BF9ADA-6817-4C31-B43E-25F7C7B091F4),
  1889. dual,
  1890. helpstring("IPublicKey Interface"),
  1891. pointer_default(unique)
  1892. ]
  1893. interface IPublicKey : IDispatch
  1894. {
  1895. [propget, id(0), helpstring("Default property to get the algorithm OID object.")]
  1896. HRESULT Algorithm([out, retval] IOID ** pVal);
  1897. [propget, id(1), helpstring("Property to get key length.")]
  1898. HRESULT Length([out, retval] long * pVal);
  1899. [propget, id(2), helpstring("Property to get the EncodedData object for the key.")]
  1900. HRESULT EncodedKey([out, retval] IEncodedData ** pVal);
  1901. [propget, id(3), helpstring("Property to get the EncodedData object for the parameters.")]
  1902. HRESULT EncodedParameters([out, retval] IEncodedData ** pVal);
  1903. };
  1904. //
  1905. // IPrivateKey
  1906. //
  1907. [
  1908. object,
  1909. uuid(659DEDC3-6C85-42DB-8527-EFCB21742862),
  1910. dual,
  1911. helpstring("IPrivateKey Interface"),
  1912. pointer_default(unique)
  1913. ]
  1914. interface IPrivateKey : IDispatch
  1915. {
  1916. [propget, id(0), helpstring("Default property to get the key container name.")]
  1917. HRESULT ContainerName([out, retval] BSTR * pVal);
  1918. [propget, id(1), helpstring("Property to get the unique key container name.")]
  1919. HRESULT UniqueContainerName([out, retval] BSTR * pVal);
  1920. [propget, id(2), helpstring("Property to get the provider name.")]
  1921. HRESULT ProviderName([out, retval] BSTR * pVal);
  1922. [propget, id(3), helpstring("Property to get the provider type.")]
  1923. HRESULT ProviderType([out, retval] CAPICOM_PROV_TYPE * pVal);
  1924. [propget, id(4), helpstring("Property to get the key spec value.")]
  1925. HRESULT KeySpec([out, retval] CAPICOM_KEY_SPEC * pVal);
  1926. [id(5), helpstring("Method to check if the key is accessible.")]
  1927. HRESULT IsAccessible([out, retval] VARIANT_BOOL * pVal);
  1928. [id(6), helpstring("Method to check if the key is protected.")]
  1929. HRESULT IsProtected([out, retval] VARIANT_BOOL * pVal);
  1930. [id(7), helpstring("Method to check if the key is marked exportable.")]
  1931. HRESULT IsExportable([out, retval] VARIANT_BOOL * pVal);
  1932. [id(8), helpstring("Method to check if the key is in removable storage.")]
  1933. HRESULT IsRemovable([out, retval] VARIANT_BOOL * pVal);
  1934. [id(9), helpstring("Method to check if the key is a machine keyset.")]
  1935. HRESULT IsMachineKeyset([out, retval] VARIANT_BOOL * pVal);
  1936. [id(10), helpstring("Method to check if the key is stored in hardware device.")]
  1937. HRESULT IsHardwareDevice([out, retval] VARIANT_BOOL * pVal);
  1938. [id(11), helpstring("Method to open an existing key container.")]
  1939. HRESULT Open([in] BSTR ContainerName,
  1940. [in, defaultvalue("Microsoft Enhanced Cryptographic Provider v1.0")] BSTR ProviderName,
  1941. [in, defaultvalue(CAPICOM_PROV_RSA_FULL)] CAPICOM_PROV_TYPE ProviderType,
  1942. [in, defaultvalue(CAPICOM_KEY_SPEC_SIGNATURE)] CAPICOM_KEY_SPEC KeySpec,
  1943. [in, defaultvalue(CAPICOM_CURRENT_USER_STORE)] CAPICOM_STORE_LOCATION StoreLocation,
  1944. [in, defaultvalue(0)] VARIANT_BOOL bCheckExistence);
  1945. [id(12), helpstring("Method to delete the existing key container.")]
  1946. HRESULT Delete();
  1947. };
  1948. //
  1949. // ICertificateStatus2
  1950. //
  1951. [
  1952. object,
  1953. uuid(BF95660E-F743-4EAC-9DE5-960787A4606C),
  1954. dual,
  1955. helpstring("ICertificateStatus2 Interface"),
  1956. pointer_default(unique)
  1957. ]
  1958. interface ICertificateStatus2 : ICertificateStatus
  1959. {
  1960. [propget, id(3), helpstring("Property to get verification time.")]
  1961. HRESULT VerificationTime([out, retval] DATE * pVal);
  1962. [propput, id(3), helpstring("Property to set verification time.")]
  1963. HRESULT VerificationTime([in] DATE newVal);
  1964. [propget, id(4), helpstring("Property to get the URL retrieval timeout value (in seconds).")]
  1965. HRESULT UrlRetrievalTimeout([out, retval] long * pVal);
  1966. [propput, id(4), helpstring("Property to set the URL retrieval timeout value (in seconds).")]
  1967. HRESULT UrlRetrievalTimeout([in] long newVal);
  1968. [id(5), helpstring("Method to get the certificate policies OIDs collection.")]
  1969. HRESULT CertificatePolicies([out, retval] IOIDs ** pVal);
  1970. [id(6), helpstring("Method to get the application policies OIDs collection.")]
  1971. HRESULT ApplicationPolicies([out, retval] IOIDs ** pVal);
  1972. };
  1973. //
  1974. // ICertificate2
  1975. //
  1976. [
  1977. object,
  1978. uuid(6FE450DC-AD32-48d4-A366-01EE7E0B1374),
  1979. dual,
  1980. helpstring("ICertificate2 Interface"),
  1981. pointer_default(unique)
  1982. ]
  1983. interface ICertificate2 : ICertificate
  1984. {
  1985. [propget, id(19), helpstring("Property to get archived status.")]
  1986. HRESULT Archived([out, retval] VARIANT_BOOL * pVal);
  1987. [propput, id(19), helpstring("Property to set the archived status.")]
  1988. HRESULT Archived([in] VARIANT_BOOL newVal);
  1989. [id(20), helpstring("Method to return the Template object.")]
  1990. HRESULT Template([out, retval] ITemplate ** pVal);
  1991. [id(21), helpstring("Method to return the PublicKey object.")]
  1992. HRESULT PublicKey([out, retval] IPublicKey ** pVal);
  1993. [propget, id(22), helpstring("Property to get the PrivateKey object.")]
  1994. HRESULT PrivateKey([out, retval] IPrivateKey ** pVal);
  1995. [propput, id(22), helpstring("Property to set the PrivateKey object (NULL to disassociate).")]
  1996. HRESULT PrivateKey([in] IPrivateKey * newVal);
  1997. [id(23), helpstring("Method to return the Extensions object.")]
  1998. HRESULT Extensions([out, retval] IExtensions ** pVal);
  1999. [id(24), helpstring("Method to return the ExtendedProperties object.")]
  2000. HRESULT ExtendedProperties([out, retval] IExtendedProperties ** pVal);
  2001. [id(25), helpstring("Method to load a certificate from file.")]
  2002. HRESULT Load([in] BSTR FileName,
  2003. [in, defaultvalue("")] BSTR Password,
  2004. [in, defaultvalue(CAPICOM_KEY_STORAGE_DEFAULT)] CAPICOM_KEY_STORAGE_FLAG KeyStorageFlag,
  2005. [in, defaultvalue(CAPICOM_CURRENT_USER_KEY)] CAPICOM_KEY_LOCATION KeyLocation);
  2006. [id(26), helpstring("Method to save a certificate to file, with option to include the chain for PFX file.")]
  2007. HRESULT Save([in] BSTR FileName,
  2008. [in, defaultvalue("")] BSTR Password,
  2009. [in, defaultvalue(CAPICOM_CERTIFICATE_SAVE_AS_CER)] CAPICOM_CERTIFICATE_SAVE_AS_TYPE SaveAs,
  2010. [in, defaultvalue(CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY)] CAPICOM_CERTIFICATE_INCLUDE_OPTION IncludeOption);
  2011. };
  2012. //
  2013. // ICertificates2
  2014. //
  2015. [
  2016. object,
  2017. uuid(7B57C04B-1786-4B30-A7B6-36235CD58A14),
  2018. dual,
  2019. helpstring("ICertificates2 Interface"),
  2020. pointer_default(unique)
  2021. ]
  2022. interface ICertificates2 : ICertificates
  2023. {
  2024. [id(2), helpstring("Method to find certificates in the collection.")]
  2025. HRESULT Find([in] CAPICOM_CERTIFICATE_FIND_TYPE FindType,
  2026. [in, defaultvalue(0)] VARIANT varCriteria,
  2027. [in, defaultvalue(0)] VARIANT_BOOL bFindValidOnly,
  2028. [out, retval] ICertificates2 ** pVal);
  2029. [id(3), helpstring("Method to display the certificate selection dialog box.")]
  2030. HRESULT Select([in, defaultvalue("")] BSTR Title,
  2031. [in, defaultvalue("")] BSTR DisplayString,
  2032. [in, defaultvalue(0)] VARIANT_BOOL bMultiSelect,
  2033. [out, retval] ICertificates2 ** pVal);
  2034. [id(4), helpstring("Method to add a certificate to the collection.")]
  2035. HRESULT Add([in] ICertificate2 * pVal);
  2036. [id(5), helpstring("Method to remove a certificate in the collection.")]
  2037. HRESULT Remove([in] VARIANT Index);
  2038. [id(6), helpstring("Method to remove all certificates in the collection.")]
  2039. HRESULT Clear();
  2040. [id(7), helpstring("Method to save certificate collection to file.")]
  2041. HRESULT Save([in] BSTR FileName,
  2042. [in, defaultvalue("")] BSTR Password,
  2043. [in, defaultvalue(CAPICOM_CERTIFICATES_SAVE_AS_PFX)] CAPICOM_CERTIFICATES_SAVE_AS_TYPE SaveAs,
  2044. [in, defaultvalue(CAPICOM_EXPORT_DEFAULT)] CAPICOM_EXPORT_FLAG ExportFlag);
  2045. };
  2046. //
  2047. // IChain2
  2048. //
  2049. [
  2050. object,
  2051. uuid(CA65D842-2110-4073-AEE3-D0AA5F56C421),
  2052. dual,
  2053. helpstring("IChain2 Interface"),
  2054. pointer_default(unique)
  2055. ]
  2056. interface IChain2 : IChain
  2057. {
  2058. [id(3), helpstring("Method to get the certificate policies OIDs collection.")]
  2059. HRESULT CertificatePolicies([out, retval] IOIDs ** pVal);
  2060. [id(4), helpstring("Method to get the application policies OIDs collection.")]
  2061. HRESULT ApplicationPolicies([out, retval] IOIDs ** pVal);
  2062. [id(5), helpstring("Method to get the extended error information description string.")]
  2063. HRESULT ExtendedErrorInfo([in, defaultvalue(1)] long Index,
  2064. [out, retval] BSTR * pVal);
  2065. #if (0) //DSIE: Made this C++ method.
  2066. [id(6), helpstring("Method to verify the chain with specified check flags.")]
  2067. HRESULT Verify ([in, defaultvalue(CAPICOM_CHECK_OFFLINE_ALL)] CAPICOM_CHECK_FLAG CheckFlag,
  2068. [out, retval] CAPICOM_CHAIN_STATUS * pVal);
  2069. #endif
  2070. };
  2071. //
  2072. // IStore2
  2073. //
  2074. [
  2075. object,
  2076. uuid(4DA6ABC4-BDCD-4317-B650-262075B93A9C),
  2077. dual,
  2078. helpstring("IStore2 Interface"),
  2079. pointer_default(unique)
  2080. ]
  2081. interface IStore2 : IStore
  2082. {
  2083. [id(6), helpstring("Method to load certificate(s) from file.")]
  2084. HRESULT Load([in] BSTR FileName,
  2085. [in, defaultvalue("")] BSTR Password,
  2086. [in, defaultvalue(CAPICOM_KEY_STORAGE_DEFAULT)] CAPICOM_KEY_STORAGE_FLAG KeyStorageFlag);
  2087. };
  2088. //
  2089. // ISigner2
  2090. //
  2091. [
  2092. object,
  2093. uuid(625B1F55-C720-41D6-9ECF-BA59F9B85F17),
  2094. dual,
  2095. helpstring("ISigner2 Interface"),
  2096. pointer_default(unique)
  2097. ]
  2098. interface ISigner2 : ISigner
  2099. {
  2100. [propget, id(2), helpstring("Property to get signer's chain.")]
  2101. HRESULT Chain([out, retval] IChain ** pVal);
  2102. [propget, id(3), helpstring("Property to get signer options.")]
  2103. HRESULT Options([out, retval] CAPICOM_CERTIFICATE_INCLUDE_OPTION * pVal);
  2104. [propput, id(3), helpstring("Property to set signer options.")]
  2105. HRESULT Options([in, defaultvalue(CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT)] CAPICOM_CERTIFICATE_INCLUDE_OPTION newVal);
  2106. [id(4), helpstring("Method to load signing certificate from a PFX file.")]
  2107. HRESULT Load([in] BSTR FileName,
  2108. [in, defaultvalue("")] BSTR Password);
  2109. };
  2110. //
  2111. // SignedCode
  2112. //
  2113. [
  2114. object,
  2115. uuid(84FBCB95-5600-404C-9187-AC25B4CD6E94),
  2116. dual,
  2117. helpstring("ISignedCode Interface"),
  2118. pointer_default(unique)
  2119. ]
  2120. interface ISignedCode : IDispatch
  2121. {
  2122. [propget, id(0), helpstring("Default property to get the filename of code to be signed.")]
  2123. HRESULT FileName([out, retval] BSTR * pVal);
  2124. [propput, id(0), helpstring("Default property to set the filename of code to be signed.")]
  2125. HRESULT FileName([in] BSTR newVal);
  2126. [propget, id(1), helpstring("Property to get the description text.")]
  2127. HRESULT Description([out, retval] BSTR * pVal);
  2128. [propput, id(1), helpstring("Property to set the description text.")]
  2129. HRESULT Description([in] BSTR newVal);
  2130. [propget, id(2), helpstring("Property to get the description URL.")]
  2131. HRESULT DescriptionURL([out, retval] BSTR * pVal);
  2132. [propput, id(2), helpstring("Property to set the description URL.")]
  2133. HRESULT DescriptionURL([in] BSTR newVal);
  2134. [propget, id(3), helpstring("Property to get the signer.")]
  2135. HRESULT Signer([out, retval] ISigner2 ** pVal);
  2136. [propget, id(4), helpstring("Property to get the time stamper.")]
  2137. HRESULT TimeStamper([out, retval] ISigner2 ** pVal);
  2138. [propget, id(5), helpstring("Property to get all certificates in the signed code.")]
  2139. HRESULT Certificates([out, retval] ICertificates2 ** pVal);
  2140. [id(6), helpstring("Method to sign the code.")]
  2141. HRESULT Sign([in, defaultvalue(NULL)] ISigner2 * pISigner2);
  2142. [id(7), helpstring("Method to timestamp the signed code.")]
  2143. HRESULT Timestamp([in] BSTR URL);
  2144. [id(8), helpstring("Method to verify the signed code.")]
  2145. HRESULT Verify([in, defaultvalue(0)] VARIANT_BOOL bUIAllowed);
  2146. };
  2147. //
  2148. // IHashedData
  2149. //
  2150. [
  2151. object,
  2152. uuid(9F7F23E8-06F4-42E8-B965-5CBD044BF27F),
  2153. dual,
  2154. helpstring("IHashedData Interface"),
  2155. pointer_default(unique)
  2156. ]
  2157. interface IHashedData : IDispatch
  2158. {
  2159. [propget, id(0), helpstring("Default property to get hashed value in hex format. Once the hashed value is obtained, future call to the Hash method starts a new hash.")]
  2160. HRESULT Value([out, retval] BSTR * pVal);
  2161. [propget, id(1), helpstring("Property to get hashing algorithm.")]
  2162. HRESULT Algorithm([out, retval] CAPICOM_HASH_ALGORITHM * pVal);
  2163. [propput, id(1), helpstring("Property to set hashing algorithm")]
  2164. HRESULT Algorithm([in] CAPICOM_HASH_ALGORITHM newVal);
  2165. [id(2), helpstring("Method to hash data. Must repeatedly call this method until all data are hashed, then the hashed value can be obtained through the Value property.")]
  2166. HRESULT Hash([in] BSTR newVal);
  2167. };
  2168. //
  2169. // IUtilities
  2170. //
  2171. [
  2172. object,
  2173. uuid(EB166CF6-2AE6-44DA-BD96-0C1635D183FE),
  2174. dual,
  2175. helpstring("IUtilities Interface"),
  2176. pointer_default(unique)
  2177. ]
  2178. interface IUtilities : IDispatch
  2179. {
  2180. [id(1), helpstring("Method to get a secure random number.")]
  2181. HRESULT GetRandom([in, defaultvalue(8)] long Length,
  2182. [in, defaultvalue(CAPICOM_ENCODE_BINARY)] CAPICOM_ENCODING_TYPE EncodingType,
  2183. [out, retval] BSTR * pVal);
  2184. [id(2), helpstring("Method to Base64 encode a string.")]
  2185. HRESULT Base64Encode([in] BSTR SrcString,
  2186. [out, retval] BSTR * pVal);
  2187. [id(3), helpstring("Method to Base64 decode a string.")]
  2188. HRESULT Base64Decode([in] BSTR EncodedString,
  2189. [out, retval] BSTR * pVal);
  2190. [id(4), helpstring("Method to convert a binary packed string to hex string.")]
  2191. HRESULT BinaryToHex([in] BSTR BinaryString,
  2192. [out, retval] BSTR * pVal);
  2193. [id(5), helpstring("Method to convert a hex string to binary packed string.")]
  2194. HRESULT HexToBinary([in] BSTR HexString,
  2195. [out, retval] BSTR * pVal);
  2196. [id(6), helpstring("Method to convert binary packed string to an array of bytes (VT_ARRAY | VT_UI1).")]
  2197. HRESULT BinaryStringToByteArray([in] BSTR BinaryString,
  2198. [out,retval] VARIANT * pVal);
  2199. [id(7), helpstring("Method to convert an array of bytes (VT_ARRAY | VT_UI1) to binary packed string.")]
  2200. HRESULT ByteArrayToBinaryString([in] VARIANT varByteArray,
  2201. [out,retval] BSTR * pVal);
  2202. [id(8), helpstring("Method to convert local time to UTC time.")]
  2203. HRESULT LocalTimeToUTCTime([in] DATE LocalTime,
  2204. [out, retval] DATE * pVal);
  2205. [id(9), helpstring("Method to convert UTC time to local time.")]
  2206. HRESULT UTCTimeToLocalTime([in] DATE UTCTime,
  2207. [out, retval] DATE * pVal);
  2208. };
  2209. ////////////////////////////////////////////////////////////////////////////////
  2210. //
  2211. // Custom interfaces.
  2212. //
  2213. //
  2214. // ICertContext
  2215. //
  2216. [
  2217. object,
  2218. uuid(9E7D3477-4F63-423E-8A45-E13B2BB851A2),
  2219. local,
  2220. helpstring("ICertContext Interface"),
  2221. pointer_default(unique)
  2222. ]
  2223. interface ICertContext : IUnknown
  2224. {
  2225. [propget, helpstring("Poperty to get PCCERT_CONTEXT of the certificate which is represented as a long. Note that you MUST call either the FreeContext method or CAPI's CertFreeCertificateContext() function, to free the context.")]
  2226. HRESULT CertContext([out, retval] long * ppCertContext);
  2227. [propput, helpstring("Property to set PCCERT_CONTEXT. Note that setting this property will reset the entire Certificate object.")]
  2228. HRESULT CertContext([in] long pCertContext);
  2229. [helpstring("Method to free a PCCERT_CONTEXT. Note that this method does not free the PCCERT_CONTEXT contained within the Certificate object. It is intended for freeing context acquired through the CertContext property.")]
  2230. HRESULT FreeContext([in] long pCertContext);
  2231. }
  2232. //
  2233. // IChainContext
  2234. //
  2235. [
  2236. object,
  2237. uuid(B27FFB30-432E-4585-A3FD-72530108CBFD),
  2238. local,
  2239. helpstring("IChainContext Interface"),
  2240. pointer_default(unique)
  2241. ]
  2242. interface IChainContext : IUnknown
  2243. {
  2244. [propget, helpstring("Property to get PCCERT_CHAIN_CONTEXT of the certificate chain which is represented as a long. Note that you MUST call either the FreeContext method or CAPI's CertFreeCertificateChain() function to free the context.")]
  2245. HRESULT ChainContext([out, retval] long * pChainContext);
  2246. [propput, helpstring("Poperty to set PCCERT_CHAIN_CONTEXT. Note that setting this property will reset the entire Chain object.")]
  2247. HRESULT ChainContext([in] long pChainContext);
  2248. [helpstring("Method to free a PCCERT_CHAIN_CONTEXT. Note that this method does not free the PCCERT_CHAIN_CONTEXT contained within the Chain object. It is intended for freeing context acquired through the ChainContext property.")]
  2249. HRESULT FreeContext([in] long pChainContext);
  2250. }
  2251. //
  2252. // ICertStore
  2253. //
  2254. [
  2255. object,
  2256. uuid(BB3ECB9C-A83A-445c-BDB5-EFBEF691B731),
  2257. local,
  2258. helpstring("ICertStore Interface"),
  2259. pointer_default(unique)
  2260. ]
  2261. interface ICertStore : IUnknown
  2262. {
  2263. [propget, helpstring("Property to get HCERTSTORE of the certificate store which is represented as a long. Note that you MUST call either the CloseHandle method or CAPI's CertCloseStore() function to close the handle.")]
  2264. HRESULT StoreHandle([out, retval] long * phCertStore);
  2265. [propput, helpstring("Property to set HCERTSTORE. Note that setting this property will reset the entire Store object.")]
  2266. HRESULT StoreHandle([in] long hCertStore);
  2267. [propget, helpstring("Property to get CAPICOM_STORE_LOCATION of the certificate store.")]
  2268. HRESULT StoreLocation([out, retval] CAPICOM_STORE_LOCATION * pStoreLocation);
  2269. [propput, helpstring("Property to set CAPICOM_STORE_LOCATION.")]
  2270. HRESULT StoreLocation([in] CAPICOM_STORE_LOCATION StoreLocation);
  2271. [helpstring("Method to close a HCERTSTORE. Note that this method does not close the HCERTSTORE contained within the Store object. It is intended for closing handle acquired through the StoreHandle property.")]
  2272. HRESULT CloseHandle([in] long hCertStore);
  2273. }
  2274. //
  2275. // ICSigner
  2276. //
  2277. [
  2278. object,
  2279. uuid(8F83F792-014C-4E22-BD57-5C381E622F34),
  2280. local,
  2281. restricted,
  2282. helpstring("ICSigner Interface"),
  2283. pointer_default(unique)
  2284. ]
  2285. interface ICSigner : IUnknown
  2286. {
  2287. [propget, helpstring("Property to get HCERSTORE of the additional certificate store which is represented as a long.")]
  2288. HRESULT AdditionalStore([out, retval] long * phAdditionalStore);
  2289. [propput, helpstring("Property to set the additional certificate store handle.")]
  2290. HRESULT AdditionalStore([in] long hAdditionalStore);
  2291. }
  2292. ////////////////////////////////////////////////////////////////////////////////
  2293. //
  2294. // Restricted custom interfaces.
  2295. //
  2296. //
  2297. // ICCertificates
  2298. //
  2299. [
  2300. object,
  2301. uuid(EBDC6DC2-684D-4425-BBB7-CB4D15A088A7),
  2302. local,
  2303. restricted,
  2304. helpstring("ICCertificates Interface"),
  2305. pointer_default(unique)
  2306. ]
  2307. interface ICCertificates : IUnknown
  2308. {
  2309. [restricted] HRESULT _ExportToStore([in] HCERTSTORE hCertStore);
  2310. }
  2311. //
  2312. // ICPrivateKey
  2313. //
  2314. [
  2315. object,
  2316. uuid(50F241B7-A8F2-4e0a-B982-4BD7DF0CCF3C),
  2317. local,
  2318. restricted,
  2319. helpstring("ICPrivateKey Interface"),
  2320. pointer_default(unique)
  2321. ]
  2322. interface ICPrivateKey : IUnknown
  2323. {
  2324. [restricted] HRESULT _GetKeyProvInfo([out, retval] PCRYPT_KEY_PROV_INFO * pKeyProvInfo);
  2325. }