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.

1437 lines
32 KiB

  1. // xenroll.idl : IDL source for xenroll.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (xenroll.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. import "ocidl.idl";
  7. import "wincrypt.idl";
  8. //+--------------------------------------------------------------------------
  9. // interface ICEnroll
  10. [
  11. object,
  12. uuid(43F8F288-7A20-11D0-8F06-00C04FC295E1),
  13. dual,
  14. helpstring("ICEnroll Interface"),
  15. pointer_default(unique)
  16. ]
  17. interface ICEnroll : IDispatch
  18. {
  19. //
  20. // Walk the end user through the process of generating a key
  21. // pair, which either will or will not be required to use some form
  22. // of hardware private key management, per the fRequireHardware
  23. // parameter. Return to the caller a PKCS#10 of the resulting
  24. // generated key, where in the subject name
  25. //
  26. HRESULT createFilePKCS10(
  27. [in] BSTR DNName,
  28. [in] BSTR Usage,
  29. [in] BSTR wszPKCS10FileName
  30. );
  31. //
  32. // Accept delivery of the credentials that correspond to a previous
  33. // call to GenerateKeyPair. This method puts the credentials
  34. // whereever they are supposed to go for easy subsequent access
  35. // by the user.
  36. //
  37. HRESULT acceptFilePKCS7(
  38. [in] BSTR wszPKCS7FileName
  39. );
  40. HRESULT createPKCS10(
  41. // This is the DN name for the certificate in X500 name syntax.
  42. // For example CN=KeithV
  43. [in] BSTR DNName,
  44. // This is the usage string, it will end up in the certificate
  45. // enumerating what the certificate is used for. For example
  46. // ClientAuth, Or CodeSigning. It can be any string.
  47. [in] BSTR Usage,
  48. // The return value is a Base64 encoded
  49. // PKCS10 Cert Request
  50. [out, retval] BSTR* pPKCS10
  51. );
  52. //
  53. // Accept delivery of the credentials that correspond to a previous
  54. // call to GenerateKeyPair. This method puts the credentials
  55. // whereever they are supposed to go for easy subsequent access
  56. // by the user.
  57. //
  58. HRESULT acceptPKCS7(
  59. //
  60. // The credentials that are to be stored. Credentials
  61. // are a PKCS#7 SignedData that is used simply as a bucket
  62. // to convey a bunch of certificates. There must be precisely
  63. // one certificate with no child in the bucket.
  64. //
  65. [in] BSTR PKCS7
  66. );
  67. HRESULT getCertFromPKCS7(
  68. [in] BSTR wszPKCS7,
  69. [out, retval] BSTR* pbstrCert
  70. );
  71. HRESULT enumProviders(
  72. [in] LONG dwIndex,
  73. [in] LONG dwFlags,
  74. [out, retval] BSTR* pbstrProvName
  75. );
  76. HRESULT enumContainers(
  77. [in] LONG dwIndex,
  78. [out, retval] BSTR* pbstr
  79. );
  80. //
  81. // Session Id's must be appropriately clean up
  82. //
  83. HRESULT freeRequestInfo(
  84. //
  85. // The session Id that represents the data
  86. //
  87. [in] BSTR PKCS7OrPKCS10
  88. );
  89. [propget]
  90. HRESULT MyStoreName(
  91. [out, retval] BSTR * pbstrName
  92. );
  93. [propput]
  94. HRESULT MyStoreName(
  95. [in] BSTR bstrName
  96. );
  97. [propget]
  98. HRESULT MyStoreType(
  99. [out, retval] BSTR * pbstrType
  100. );
  101. [propput]
  102. HRESULT MyStoreType(
  103. [in] BSTR bstrType
  104. );
  105. [propget]
  106. HRESULT MyStoreFlags(
  107. [out, retval] LONG * pdwFlags
  108. );
  109. [propput]
  110. HRESULT MyStoreFlags(
  111. [in] LONG dwFlags
  112. );
  113. [propget]
  114. HRESULT CAStoreName(
  115. [out, retval] BSTR * pbstrName
  116. );
  117. [propput]
  118. HRESULT CAStoreName(
  119. [in] BSTR bstrName
  120. );
  121. [propget]
  122. HRESULT CAStoreType(
  123. [out, retval] BSTR * pbstrType
  124. );
  125. [propput]
  126. HRESULT CAStoreType(
  127. [in] BSTR bstrType
  128. );
  129. [propget]
  130. HRESULT CAStoreFlags(
  131. [out, retval] LONG * pdwFlags
  132. );
  133. [propput]
  134. HRESULT CAStoreFlags(
  135. [in] LONG dwFlags
  136. );
  137. [propget]
  138. HRESULT RootStoreName(
  139. [out, retval] BSTR * pbstrName
  140. );
  141. [propput]
  142. HRESULT RootStoreName(
  143. [in] BSTR bstrName
  144. );
  145. [propget]
  146. HRESULT RootStoreType(
  147. [out, retval] BSTR * pbstrType
  148. );
  149. [propput]
  150. HRESULT RootStoreType(
  151. [in] BSTR bstrType
  152. );
  153. [propget]
  154. HRESULT RootStoreFlags(
  155. [out, retval] LONG * pdwFlags
  156. );
  157. [propput]
  158. HRESULT RootStoreFlags(
  159. [in] LONG dwFlags
  160. );
  161. [propget]
  162. HRESULT RequestStoreName(
  163. [out, retval] BSTR * pbstrName
  164. );
  165. [propput]
  166. HRESULT RequestStoreName(
  167. [in] BSTR bstrName
  168. );
  169. [propget]
  170. HRESULT RequestStoreType(
  171. [out, retval] BSTR * pbstrType
  172. );
  173. [propput]
  174. HRESULT RequestStoreType(
  175. [in] BSTR bstrType
  176. );
  177. [propget]
  178. HRESULT RequestStoreFlags(
  179. [out, retval] LONG * pdwFlags
  180. );
  181. [propput]
  182. HRESULT RequestStoreFlags(
  183. [in] LONG dwFlags
  184. );
  185. [propget]
  186. HRESULT ContainerName(
  187. [out, retval] BSTR * pbstrContainer
  188. );
  189. [propput]
  190. HRESULT ContainerName(
  191. [in] BSTR bstrContainer
  192. );
  193. [propget]
  194. HRESULT ProviderName(
  195. [out, retval] BSTR * pbstrProvider
  196. );
  197. [propput]
  198. HRESULT ProviderName(
  199. [in] BSTR bstrProvider
  200. );
  201. [propget]
  202. HRESULT ProviderType(
  203. [out, retval] LONG * pdwType
  204. );
  205. [propput]
  206. HRESULT ProviderType(
  207. [in] LONG dwType
  208. );
  209. [propget]
  210. HRESULT KeySpec(
  211. [out, retval] LONG * pdw
  212. );
  213. [propput]
  214. HRESULT KeySpec(
  215. [in] LONG dw
  216. );
  217. [propget]
  218. HRESULT ProviderFlags(
  219. [out, retval] LONG * pdwFlags
  220. );
  221. [propput]
  222. HRESULT ProviderFlags(
  223. [in] LONG dwFlags
  224. );
  225. [propget]
  226. HRESULT UseExistingKeySet(
  227. [out, retval] BOOL * fUseExistingKeys
  228. );
  229. [propput]
  230. HRESULT UseExistingKeySet(
  231. [in] BOOL fUseExistingKeys
  232. );
  233. [propget]
  234. HRESULT GenKeyFlags(
  235. [out, retval] LONG * pdwFlags
  236. );
  237. [propput]
  238. HRESULT GenKeyFlags(
  239. [in] LONG dwFlags
  240. );
  241. [propget]
  242. HRESULT DeleteRequestCert(
  243. [out, retval] BOOL * fDelete
  244. );
  245. [propput]
  246. HRESULT DeleteRequestCert(
  247. [in] BOOL fDelete
  248. );
  249. [propget]
  250. HRESULT WriteCertToCSP(
  251. [out, retval] BOOL * fBool
  252. );
  253. [propput]
  254. HRESULT WriteCertToCSP(
  255. [in] BOOL fBool
  256. );
  257. [propget]
  258. HRESULT SPCFileName(
  259. [out, retval] BSTR * pbstr
  260. );
  261. [propput]
  262. HRESULT SPCFileName(
  263. [in] BSTR bstr
  264. );
  265. [propget]
  266. HRESULT PVKFileName(
  267. [out, retval] BSTR * pbstr
  268. );
  269. [propput]
  270. HRESULT PVKFileName(
  271. [in] BSTR bstr
  272. );
  273. [propget]
  274. HRESULT HashAlgorithm(
  275. [out, retval] BSTR * pbstr
  276. );
  277. [propput]
  278. HRESULT HashAlgorithm(
  279. [in] BSTR bstr
  280. );
  281. };
  282. //+--------------------------------------------------------------------------
  283. // interface ICEnroll2
  284. [
  285. object,
  286. uuid(704ca730-c90b-11d1-9bec-00c04fc295e1),
  287. dual,
  288. helpstring("ICEnroll2 Interface"),
  289. pointer_default(unique)
  290. ]
  291. interface ICEnroll2 : ICEnroll
  292. {
  293. HRESULT addCertTypeToRequest(
  294. [in] BSTR CertType
  295. );
  296. HRESULT addNameValuePairToSignature(
  297. [in] BSTR Name,
  298. [in] BSTR Value
  299. );
  300. [propget]
  301. HRESULT WriteCertToUserDS(
  302. [out, retval] BOOL * fBool
  303. );
  304. [propput]
  305. HRESULT WriteCertToUserDS(
  306. [in] BOOL fBool
  307. );
  308. [propget]
  309. HRESULT EnableT61DNEncoding(
  310. [out, retval] BOOL * fBool
  311. );
  312. [propput]
  313. HRESULT EnableT61DNEncoding(
  314. [in] BOOL fBool
  315. );
  316. };
  317. //+--------------------------------------------------------------------------
  318. // interface ICEnroll3
  319. [
  320. object,
  321. uuid(c28c2d95-b7de-11d2-a421-00c04f79fe8e),
  322. dual,
  323. helpstring("ICEnroll3 Interface"),
  324. pointer_default(unique)
  325. ]
  326. interface ICEnroll3 : ICEnroll2
  327. {
  328. HRESULT InstallPKCS7(
  329. [in] BSTR PKCS7
  330. );
  331. HRESULT Reset(
  332. void
  333. );
  334. HRESULT GetSupportedKeySpec(
  335. [out, retval] LONG * pdwKeySpec
  336. );
  337. HRESULT GetKeyLen(
  338. [in] BOOL fMin,
  339. [in] BOOL fExchange,
  340. [out, retval] LONG * pdwKeySize
  341. );
  342. HRESULT EnumAlgs(
  343. [in] LONG dwIndex,
  344. [in] LONG algClass,
  345. [out, retval] LONG * pdwAlgID
  346. );
  347. HRESULT GetAlgName(
  348. [in] LONG algID,
  349. [out, retval] BSTR * pbstr
  350. );
  351. [propput]
  352. HRESULT ReuseHardwareKeyIfUnableToGenNew(
  353. [in] BOOL fReuseHardwareKeyIfUnableToGenNew
  354. );
  355. [propget]
  356. HRESULT ReuseHardwareKeyIfUnableToGenNew(
  357. [out, retval] BOOL * fReuseHardwareKeyIfUnableToGenNew
  358. );
  359. [propput]
  360. HRESULT HashAlgID(
  361. [in] LONG hashAlgID
  362. );
  363. [propget]
  364. HRESULT HashAlgID(
  365. [out, retval] LONG * hashAlgID
  366. );
  367. [propput]
  368. HRESULT LimitExchangeKeyToEncipherment(
  369. [in] BOOL fLimitExchangeKeyToEncipherment
  370. );
  371. [propget]
  372. HRESULT LimitExchangeKeyToEncipherment(
  373. [out, retval] BOOL * fLimitExchangeKeyToEncipherment
  374. );
  375. [propput]
  376. HRESULT EnableSMIMECapabilities(
  377. [in] BOOL fEnableSMIMECapabilities
  378. );
  379. [propget]
  380. HRESULT EnableSMIMECapabilities(
  381. [out, retval] BOOL * fEnableSMIMECapabilities
  382. );
  383. };
  384. //+--------------------------------------------------------------------------
  385. // interface ICEnroll4
  386. [
  387. object,
  388. uuid(c1f1188a-2eb5-4a80-841b-7e729a356d90),
  389. dual,
  390. helpstring("ICEnroll4 Interface"),
  391. pointer_default(unique)
  392. ]
  393. interface ICEnroll4 : ICEnroll3
  394. {
  395. [propput]
  396. HRESULT PrivateKeyArchiveCertificate(
  397. [in] BSTR bstrCert
  398. );
  399. [propget]
  400. HRESULT PrivateKeyArchiveCertificate(
  401. [out, retval] BSTR *pbstrCert
  402. );
  403. [propput]
  404. HRESULT ThumbPrint(
  405. [in] BSTR bstrThumbPrint
  406. );
  407. [propget]
  408. HRESULT ThumbPrint(
  409. [out, retval] BSTR *pbstrThumbPrint
  410. );
  411. HRESULT binaryToString(
  412. [in] LONG Flags,
  413. [in] BSTR strBinary,
  414. [out, retval] BSTR *pstrEncoded
  415. );
  416. HRESULT stringToBinary(
  417. [in] LONG Flags,
  418. [in] BSTR strEncoded,
  419. [out, retval] BSTR *pstrBinary
  420. );
  421. HRESULT addExtensionToRequest(
  422. [in] LONG Flags,
  423. [in] BSTR strName,
  424. [in] BSTR strValue
  425. );
  426. HRESULT addAttributeToRequest(
  427. [in] LONG Flags,
  428. [in] BSTR strName,
  429. [in] BSTR strValue
  430. );
  431. HRESULT addNameValuePairToRequest(
  432. [in] LONG Flags,
  433. [in] BSTR strName,
  434. [in] BSTR strValue
  435. );
  436. HRESULT resetExtensions(
  437. void
  438. );
  439. HRESULT resetAttributes(
  440. void
  441. );
  442. HRESULT createRequest(
  443. [in] LONG Flags,
  444. [in] BSTR strDNName,
  445. [in] BSTR Usage,
  446. [out, retval] BSTR *pstrRequest
  447. );
  448. HRESULT createFileRequest(
  449. [in] LONG Flags ,
  450. [in] BSTR strDNName,
  451. [in] BSTR strUsage,
  452. [in] BSTR strRequestFileName
  453. );
  454. HRESULT acceptResponse(
  455. [in] BSTR strResponse
  456. );
  457. HRESULT acceptFileResponse(
  458. [in] BSTR strResponseFileName
  459. );
  460. HRESULT getCertFromResponse(
  461. [in] BSTR strResponse,
  462. [out, retval] BSTR *pstrCert
  463. );
  464. HRESULT getCertFromFileResponse(
  465. [in] BSTR strResponseFileName,
  466. [out, retval] BSTR *pstrCert
  467. );
  468. HRESULT createPFX(
  469. [in] BSTR strPassword,
  470. [out, retval] BSTR *pstrPFX
  471. );
  472. HRESULT createFilePFX(
  473. [in] BSTR strPassword,
  474. [in] BSTR strPFXFileName
  475. );
  476. HRESULT setPendingRequestInfo(
  477. [in] LONG lRequestID,
  478. [in] BSTR strCADNS,
  479. [in] BSTR strCAName,
  480. [in] BSTR strFriendlyName
  481. );
  482. HRESULT enumPendingRequest(
  483. [in] LONG lIndex,
  484. [in] LONG lDesiredProperty,
  485. [out, retval] VARIANT *pvarProperty
  486. );
  487. HRESULT removePendingRequest(
  488. [in] BSTR strThumbprint
  489. );
  490. HRESULT GetKeyLenEx(
  491. [in] LONG lSizeSpec,
  492. [in] LONG lKeySpec,
  493. [out, retval] LONG * pdwKeySize
  494. );
  495. HRESULT InstallPKCS7Ex(
  496. [in] BSTR PKCS7,
  497. [out, retval] LONG * plCertInstalled
  498. );
  499. HRESULT addCertTypeToRequestEx(
  500. [in] LONG lType,
  501. [in] BSTR bstrOIDOrName,
  502. [in] LONG lMajorVersion,
  503. [in] BOOL fMinorVersion,
  504. [in] LONG lMinorVersion
  505. );
  506. HRESULT getProviderType(
  507. [in] BSTR strProvName,
  508. [out, retval] LONG *plProvType
  509. );
  510. [propput]
  511. HRESULT SignerCertificate(
  512. [in] BSTR bstrCert
  513. );
  514. [propput]
  515. HRESULT ClientId(
  516. [in] LONG lClientId
  517. );
  518. [propget]
  519. HRESULT ClientId(
  520. [out, retval] LONG *plClientId
  521. );
  522. HRESULT addBlobPropertyToCertificate(
  523. [in] LONG lPropertyId,
  524. [in] LONG lReserved,
  525. [in] BSTR bstrProperty
  526. );
  527. HRESULT resetBlobProperties(
  528. void
  529. );
  530. [propput]
  531. HRESULT IncludeSubjectKeyID(
  532. [in] BOOL fInclude
  533. );
  534. [propget]
  535. HRESULT IncludeSubjectKeyID(
  536. [out, retval] BOOL *pfInclude
  537. );
  538. };
  539. //+--------------------------------------------------------------------------
  540. // interface IEnroll
  541. [
  542. object,
  543. uuid(acaa7838-4585-11d1-ab57-00c04fc295e1),
  544. local,
  545. helpstring("IEnroll Interface"),
  546. pointer_default(unique)
  547. ]
  548. interface IEnroll : IUnknown
  549. {
  550. //
  551. // Walk the end user through the process of generating a key
  552. // pair, which either will or will not be required to use some form
  553. // of hardware private key management, per the fRequireHardware
  554. // parameter. Return to the caller a PKCS#10 of the resulting
  555. // generated key, where in the subject name
  556. //
  557. HRESULT createFilePKCS10WStr(
  558. [in] LPCWSTR DNName,
  559. [in] LPCWSTR Usage,
  560. [in] LPCWSTR wszPKCS10FileName
  561. );
  562. //
  563. // Accept delivery of the credentials that correspond to a previous
  564. // call to GenerateKeyPair. This method puts the credentials
  565. // whereever they are supposed to go for easy subsequent access
  566. // by the user.
  567. //
  568. HRESULT acceptFilePKCS7WStr(
  569. [in] LPCWSTR wszPKCS7FileName
  570. );
  571. HRESULT createPKCS10WStr(
  572. // This is the DN name for the certificate in X500 name syntax.
  573. // For example CN=KeithV
  574. [in] LPCWSTR DNName,
  575. // This is the usage string, it will end up in the certificate
  576. // enumerating what the certificate is used for. For example
  577. // ClientAuth, Or CodeSigning. It can be any string.
  578. [in] LPCWSTR Usage,
  579. // The return value is a Base64 encoded
  580. // PKCS10 Cert Request
  581. [out] PCRYPT_DATA_BLOB pPkcs10Blob
  582. );
  583. //
  584. // Accept delivery of the credentials that correspond to a previous
  585. // call to GenerateKeyPair. This method puts the credentials
  586. // whereever they are supposed to go for easy subsequent access
  587. // by the user.
  588. //
  589. HRESULT acceptPKCS7Blob(
  590. //
  591. // The credentials that are to be stored. Credentials
  592. // are a PKCS#7 SignedData that is used simply as a bucket
  593. // to convey a bunch of certificates. There must be precisely
  594. // one certificate with no child in the bucket.
  595. //
  596. [in] PCRYPT_DATA_BLOB pBlobPKCS7
  597. );
  598. PCCERT_CONTEXT getCertContextFromPKCS7(
  599. [in] PCRYPT_DATA_BLOB pBlobPKCS7
  600. );
  601. HCERTSTORE getMyStore(
  602. void
  603. );
  604. HCERTSTORE getCAStore(
  605. void
  606. );
  607. HCERTSTORE getROOTHStore(
  608. void
  609. );
  610. HRESULT enumProvidersWStr(
  611. [in] LONG dwIndex,
  612. [in] LONG dwFlags,
  613. [out] LPWSTR * pbstrProvName
  614. );
  615. HRESULT enumContainersWStr(
  616. [in] LONG dwIndex,
  617. [out] LPWSTR * pbstr
  618. );
  619. //
  620. // Session Id's must be appropriately clean up
  621. //
  622. HRESULT freeRequestInfoBlob(
  623. //
  624. // The session Id that represents the data
  625. //
  626. [in] CRYPT_DATA_BLOB pkcs7OrPkcs10
  627. );
  628. [propget]
  629. HRESULT MyStoreNameWStr(
  630. [out] LPWSTR * szwName
  631. );
  632. [propput]
  633. HRESULT MyStoreNameWStr(
  634. [in] LPWSTR szwName
  635. );
  636. [propget]
  637. HRESULT MyStoreTypeWStr(
  638. [out] LPWSTR * szwType
  639. );
  640. [propput]
  641. HRESULT MyStoreTypeWStr(
  642. [in] LPWSTR szwType
  643. );
  644. [propget]
  645. HRESULT MyStoreFlags(
  646. [out] LONG * pdwFlags
  647. );
  648. [propput]
  649. HRESULT MyStoreFlags(
  650. [in] LONG dwFlags
  651. );
  652. [propget]
  653. HRESULT CAStoreNameWStr(
  654. [out] LPWSTR * szwName
  655. );
  656. [propput]
  657. HRESULT CAStoreNameWStr(
  658. [in] LPWSTR szwName
  659. );
  660. [propget]
  661. HRESULT CAStoreTypeWStr(
  662. [out] LPWSTR * szwType
  663. );
  664. [propput]
  665. HRESULT CAStoreTypeWStr(
  666. [in] LPWSTR szwType
  667. );
  668. [propget]
  669. HRESULT CAStoreFlags(
  670. [out] LONG * pdwFlags
  671. );
  672. [propput]
  673. HRESULT CAStoreFlags(
  674. [in] LONG dwFlags
  675. );
  676. [propget]
  677. HRESULT RootStoreNameWStr(
  678. [out] LPWSTR * szwName
  679. );
  680. [propput]
  681. HRESULT RootStoreNameWStr(
  682. [in] LPWSTR szwName
  683. );
  684. [propget]
  685. HRESULT RootStoreTypeWStr(
  686. [out] LPWSTR * szwType
  687. );
  688. [propput]
  689. HRESULT RootStoreTypeWStr(
  690. [in] LPWSTR szwType
  691. );
  692. [propget]
  693. HRESULT RootStoreFlags(
  694. [out] LONG * pdwFlags
  695. );
  696. [propput]
  697. HRESULT RootStoreFlags(
  698. [in] LONG dwFlags
  699. );
  700. [propget]
  701. HRESULT RequestStoreNameWStr(
  702. [out] LPWSTR * szwName
  703. );
  704. [propput]
  705. HRESULT RequestStoreNameWStr(
  706. [in] LPWSTR szwName
  707. );
  708. [propget]
  709. HRESULT RequestStoreTypeWStr(
  710. [out] LPWSTR * szwType
  711. );
  712. [propput]
  713. HRESULT RequestStoreTypeWStr(
  714. [in] LPWSTR szwType
  715. );
  716. [propget]
  717. HRESULT RequestStoreFlags(
  718. [out] LONG * pdwFlags
  719. );
  720. [propput]
  721. HRESULT RequestStoreFlags(
  722. [in] LONG dwFlags
  723. );
  724. [propget]
  725. HRESULT ContainerNameWStr(
  726. [out] LPWSTR * szwContainer
  727. );
  728. [propput]
  729. HRESULT ContainerNameWStr(
  730. [in] LPWSTR szwContainer
  731. );
  732. [propget]
  733. HRESULT ProviderNameWStr(
  734. [out] LPWSTR * szwProvider
  735. );
  736. [propput]
  737. HRESULT ProviderNameWStr(
  738. [in] LPWSTR szwProvider
  739. );
  740. [propget]
  741. HRESULT ProviderType(
  742. [out] LONG * pdwType
  743. );
  744. [propput]
  745. HRESULT ProviderType(
  746. [in] LONG dwType
  747. );
  748. [propget]
  749. HRESULT KeySpec(
  750. [out] LONG * pdw
  751. );
  752. [propput]
  753. HRESULT KeySpec(
  754. [in] LONG dw
  755. );
  756. [propget]
  757. HRESULT ProviderFlags(
  758. [out] LONG * pdwFlags
  759. );
  760. [propput]
  761. HRESULT ProviderFlags(
  762. [in] LONG dwFlags
  763. );
  764. [propget]
  765. HRESULT UseExistingKeySet(
  766. [out] BOOL * fUseExistingKeys
  767. );
  768. [propput]
  769. HRESULT UseExistingKeySet(
  770. [in] BOOL fUseExistingKeys
  771. );
  772. [propget]
  773. HRESULT GenKeyFlags(
  774. [out] LONG * pdwFlags
  775. );
  776. [propput]
  777. HRESULT GenKeyFlags(
  778. [in] LONG dwFlags
  779. );
  780. [propget]
  781. HRESULT DeleteRequestCert(
  782. [out] BOOL * fDelete
  783. );
  784. [propput]
  785. HRESULT DeleteRequestCert(
  786. [in] BOOL fDelete
  787. );
  788. [propget]
  789. HRESULT WriteCertToUserDS(
  790. [out] BOOL * fBool
  791. );
  792. [propput]
  793. HRESULT WriteCertToUserDS(
  794. [in] BOOL fBool
  795. );
  796. [propget]
  797. HRESULT EnableT61DNEncoding(
  798. [out] BOOL * fBool
  799. );
  800. [propput]
  801. HRESULT EnableT61DNEncoding(
  802. [in] BOOL fBool
  803. );
  804. [propget]
  805. HRESULT WriteCertToCSP(
  806. [out] BOOL * fBool
  807. );
  808. [propput]
  809. HRESULT WriteCertToCSP(
  810. [in] BOOL fBool
  811. );
  812. [propget]
  813. HRESULT SPCFileNameWStr(
  814. [out] LPWSTR * szw
  815. );
  816. [propput]
  817. HRESULT SPCFileNameWStr(
  818. [in] LPWSTR szw
  819. );
  820. [propget]
  821. HRESULT PVKFileNameWStr(
  822. [out] LPWSTR * szw
  823. );
  824. [propput]
  825. HRESULT PVKFileNameWStr(
  826. [in] LPWSTR szw
  827. );
  828. [propget]
  829. HRESULT HashAlgorithmWStr(
  830. [out] LPWSTR * szw
  831. );
  832. [propput]
  833. HRESULT HashAlgorithmWStr(
  834. [in] LPWSTR szw
  835. );
  836. [propget]
  837. HRESULT RenewalCertificate(
  838. [out] PCCERT_CONTEXT * ppCertContext
  839. );
  840. [propput]
  841. HRESULT RenewalCertificate(
  842. [in] PCCERT_CONTEXT pCertContext
  843. );
  844. HRESULT AddCertTypeToRequestWStr(
  845. [in] LPWSTR szw
  846. );
  847. HRESULT AddNameValuePairToSignatureWStr(
  848. [in] LPWSTR Name,
  849. [in] LPWSTR Value
  850. );
  851. HRESULT AddExtensionsToRequest(
  852. [in] PCERT_EXTENSIONS pCertExtensions
  853. );
  854. HRESULT AddAuthenticatedAttributesToPKCS7Request(
  855. [in] PCRYPT_ATTRIBUTES pAttributes
  856. );
  857. HRESULT CreatePKCS7RequestFromRequest(
  858. [in] PCRYPT_DATA_BLOB pRequest,
  859. [in] PCCERT_CONTEXT pSigningCertContext,
  860. [out] PCRYPT_DATA_BLOB pPkcs7Blob
  861. );
  862. };
  863. //+--------------------------------------------------------------------------
  864. // interface IEnroll2
  865. [
  866. object,
  867. uuid(c080e199-b7df-11d2-a421-00c04f79fe8e),
  868. local,
  869. helpstring("IEnroll2 Interface"),
  870. pointer_default(unique)
  871. ]
  872. interface IEnroll2 : IEnroll
  873. {
  874. HRESULT InstallPKCS7Blob(
  875. [in] PCRYPT_DATA_BLOB pBlobPKCS7
  876. );
  877. HRESULT Reset(
  878. void
  879. );
  880. HRESULT GetSupportedKeySpec(
  881. [out] LONG * pdwKeySpec
  882. );
  883. HRESULT GetKeyLen(
  884. [in] BOOL fMin,
  885. [in] BOOL fExchange,
  886. [out] LONG * pdwKeySize
  887. );
  888. HRESULT EnumAlgs(
  889. [in] LONG dwIndex,
  890. [in] LONG algClass,
  891. [out] LONG * pdwAlgID
  892. );
  893. HRESULT GetAlgNameWStr(
  894. [in] LONG algID,
  895. [out] LPWSTR * ppwsz
  896. );
  897. [propput]
  898. HRESULT ReuseHardwareKeyIfUnableToGenNew(
  899. [in] BOOL fReuseHardwareKeyIfUnableToGenNew
  900. );
  901. [propget]
  902. HRESULT ReuseHardwareKeyIfUnableToGenNew(
  903. [out] BOOL * fReuseHardwareKeyIfUnableToGenNew
  904. );
  905. [propput]
  906. HRESULT HashAlgID(
  907. [in] LONG hashAlgID
  908. );
  909. [propget]
  910. HRESULT HashAlgID(
  911. [out, retval] LONG * hashAlgID
  912. );
  913. HRESULT SetHStoreMy(
  914. [in] HCERTSTORE hStore
  915. );
  916. HRESULT SetHStoreCA(
  917. [in] HCERTSTORE hStore
  918. );
  919. HRESULT SetHStoreROOT(
  920. [in] HCERTSTORE hStore
  921. );
  922. HRESULT SetHStoreRequest(
  923. [in] HCERTSTORE hStore
  924. );
  925. [propput]
  926. HRESULT LimitExchangeKeyToEncipherment(
  927. [in] BOOL fLimitExchangeKeyToEncipherment
  928. );
  929. [propget]
  930. HRESULT LimitExchangeKeyToEncipherment(
  931. [out, retval] BOOL * fLimitExchangeKeyToEncipherment
  932. );
  933. [propput]
  934. HRESULT EnableSMIMECapabilities(
  935. [in] BOOL fEnableSMIMECapabilities
  936. );
  937. [propget]
  938. HRESULT EnableSMIMECapabilities(
  939. [out, retval] BOOL * fEnableSMIMECapabilities
  940. );
  941. };
  942. //+--------------------------------------------------------------------------
  943. // interface IEnroll4
  944. [
  945. object,
  946. uuid(f8053fe5-78f4-448f-a0db-41d61b73446b),
  947. local,
  948. helpstring("IEnroll4 Interface"),
  949. pointer_default(unique)
  950. ]
  951. interface IEnroll4 : IEnroll2
  952. {
  953. [propput]
  954. HRESULT ThumbPrintWStr(
  955. [in] CRYPT_DATA_BLOB thumbPrintBlob
  956. );
  957. [propget]
  958. HRESULT ThumbPrintWStr(
  959. [out, retval] PCRYPT_DATA_BLOB thumbPrintBlob
  960. );
  961. HRESULT SetPrivateKeyArchiveCertificate(
  962. [in] PCCERT_CONTEXT pPrivateKeyArchiveCert
  963. );
  964. PCCERT_CONTEXT GetPrivateKeyArchiveCertificate(
  965. void
  966. );
  967. HRESULT binaryBlobToString(
  968. [in] LONG Flags,
  969. [in] PCRYPT_DATA_BLOB pblobBinary,
  970. [out] LPWSTR *ppwszString
  971. );
  972. HRESULT stringToBinaryBlob(
  973. [in] LONG Flags,
  974. [in] LPCWSTR pwszString,
  975. [out] PCRYPT_DATA_BLOB pblobBinary,
  976. [out] LONG *pdwSkip,
  977. [out] LONG *pdwFlags
  978. );
  979. HRESULT addExtensionToRequestWStr(
  980. [in] LONG Flags,
  981. [in] LPCWSTR pwszName,
  982. [in] PCRYPT_DATA_BLOB pblobValue
  983. );
  984. HRESULT addAttributeToRequestWStr(
  985. [in] LONG Flags,
  986. [in] LPCWSTR pwszName,
  987. [in] PCRYPT_DATA_BLOB pblobValue
  988. );
  989. HRESULT addNameValuePairToRequestWStr(
  990. [in] LONG Flags,
  991. [in] LPCWSTR pwszName,
  992. [in] LPCWSTR pwszValue
  993. );
  994. HRESULT resetExtensions(
  995. void
  996. );
  997. HRESULT resetAttributes(
  998. void
  999. );
  1000. HRESULT createRequestWStr(
  1001. [in] LONG Flags,
  1002. [in] LPCWSTR pwszDNName,
  1003. [in] LPCWSTR pwszUsage,
  1004. [out] PCRYPT_DATA_BLOB pblobRequest
  1005. );
  1006. HRESULT createFileRequestWStr(
  1007. [in] LONG Flags,
  1008. [in] LPCWSTR pwszDNName,
  1009. [in] LPCWSTR pwszUsage,
  1010. [in] LPCWSTR pwszRequestFileName
  1011. );
  1012. HRESULT acceptResponseBlob(
  1013. [in] PCRYPT_DATA_BLOB pblobResponse
  1014. );
  1015. HRESULT acceptFileResponseWStr(
  1016. [in] LPCWSTR pwszResponseFileName
  1017. );
  1018. HRESULT getCertContextFromResponseBlob(
  1019. [in] PCRYPT_DATA_BLOB pblobResponse,
  1020. [out] PCCERT_CONTEXT *ppCertContext
  1021. );
  1022. HRESULT getCertContextFromFileResponseWStr(
  1023. [in] LPCWSTR pwszResponseFileName,
  1024. [out] PCCERT_CONTEXT *ppCertContext
  1025. );
  1026. HRESULT createPFXWStr(
  1027. [in] LPCWSTR pwszPassword,
  1028. [out] PCRYPT_DATA_BLOB pblobPFX
  1029. );
  1030. HRESULT createFilePFXWStr(
  1031. [in] LPCWSTR pwszPassword,
  1032. [in] LPCWSTR pwszPFXFileName
  1033. );
  1034. HRESULT setPendingRequestInfoWStr(
  1035. [in] LONG lRequestID,
  1036. [in] LPCWSTR pwszCADNS,
  1037. [in] LPCWSTR pwszCAName,
  1038. [in] LPCWSTR pwszFriendlyName
  1039. );
  1040. HRESULT enumPendingRequestWStr(
  1041. [in] LONG lIndex,
  1042. [in] LONG lDesiredProperty,
  1043. [out] LPVOID ppProperty
  1044. );
  1045. HRESULT removePendingRequestWStr(
  1046. [in] CRYPT_DATA_BLOB thumbPrintBlob
  1047. );
  1048. HRESULT GetKeyLenEx(
  1049. [in] LONG lSizeSpec,
  1050. [in] LONG lKeySpec,
  1051. [out, retval] LONG * pdwKeySize
  1052. );
  1053. HRESULT InstallPKCS7BlobEx(
  1054. [in] PCRYPT_DATA_BLOB pBlobPKCS7,
  1055. [out, retval] LONG * plCertInstalled
  1056. );
  1057. HRESULT AddCertTypeToRequestWStrEx(
  1058. [in] LONG lType,
  1059. [in] LPCWSTR pwszOIDOrName,
  1060. [in] LONG lMajorVersion,
  1061. [in] BOOL fMinorVersion,
  1062. [in] LONG lMinorVersion
  1063. );
  1064. HRESULT getProviderTypeWStr(
  1065. [in] LPCWSTR pwszProvName,
  1066. [out, retval] LONG * plProvType
  1067. );
  1068. HRESULT addBlobPropertyToCertificateWStr(
  1069. [in] LONG lPropertyId,
  1070. [in] LONG lReserved,
  1071. [in] PCRYPT_DATA_BLOB pBlobProperty
  1072. );
  1073. HRESULT SetSignerCertificate(
  1074. [in] PCCERT_CONTEXT pSignerCert
  1075. );
  1076. [propput]
  1077. HRESULT ClientId(
  1078. [in] LONG lClientId
  1079. );
  1080. [propget]
  1081. HRESULT ClientId(
  1082. [out, retval] LONG *plClientId
  1083. );
  1084. [propput]
  1085. HRESULT IncludeSubjectKeyID(
  1086. [in] BOOL fInclude
  1087. );
  1088. [propget]
  1089. HRESULT IncludeSubjectKeyID(
  1090. [out, retval] BOOL *pfInclude
  1091. );
  1092. };
  1093. //+--------------------------------------------------------------------------
  1094. // library XENROLLLib
  1095. [
  1096. uuid(5b9169c0-db65-42aa-a38a-0726846aaeb3),
  1097. version(1.0),
  1098. helpstring("xenroll 1.0 Type Library")
  1099. ]
  1100. library XENROLLLib
  1101. {
  1102. importlib("stdole32.tlb");
  1103. importlib("stdole2.tlb");
  1104. [
  1105. uuid(127698e4-e730-4e5c-a2b1-21490a70c8a1),
  1106. helpstring("CEnroll Class")
  1107. ]
  1108. coclass CEnroll2
  1109. {
  1110. [default] interface ICEnroll4;
  1111. };
  1112. [
  1113. uuid(43F8F289-7A20-11D0-8F06-00C04FC295E1),
  1114. helpstring("CEnroll Class")
  1115. ]
  1116. coclass CEnroll
  1117. {
  1118. [default] interface ICEnroll4;
  1119. };
  1120. };
  1121. cpp_quote("extern \"C\" IEnroll * WINAPI PIEnrollGetNoCOM(void);")
  1122. cpp_quote("extern \"C\" IEnroll2 * WINAPI PIEnroll2GetNoCOM(void);")
  1123. cpp_quote("extern \"C\" IEnroll4 * WINAPI PIEnroll4GetNoCOM(void);")
  1124. cpp_quote("#define CRYPT_ENUM_ALL_PROVIDERS 0x1")
  1125. //enumPendingRequestInfo types
  1126. cpp_quote("#define XEPR_ENUM_FIRST -1")
  1127. cpp_quote("#define XEPR_CADNS 0x01")
  1128. cpp_quote("#define XEPR_CANAME 0x02")
  1129. cpp_quote("#define XEPR_CAFRIENDLYNAME 0x03")
  1130. cpp_quote("#define XEPR_REQUESTID 0x04")
  1131. cpp_quote("#define XEPR_DATE 0x05")
  1132. cpp_quote("#define XEPR_TEMPLATENAME 0x06")
  1133. cpp_quote("#define XEPR_VERSION 0x07")
  1134. cpp_quote("#define XEPR_HASH 0x08")
  1135. cpp_quote("#define XEPR_V1TEMPLATENAME 0x09")
  1136. cpp_quote("#define XEPR_V2TEMPLATEOID 0x10")
  1137. //createRequest types
  1138. cpp_quote("#define XECR_PKCS10_V2_0 0x1")
  1139. cpp_quote("#define XECR_PKCS7 0x2")
  1140. cpp_quote("#define XECR_CMC 0x3")
  1141. cpp_quote("#define XECR_PKCS10_V1_5 0x4")
  1142. //GetKeyLenEx lSizeSpec types
  1143. cpp_quote("#define XEKL_KEYSIZE_MIN 0x1")
  1144. cpp_quote("#define XEKL_KEYSIZE_MAX 0x2")
  1145. cpp_quote("#define XEKL_KEYSIZE_INC 0x3")
  1146. cpp_quote("#define XEKL_KEYSIZE_DEFAULT 0x4")
  1147. //GetKeyLenEx lKeySpec types
  1148. cpp_quote("#define XEKL_KEYSPEC_KEYX 0x1")
  1149. cpp_quote("#define XEKL_KEYSPEC_SIG 0x2")
  1150. //addCertTypeToRequestEx types
  1151. cpp_quote("#define XECT_EXTENSION_V1 0x1")
  1152. cpp_quote("#define XECT_EXTENSION_V2 0x2")
  1153. //addBlobPropertyToCertificate flags
  1154. cpp_quote("#define XECP_STRING_PROPERTY 0x1")
  1155. //ClientId property
  1156. cpp_quote("#define XECI_DISABLE 0x0")
  1157. cpp_quote("#define XECI_XENROLL 0x1")
  1158. cpp_quote("#define XECI_AUTOENROLL 0x2")
  1159. cpp_quote("#define XECI_REQWIZARD 0x3")
  1160. cpp_quote("#define XECI_CERTREQ 0x4")