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.

1596 lines
34 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1999
  3. Module Name:
  4. logcsp
  5. Abstract:
  6. This header file provides definitions for the logging CSP.
  7. Author:
  8. Doug Barlow (dbarlow) 12/7/1999
  9. Remarks:
  10. ?Remarks?
  11. Notes:
  12. ?Notes?
  13. --*/
  14. #ifndef _LOGCSP_H_
  15. #define _LOGCSP_H_
  16. #include <wincrypt.h>
  17. #include <cspdk.h>
  18. #include <cspUtils.h>
  19. // #define entrypoint
  20. #define entrypoint breakpoint
  21. typedef BOOL
  22. (WINAPI *ACQUIRECONTEXT)(
  23. OUT HCRYPTPROV *phProv,
  24. IN LPCSTR pszContainer,
  25. IN DWORD dwFlags,
  26. IN PVTableProvStruc pVTable);
  27. typedef BOOL
  28. (WINAPI *GETPROVPARAM)(
  29. IN HCRYPTPROV hProv,
  30. IN DWORD dwParam,
  31. IN BYTE *pbData,
  32. IN OUT DWORD *pdwDataLen,
  33. IN DWORD dwFlags);
  34. typedef BOOL
  35. (WINAPI *RELEASECONTEXT)(
  36. IN HCRYPTPROV hProv,
  37. IN DWORD dwFlags);
  38. typedef BOOL
  39. (WINAPI *SETPROVPARAM)(
  40. IN HCRYPTPROV hProv,
  41. IN DWORD dwParam,
  42. IN CONST BYTE *pbData,
  43. IN DWORD dwFlags);
  44. typedef BOOL
  45. (WINAPI *DERIVEKEY)(
  46. IN HCRYPTPROV hProv,
  47. IN ALG_ID Algid,
  48. IN HCRYPTHASH hHash,
  49. IN DWORD dwFlags,
  50. OUT HCRYPTKEY * phKey);
  51. typedef BOOL
  52. (WINAPI *DESTROYKEY)(
  53. IN HCRYPTPROV hProv,
  54. IN HCRYPTKEY hKey);
  55. typedef BOOL
  56. (WINAPI *EXPORTKEY)(
  57. IN HCRYPTPROV hProv,
  58. IN HCRYPTKEY hKey,
  59. IN HCRYPTKEY hPubKey,
  60. IN DWORD dwBlobType,
  61. IN DWORD dwFlags,
  62. OUT BYTE *pbData,
  63. IN OUT DWORD *pdwDataLen);
  64. typedef BOOL
  65. (WINAPI *GENKEY)(
  66. IN HCRYPTPROV hProv,
  67. IN ALG_ID Algid,
  68. IN DWORD dwFlags,
  69. OUT HCRYPTKEY *phKey);
  70. typedef BOOL
  71. (WINAPI *GETKEYPARAM)(
  72. IN HCRYPTPROV hProv,
  73. IN HCRYPTKEY hKey,
  74. IN DWORD dwParam,
  75. OUT BYTE *pbData,
  76. IN DWORD *pdwDataLen,
  77. IN DWORD dwFlags);
  78. typedef BOOL
  79. (WINAPI *GENRANDOM)(
  80. IN HCRYPTPROV hProv,
  81. IN DWORD dwLen,
  82. IN OUT BYTE *pbBuffer);
  83. typedef BOOL
  84. (WINAPI *GETUSERKEY)(
  85. IN HCRYPTPROV hProv,
  86. IN DWORD dwKeySpec,
  87. OUT HCRYPTKEY *phUserKey);
  88. typedef BOOL
  89. (WINAPI *IMPORTKEY)(
  90. IN HCRYPTPROV hProv,
  91. IN CONST BYTE *pbData,
  92. IN DWORD dwDataLen,
  93. IN HCRYPTKEY hPubKey,
  94. IN DWORD dwFlags,
  95. OUT HCRYPTKEY *phKey);
  96. typedef BOOL
  97. (WINAPI *SETKEYPARAM)(
  98. IN HCRYPTPROV hProv,
  99. IN HCRYPTKEY hKey,
  100. IN DWORD dwParam,
  101. IN CONST BYTE *pbData,
  102. IN DWORD dwFlags);
  103. typedef BOOL
  104. (WINAPI *ENCRYPT)(
  105. IN HCRYPTPROV hProv,
  106. IN HCRYPTKEY hKey,
  107. IN HCRYPTHASH hHash,
  108. IN BOOL Final,
  109. IN DWORD dwFlags,
  110. IN OUT BYTE *pbData,
  111. IN OUT DWORD *pdwDataLen,
  112. IN DWORD dwBufLen);
  113. typedef BOOL
  114. (WINAPI *DECRYPT)(
  115. IN HCRYPTPROV hProv,
  116. IN HCRYPTKEY hKey,
  117. IN HCRYPTHASH hHash,
  118. IN BOOL Final,
  119. IN DWORD dwFlags,
  120. IN OUT BYTE *pbData,
  121. IN OUT DWORD *pdwDataLen);
  122. typedef BOOL
  123. (WINAPI *CREATEHASH)(
  124. IN HCRYPTPROV hProv,
  125. IN ALG_ID Algid,
  126. IN HCRYPTKEY hKey,
  127. IN DWORD dwFlags,
  128. OUT HCRYPTHASH *phHash);
  129. typedef BOOL
  130. (WINAPI *DESTROYHASH)(
  131. IN HCRYPTPROV hProv,
  132. IN HCRYPTHASH hHash);
  133. typedef BOOL
  134. (WINAPI *GETHASHPARAM)(
  135. IN HCRYPTPROV hProv,
  136. IN HCRYPTHASH hHash,
  137. IN DWORD dwParam,
  138. OUT BYTE *pbData,
  139. IN DWORD *pdwDataLen,
  140. IN DWORD dwFlags);
  141. typedef BOOL
  142. (WINAPI *HASHDATA)(
  143. IN HCRYPTPROV hProv,
  144. IN HCRYPTHASH hHash,
  145. IN CONST BYTE *pbData,
  146. IN DWORD dwDataLen,
  147. IN DWORD dwFlags);
  148. typedef BOOL
  149. (WINAPI *HASHSESSIONKEY)(
  150. IN HCRYPTPROV hProv,
  151. IN HCRYPTHASH hHash,
  152. IN HCRYPTKEY hKey,
  153. IN DWORD dwFlags);
  154. typedef BOOL
  155. (WINAPI *SETHASHPARAM)(
  156. IN HCRYPTPROV hProv,
  157. IN HCRYPTHASH hHash,
  158. IN DWORD dwParam,
  159. IN CONST BYTE *pbData,
  160. IN DWORD dwFlags);
  161. typedef BOOL
  162. (WINAPI *SIGNHASH)(
  163. IN HCRYPTPROV hProv,
  164. IN HCRYPTHASH hHash,
  165. IN DWORD dwKeySpec,
  166. IN LPCTSTR sDescription,
  167. IN DWORD dwFlags,
  168. OUT BYTE *pbSignature,
  169. IN OUT DWORD *pdwSigLen);
  170. typedef BOOL
  171. (WINAPI *VERIFYSIGNATURE)(
  172. IN HCRYPTPROV hProv,
  173. IN HCRYPTHASH hHash,
  174. IN CONST BYTE *pbSignature,
  175. IN DWORD dwSigLen,
  176. IN HCRYPTKEY hPubKey,
  177. IN LPCTSTR sDescription,
  178. IN DWORD dwFlags);
  179. typedef BOOL
  180. (WINAPI *DUPLICATEHASH)(
  181. IN HCRYPTPROV hUID,
  182. IN HCRYPTHASH hHash,
  183. IN DWORD *pdwReserved,
  184. IN DWORD dwFlags,
  185. IN HCRYPTHASH *phHash);
  186. typedef BOOL
  187. (WINAPI *DUPLICATEKEY)(
  188. IN HCRYPTPROV hUID,
  189. IN HCRYPTKEY hKey,
  190. IN DWORD *pdwReserved,
  191. IN DWORD dwFlags,
  192. IN HCRYPTKEY *phKey);
  193. class CLoggingContext;
  194. extern const LPCTSTR
  195. g_szCspRegistry,
  196. g_szSignature,
  197. g_szImagePath,
  198. g_szSigInFile,
  199. g_szType;
  200. extern const LPCTSTR
  201. g_szLogCspRegistry,
  202. g_szLogFile,
  203. g_szSavedImagePath,
  204. g_szSavedSignature,
  205. g_szSavedSigInFile;
  206. extern const LPCTSTR
  207. g_szLogCsp;
  208. extern const LPCTSTR
  209. g_szCspDkRegistry;
  210. extern CDynamicPointerArray<CLoggingContext> *g_prgCtxs;
  211. extern "C" BOOL WINAPI
  212. CspdkVerifyImage(
  213. LPCTSTR szCspImage,
  214. LPCBYTE pbSig);
  215. //
  216. //==============================================================================
  217. //
  218. // CLoggingContext
  219. //
  220. class CLoggingContext
  221. {
  222. public:
  223. // Constructors & Destructor
  224. CLoggingContext(void);
  225. ~CLoggingContext();
  226. // Properties
  227. DWORD m_dwIndex;
  228. // Methods
  229. CLoggingContext *AddRef(void);
  230. void Release(void);
  231. HINSTANCE Module(void) const
  232. { return m_hModule; };
  233. DWORD
  234. Initialize(
  235. IN PVTableProvStruc pVTable,
  236. CRegistry &regRoot);
  237. DWORD
  238. AcquireContext(
  239. OUT HCRYPTPROV *phProv,
  240. IN LPCSTR pszContainer,
  241. IN DWORD dwFlags,
  242. IN PVTableProvStruc pVTable);
  243. DWORD
  244. GetProvParam(
  245. IN HCRYPTPROV hProv,
  246. IN DWORD dwParam,
  247. OUT BYTE *pbData,
  248. IN OUT DWORD *pdwDataLen,
  249. IN DWORD dwFlags);
  250. DWORD
  251. ReleaseContext(
  252. IN HCRYPTPROV hProv,
  253. IN DWORD dwFlags);
  254. DWORD
  255. SetProvParam(
  256. IN HCRYPTPROV hProv,
  257. IN DWORD dwParam,
  258. IN CONST BYTE *pbData,
  259. IN DWORD dwFlags);
  260. DWORD
  261. DeriveKey(
  262. IN HCRYPTPROV hProv,
  263. IN ALG_ID Algid,
  264. IN HCRYPTHASH hHash,
  265. IN DWORD dwFlags,
  266. OUT HCRYPTKEY * phKey);
  267. DWORD
  268. DestroyKey(
  269. IN HCRYPTPROV hProv,
  270. IN HCRYPTKEY hKey);
  271. DWORD
  272. ExportKey(
  273. IN HCRYPTPROV hProv,
  274. IN HCRYPTKEY hKey,
  275. IN HCRYPTKEY hPubKey,
  276. IN DWORD dwBlobType,
  277. IN DWORD dwFlags,
  278. OUT BYTE *pbData,
  279. IN OUT DWORD *pdwDataLen);
  280. DWORD
  281. GenKey(
  282. IN HCRYPTPROV hProv,
  283. IN ALG_ID Algid,
  284. IN DWORD dwFlags,
  285. OUT HCRYPTKEY *phKey);
  286. DWORD
  287. GetKeyParam(
  288. IN HCRYPTPROV hProv,
  289. IN HCRYPTKEY hKey,
  290. IN DWORD dwParam,
  291. OUT BYTE *pbData,
  292. IN OUT DWORD *pdwDataLen,
  293. IN DWORD dwFlags);
  294. DWORD
  295. GenRandom(
  296. IN HCRYPTPROV hProv,
  297. IN DWORD dwLen,
  298. IN OUT BYTE *pbBuffer);
  299. DWORD
  300. GetUserKey(
  301. IN HCRYPTPROV hProv,
  302. IN DWORD dwKeySpec,
  303. OUT HCRYPTKEY *phUserKey);
  304. DWORD
  305. ImportKey(
  306. IN HCRYPTPROV hProv,
  307. IN CONST BYTE *pbData,
  308. IN DWORD dwDataLen,
  309. IN HCRYPTKEY hPubKey,
  310. IN DWORD dwFlags,
  311. OUT HCRYPTKEY *phKey);
  312. DWORD
  313. SetKeyParam(
  314. IN HCRYPTPROV hProv,
  315. IN HCRYPTKEY hKey,
  316. IN DWORD dwParam,
  317. IN CONST BYTE *pbData,
  318. IN DWORD dwFlags);
  319. DWORD
  320. Encrypt(
  321. IN HCRYPTPROV hProv,
  322. IN HCRYPTKEY hKey,
  323. IN HCRYPTHASH hHash,
  324. IN BOOL Final,
  325. IN DWORD dwFlags,
  326. IN OUT BYTE *pbData,
  327. IN OUT DWORD *pdwDataLen,
  328. IN DWORD dwBufLen);
  329. DWORD
  330. Decrypt(
  331. IN HCRYPTPROV hProv,
  332. IN HCRYPTKEY hKey,
  333. IN HCRYPTHASH hHash,
  334. IN BOOL Final,
  335. IN DWORD dwFlags,
  336. IN OUT BYTE *pbData,
  337. IN OUT DWORD *pdwDataLen);
  338. DWORD
  339. CreateHash(
  340. IN HCRYPTPROV hProv,
  341. IN ALG_ID Algid,
  342. IN HCRYPTKEY hKey,
  343. IN DWORD dwFlags,
  344. OUT HCRYPTHASH *phHash);
  345. DWORD
  346. DestroyHash(
  347. IN HCRYPTPROV hProv,
  348. IN HCRYPTHASH hHash);
  349. DWORD
  350. GetHashParam(
  351. IN HCRYPTPROV hProv,
  352. IN HCRYPTHASH hHash,
  353. IN DWORD dwParam,
  354. OUT BYTE *pbData,
  355. IN OUT DWORD *pdwDataLen,
  356. IN DWORD dwFlags);
  357. DWORD
  358. HashData(
  359. IN HCRYPTPROV hProv,
  360. IN HCRYPTHASH hHash,
  361. IN CONST BYTE *pbData,
  362. IN DWORD dwDataLen,
  363. IN DWORD dwFlags);
  364. DWORD
  365. HashSessionKey(
  366. IN HCRYPTPROV hProv,
  367. IN HCRYPTHASH hHash,
  368. IN HCRYPTKEY hKey,
  369. IN DWORD dwFlags);
  370. DWORD
  371. SetHashParam(
  372. IN HCRYPTPROV hProv,
  373. IN HCRYPTHASH hHash,
  374. IN DWORD dwParam,
  375. IN CONST BYTE *pbData,
  376. IN DWORD dwFlags);
  377. DWORD
  378. SignHash(
  379. IN HCRYPTPROV hProv,
  380. IN HCRYPTHASH hHash,
  381. IN DWORD dwKeySpec,
  382. IN LPCTSTR sDescription,
  383. IN DWORD dwFlags,
  384. OUT BYTE *pbSignature,
  385. IN OUT DWORD *pdwSigLen);
  386. DWORD
  387. VerifySignature(
  388. IN HCRYPTPROV hProv,
  389. IN HCRYPTHASH hHash,
  390. IN CONST BYTE *pbSignature,
  391. IN DWORD dwSigLen,
  392. IN HCRYPTKEY hPubKey,
  393. IN LPCTSTR sDescription,
  394. IN DWORD dwFlags);
  395. DWORD
  396. DuplicateHash(
  397. IN HCRYPTPROV hProv,
  398. IN HCRYPTHASH hHash,
  399. IN DWORD *pdwReserved,
  400. IN DWORD dwFlags,
  401. IN HCRYPTHASH *phHash);
  402. DWORD
  403. DuplicateKey(
  404. IN HCRYPTPROV hProv,
  405. IN HCRYPTKEY hKey,
  406. IN DWORD *pdwReserved,
  407. IN DWORD dwFlags,
  408. IN HCRYPTKEY *phKey);
  409. // Operators
  410. protected:
  411. typedef struct {
  412. ACQUIRECONTEXT pfAcquireContext;
  413. GETPROVPARAM pfGetProvParam;
  414. RELEASECONTEXT pfReleaseContext;
  415. SETPROVPARAM pfSetProvParam;
  416. DERIVEKEY pfDeriveKey;
  417. DESTROYKEY pfDestroyKey;
  418. EXPORTKEY pfExportKey;
  419. GENKEY pfGenKey;
  420. GETKEYPARAM pfGetKeyParam;
  421. GENRANDOM pfGenRandom;
  422. GETUSERKEY pfGetUserKey;
  423. IMPORTKEY pfImportKey;
  424. SETKEYPARAM pfSetKeyParam;
  425. ENCRYPT pfEncrypt;
  426. DECRYPT pfDecrypt;
  427. CREATEHASH pfCreateHash;
  428. DESTROYHASH pfDestroyHash;
  429. GETHASHPARAM pfGetHashParam;
  430. HASHDATA pfHashData;
  431. HASHSESSIONKEY pfHashSessionKey;
  432. SETHASHPARAM pfSetHashParam;
  433. SIGNHASH pfSignHash;
  434. VERIFYSIGNATURE pfVerifySignature;
  435. DUPLICATEHASH pfDuplicateHash;
  436. DUPLICATEKEY pfDuplicateKey;
  437. } CSP_REDIRECT;
  438. // Properties
  439. DWORD m_nRefCount;
  440. HINSTANCE m_hModule;
  441. CText m_tzCspImage;
  442. CText m_tzLogFile;
  443. CSP_REDIRECT m_cspRedirect;
  444. // Methods
  445. };
  446. //
  447. //==============================================================================
  448. //
  449. // CLogObject
  450. //
  451. class CLogObject
  452. {
  453. public:
  454. // Constructors & Destructor
  455. virtual ~CLogObject();
  456. // Properties
  457. // Methods
  458. void Log(LPCTSTR szLogFile);
  459. // Operators
  460. protected:
  461. typedef enum
  462. {
  463. AcquireContext = 0,
  464. GetProvParam,
  465. ReleaseContext,
  466. SetProvParam,
  467. DeriveKey,
  468. DestroyKey,
  469. ExportKey,
  470. GenKey,
  471. GetKeyParam,
  472. GenRandom,
  473. GetUserKey,
  474. ImportKey,
  475. SetKeyParam,
  476. Encrypt,
  477. Decrypt,
  478. CreateHash,
  479. DestroyHash,
  480. GetHashParam,
  481. HashData,
  482. HashSessionKey,
  483. SetHashParam,
  484. SignHash,
  485. VerifySignature,
  486. DuplicateHash,
  487. DuplicateKey,
  488. Undefined
  489. } LogTypeId;
  490. typedef enum
  491. {
  492. logid_False = 0,
  493. logid_True,
  494. logid_Exception,
  495. logid_Setup
  496. } CompletionCode;
  497. typedef struct
  498. {
  499. DWORD cbLength;
  500. DWORD cbDataOffset;
  501. LogTypeId id;
  502. CompletionCode status;
  503. DWORD dwStatus;
  504. DWORD dwProcId;
  505. DWORD dwThreadId;
  506. SYSTEMTIME startTime;
  507. SYSTEMTIME endTime;
  508. } LogHeader;
  509. typedef struct {
  510. DWORD cbOffset;
  511. DWORD cbLength;
  512. } LogBuffer;
  513. // Constructors & Destructor
  514. CLogObject(
  515. LogTypeId id,
  516. LogHeader *plh,
  517. DWORD cbStruct);
  518. // Properties
  519. LogHeader *m_plh;
  520. LPBYTE m_pbLogData;
  521. DWORD m_cbLogDataLen;
  522. DWORD m_cbLogDataUsed;
  523. // Methods
  524. void Request(void);
  525. void Response(CompletionCode code, DWORD dwError = ERROR_SUCCESS);
  526. void LogAdd(LogBuffer *pbf, LPCTSTR sz);
  527. void LogAdd(LogBuffer *pbf, const BYTE *pb, DWORD cb);
  528. };
  529. //
  530. //==============================================================================
  531. //
  532. // CLogObject derivatives
  533. //
  534. class CLogAcquireContext
  535. : public CLogObject
  536. {
  537. protected:
  538. // Properties
  539. struct {
  540. LogHeader lh;
  541. LogBuffer bfContainer;
  542. DWORD dwFlags;
  543. DWORD dwVersion;
  544. LPVOID pvFuncVerifyImage;
  545. LPVOID pvFuncReturnhWnd;
  546. HWND hWnd;
  547. DWORD dwProvType;
  548. LogBuffer bfContextInfo;
  549. LogBuffer bfProvName;
  550. HCRYPTPROV hProv;
  551. } m_LogData;
  552. public:
  553. // Constructors & Destructor
  554. CLogAcquireContext(void);
  555. ~CLogAcquireContext();
  556. // Properties
  557. // Methods
  558. void Request(
  559. OUT HCRYPTPROV *phProv,
  560. IN LPCSTR pszContainer,
  561. IN DWORD dwFlags,
  562. IN PVTableProvStruc pVTable);
  563. void Response(
  564. BOOL fStatus,
  565. OUT HCRYPTPROV *phProv,
  566. IN LPCSTR pszContainer,
  567. IN DWORD dwFlags,
  568. IN PVTableProvStruc pVTable);
  569. void LogException(
  570. void);
  571. void LogNotCalled(
  572. DWORD dwReturn);
  573. };
  574. class CLogGetProvParam
  575. : public CLogObject
  576. {
  577. protected:
  578. // Properties
  579. struct {
  580. LogHeader lh;
  581. HCRYPTPROV hProv;
  582. DWORD dwParam;
  583. DWORD dwDataLen;
  584. DWORD dwFlags;
  585. LogBuffer bfData;
  586. } m_LogData;
  587. public:
  588. // Constructors & Destructor
  589. CLogGetProvParam(void);
  590. ~CLogGetProvParam();
  591. // Properties
  592. // Methods
  593. void Request(
  594. IN HCRYPTPROV hProv,
  595. IN DWORD dwParam,
  596. OUT BYTE *pbData,
  597. IN OUT DWORD *pdwDataLen,
  598. IN DWORD dwFlags);
  599. void Response(
  600. BOOL fStatus,
  601. IN HCRYPTPROV hProv,
  602. IN DWORD dwParam,
  603. OUT BYTE *pbData,
  604. IN OUT DWORD *pdwDataLen,
  605. IN DWORD dwFlags);
  606. void LogException(
  607. void);
  608. void LogNotCalled(
  609. DWORD dwReturn);
  610. };
  611. class CLogReleaseContext
  612. : public CLogObject
  613. {
  614. protected:
  615. // Properties
  616. struct {
  617. LogHeader lh;
  618. HCRYPTPROV hProv;
  619. DWORD dwFlags;
  620. } m_LogData;
  621. public:
  622. // Constructors & Destructor
  623. CLogReleaseContext(void);
  624. ~CLogReleaseContext();
  625. // Properties
  626. // Methods
  627. void Request(
  628. IN HCRYPTPROV hProv,
  629. IN DWORD dwFlags);
  630. void Response(
  631. BOOL fStatus,
  632. IN HCRYPTPROV hProv,
  633. IN DWORD dwFlags);
  634. void LogException(
  635. void);
  636. void LogNotCalled(
  637. DWORD dwReturn);
  638. };
  639. class CLogSetProvParam
  640. : public CLogObject
  641. {
  642. protected:
  643. // Properties
  644. struct {
  645. LogHeader lh;
  646. HCRYPTPROV hProv;
  647. DWORD dwParam;
  648. LogBuffer bfData;
  649. DWORD dwFlags;
  650. } m_LogData;
  651. public:
  652. // Constructors & Destructor
  653. CLogSetProvParam(void);
  654. ~CLogSetProvParam();
  655. // Properties
  656. // Methods
  657. void Request(
  658. IN HCRYPTPROV hProv,
  659. IN DWORD dwParam,
  660. IN CONST BYTE *pbData,
  661. IN DWORD dwLength,
  662. IN DWORD dwFlags);
  663. void Response(
  664. BOOL fStatus,
  665. IN HCRYPTPROV hProv,
  666. IN DWORD dwParam,
  667. IN CONST BYTE *pbData,
  668. IN DWORD dwFlags);
  669. void LogException(
  670. void);
  671. void LogNotCalled(
  672. DWORD dwReturn);
  673. };
  674. class CLogDeriveKey
  675. : public CLogObject
  676. {
  677. protected:
  678. // Properties
  679. struct {
  680. LogHeader lh;
  681. HCRYPTPROV hProv;
  682. ALG_ID Algid;
  683. HCRYPTHASH hHash;
  684. DWORD dwFlags;
  685. HCRYPTKEY hKey;
  686. } m_LogData;
  687. public:
  688. // Constructors & Destructor
  689. CLogDeriveKey(void);
  690. ~CLogDeriveKey();
  691. // Properties
  692. // Methods
  693. void Request(
  694. IN HCRYPTPROV hProv,
  695. IN ALG_ID Algid,
  696. IN HCRYPTHASH hHash,
  697. IN DWORD dwFlags,
  698. OUT HCRYPTKEY * phKey);
  699. void Response(
  700. BOOL fStatus,
  701. IN HCRYPTPROV hProv,
  702. IN ALG_ID Algid,
  703. IN HCRYPTHASH hHash,
  704. IN DWORD dwFlags,
  705. OUT HCRYPTKEY * phKey);
  706. void LogException(
  707. void);
  708. void LogNotCalled(
  709. DWORD dwReturn);
  710. };
  711. class CLogDestroyKey
  712. : public CLogObject
  713. {
  714. protected:
  715. // Properties
  716. struct {
  717. LogHeader lh;
  718. HCRYPTPROV hProv;
  719. HCRYPTKEY hKey;
  720. } m_LogData;
  721. public:
  722. // Constructors & Destructor
  723. CLogDestroyKey(void);
  724. ~CLogDestroyKey();
  725. // Properties
  726. // Methods
  727. void Request(
  728. IN HCRYPTPROV hProv,
  729. IN HCRYPTKEY hKey);
  730. void Response(
  731. BOOL fStatus,
  732. IN HCRYPTPROV hProv,
  733. IN HCRYPTKEY hKey);
  734. void LogException(
  735. void);
  736. void LogNotCalled(
  737. DWORD dwReturn);
  738. };
  739. class CLogExportKey
  740. : public CLogObject
  741. {
  742. protected:
  743. // Properties
  744. struct {
  745. LogHeader lh;
  746. HCRYPTPROV hProv;
  747. HCRYPTKEY hKey;
  748. HCRYPTKEY hPubKey;
  749. DWORD dwBlobType;
  750. DWORD dwFlags;
  751. DWORD dwDataLen;
  752. LogBuffer bfData;
  753. } m_LogData;
  754. public:
  755. // Constructors & Destructor
  756. CLogExportKey(void);
  757. virtual ~CLogExportKey();
  758. // Properties
  759. // Methods
  760. void Request(
  761. IN HCRYPTPROV hProv,
  762. IN HCRYPTKEY hKey,
  763. IN HCRYPTKEY hPubKey,
  764. IN DWORD dwBlobType,
  765. IN DWORD dwFlags,
  766. OUT BYTE *pbData,
  767. IN OUT DWORD *pdwDataLen);
  768. void Response(
  769. BOOL fStatus,
  770. IN HCRYPTPROV hProv,
  771. IN HCRYPTKEY hKey,
  772. IN HCRYPTKEY hPubKey,
  773. IN DWORD dwBlobType,
  774. IN DWORD dwFlags,
  775. OUT BYTE *pbData,
  776. IN OUT DWORD *pdwDataLen);
  777. void LogException(
  778. void);
  779. void LogNotCalled(
  780. DWORD dwReturn);
  781. };
  782. class CLogGenKey
  783. : public CLogObject
  784. {
  785. protected:
  786. // Properties
  787. struct {
  788. LogHeader lh;
  789. HCRYPTPROV hProv;
  790. ALG_ID Algid;
  791. DWORD dwFlags;
  792. HCRYPTKEY hKey;
  793. } m_LogData;
  794. public:
  795. // Constructors & Destructor
  796. CLogGenKey(void);
  797. ~CLogGenKey();
  798. // Properties
  799. // Methods
  800. void Request(
  801. IN HCRYPTPROV hProv,
  802. IN ALG_ID Algid,
  803. IN DWORD dwFlags,
  804. OUT HCRYPTKEY *phKey);
  805. void Response(
  806. BOOL fStatus,
  807. IN HCRYPTPROV hProv,
  808. IN ALG_ID Algid,
  809. IN DWORD dwFlags,
  810. OUT HCRYPTKEY *phKey);
  811. void LogException(
  812. void);
  813. void LogNotCalled(
  814. DWORD dwReturn);
  815. };
  816. class CLogGetKeyParam
  817. : public CLogObject
  818. {
  819. protected:
  820. // Properties
  821. struct {
  822. LogHeader lh;
  823. HCRYPTPROV hProv;
  824. HCRYPTKEY hKey;
  825. DWORD dwParam;
  826. DWORD dwDataLen;
  827. DWORD dwFlags;
  828. LogBuffer bfData;
  829. } m_LogData;
  830. public:
  831. // Constructors & Destructor
  832. CLogGetKeyParam(void);
  833. ~CLogGetKeyParam();
  834. // Properties
  835. // Methods
  836. void Request(
  837. IN HCRYPTPROV hProv,
  838. IN HCRYPTKEY hKey,
  839. IN DWORD dwParam,
  840. OUT BYTE *pbData,
  841. IN OUT DWORD *pdwDataLen,
  842. IN DWORD dwFlags);
  843. void Response(
  844. BOOL fStatus,
  845. IN HCRYPTPROV hProv,
  846. IN HCRYPTKEY hKey,
  847. IN DWORD dwParam,
  848. OUT BYTE *pbData,
  849. IN OUT DWORD *pdwDataLen,
  850. IN DWORD dwFlags);
  851. void LogException(
  852. void);
  853. void LogNotCalled(
  854. DWORD dwReturn);
  855. };
  856. class CLogGenRandom
  857. : public CLogObject
  858. {
  859. protected:
  860. // Properties
  861. struct {
  862. LogHeader lh;
  863. HCRYPTPROV hProv;
  864. DWORD dwLen;
  865. LogBuffer bfBuffer;
  866. } m_LogData;
  867. public:
  868. // Constructors & Destructor
  869. CLogGenRandom(void);
  870. ~CLogGenRandom();
  871. // Properties
  872. // Methods
  873. void Request(
  874. IN HCRYPTPROV hProv,
  875. IN DWORD dwLen,
  876. IN OUT BYTE *pbBuffer);
  877. void Response(
  878. BOOL fStatus,
  879. IN HCRYPTPROV hProv,
  880. IN DWORD dwLen,
  881. IN OUT BYTE *pbBuffer);
  882. void LogException(
  883. void);
  884. void LogNotCalled(
  885. DWORD dwReturn);
  886. };
  887. class CLogGetUserKey
  888. : public CLogObject
  889. {
  890. protected:
  891. // Properties
  892. struct {
  893. LogHeader lh;
  894. HCRYPTPROV hProv;
  895. DWORD dwKeySpec;
  896. HCRYPTKEY hUserKey;
  897. } m_LogData;
  898. public:
  899. // Constructors & Destructor
  900. CLogGetUserKey(void);
  901. ~CLogGetUserKey();
  902. // Properties
  903. // Methods
  904. void Request(
  905. IN HCRYPTPROV hProv,
  906. IN DWORD dwKeySpec,
  907. OUT HCRYPTKEY *phUserKey);
  908. void Response(
  909. BOOL fStatus,
  910. IN HCRYPTPROV hProv,
  911. IN DWORD dwKeySpec,
  912. OUT HCRYPTKEY *phUserKey);
  913. void LogException(
  914. void);
  915. void LogNotCalled(
  916. DWORD dwReturn);
  917. };
  918. class CLogImportKey
  919. : public CLogObject
  920. {
  921. protected:
  922. // Properties
  923. struct {
  924. LogHeader lh;
  925. HCRYPTPROV hProv;
  926. LogBuffer bfData;
  927. HCRYPTKEY hPubKey;
  928. DWORD dwFlags;
  929. HCRYPTKEY hKey;
  930. } m_LogData;
  931. public:
  932. // Constructors & Destructor
  933. CLogImportKey(void);
  934. ~CLogImportKey();
  935. // Properties
  936. // Methods
  937. void Request(
  938. IN HCRYPTPROV hProv,
  939. IN CONST BYTE *pbData,
  940. IN DWORD dwDataLen,
  941. IN HCRYPTKEY hPubKey,
  942. IN DWORD dwFlags,
  943. OUT HCRYPTKEY *phKey);
  944. void Response(
  945. BOOL fStatus,
  946. IN HCRYPTPROV hProv,
  947. IN CONST BYTE *pbData,
  948. IN DWORD dwDataLen,
  949. IN HCRYPTKEY hPubKey,
  950. IN DWORD dwFlags,
  951. OUT HCRYPTKEY *phKey);
  952. void LogException(
  953. void);
  954. void LogNotCalled(
  955. DWORD dwReturn);
  956. };
  957. class CLogSetKeyParam
  958. : public CLogObject
  959. {
  960. protected:
  961. // Properties
  962. struct {
  963. LogHeader lh;
  964. HCRYPTPROV hProv;
  965. HCRYPTKEY hKey;
  966. DWORD dwParam;
  967. LogBuffer bfData;
  968. DWORD dwFlags;
  969. } m_LogData;
  970. public:
  971. // Constructors & Destructor
  972. CLogSetKeyParam(void);
  973. ~CLogSetKeyParam();
  974. // Properties
  975. // Methods
  976. void Request(
  977. IN HCRYPTPROV hProv,
  978. IN HCRYPTKEY hKey,
  979. IN DWORD dwParam,
  980. IN CONST BYTE *pbData,
  981. IN DWORD dwLength,
  982. IN DWORD dwFlags);
  983. void Response(
  984. BOOL fStatus,
  985. IN HCRYPTPROV hProv,
  986. IN HCRYPTKEY hKey,
  987. IN DWORD dwParam,
  988. IN CONST BYTE *pbData,
  989. IN DWORD dwFlags);
  990. void LogException(
  991. void);
  992. void LogNotCalled(
  993. DWORD dwReturn);
  994. };
  995. class CLogEncrypt
  996. : public CLogObject
  997. {
  998. protected:
  999. // Properties
  1000. struct {
  1001. LogHeader lh;
  1002. HCRYPTPROV hProv;
  1003. HCRYPTKEY hKey;
  1004. HCRYPTHASH hHash;
  1005. BOOL Final;
  1006. DWORD dwFlags;
  1007. LogBuffer bfInData;
  1008. DWORD dwBufLen;
  1009. LogBuffer bfOutData;
  1010. } m_LogData;
  1011. public:
  1012. // Constructors & Destructor
  1013. CLogEncrypt(void);
  1014. ~CLogEncrypt();
  1015. // Properties
  1016. // Methods
  1017. void Request(
  1018. IN HCRYPTPROV hProv,
  1019. IN HCRYPTKEY hKey,
  1020. IN HCRYPTHASH hHash,
  1021. IN BOOL Final,
  1022. IN DWORD dwFlags,
  1023. IN OUT BYTE *pbData,
  1024. IN OUT DWORD *pdwDataLen,
  1025. IN DWORD dwBufLen);
  1026. void Response(
  1027. BOOL fStatus,
  1028. IN HCRYPTPROV hProv,
  1029. IN HCRYPTKEY hKey,
  1030. IN HCRYPTHASH hHash,
  1031. IN BOOL Final,
  1032. IN DWORD dwFlags,
  1033. IN OUT BYTE *pbData,
  1034. IN OUT DWORD *pdwDataLen,
  1035. IN DWORD dwBufLen);
  1036. void LogException(
  1037. void);
  1038. void LogNotCalled(
  1039. DWORD dwReturn);
  1040. };
  1041. class CLogDecrypt
  1042. : public CLogObject
  1043. {
  1044. protected:
  1045. // Properties
  1046. struct {
  1047. LogHeader lh;
  1048. HCRYPTPROV hProv;
  1049. HCRYPTKEY hKey;
  1050. HCRYPTHASH hHash;
  1051. BOOL Final;
  1052. DWORD dwFlags;
  1053. LogBuffer bfInData;
  1054. LogBuffer bfOutData;
  1055. } m_LogData;
  1056. public:
  1057. // Constructors & Destructor
  1058. CLogDecrypt(void);
  1059. ~CLogDecrypt();
  1060. // Properties
  1061. // Methods
  1062. void Request(
  1063. IN HCRYPTPROV hProv,
  1064. IN HCRYPTKEY hKey,
  1065. IN HCRYPTHASH hHash,
  1066. IN BOOL Final,
  1067. IN DWORD dwFlags,
  1068. IN OUT BYTE *pbData,
  1069. IN OUT DWORD *pdwDataLen);
  1070. void Response(
  1071. BOOL fStatus,
  1072. IN HCRYPTPROV hProv,
  1073. IN HCRYPTKEY hKey,
  1074. IN HCRYPTHASH hHash,
  1075. IN BOOL Final,
  1076. IN DWORD dwFlags,
  1077. IN OUT BYTE *pbData,
  1078. IN OUT DWORD *pdwDataLen);
  1079. void LogException(
  1080. void);
  1081. void LogNotCalled(
  1082. DWORD dwReturn);
  1083. };
  1084. class CLogCreateHash
  1085. : public CLogObject
  1086. {
  1087. protected:
  1088. // Properties
  1089. struct {
  1090. LogHeader lh;
  1091. HCRYPTPROV hProv;
  1092. ALG_ID Algid;
  1093. HCRYPTKEY hKey;
  1094. DWORD dwFlags;
  1095. HCRYPTHASH hHash;
  1096. } m_LogData;
  1097. public:
  1098. // Constructors & Destructor
  1099. CLogCreateHash(void);
  1100. ~CLogCreateHash();
  1101. // Properties
  1102. // Methods
  1103. void Request(
  1104. IN HCRYPTPROV hProv,
  1105. IN ALG_ID Algid,
  1106. IN HCRYPTKEY hKey,
  1107. IN DWORD dwFlags,
  1108. OUT HCRYPTHASH *phHash);
  1109. void Response(
  1110. BOOL fStatus,
  1111. IN HCRYPTPROV hProv,
  1112. IN ALG_ID Algid,
  1113. IN HCRYPTKEY hKey,
  1114. IN DWORD dwFlags,
  1115. OUT HCRYPTHASH *phHash);
  1116. void LogException(
  1117. void);
  1118. void LogNotCalled(
  1119. DWORD dwReturn);
  1120. };
  1121. class CLogDestroyHash
  1122. : public CLogObject
  1123. {
  1124. protected:
  1125. // Properties
  1126. struct {
  1127. LogHeader lh;
  1128. HCRYPTPROV hProv;
  1129. HCRYPTHASH hHash;
  1130. } m_LogData;
  1131. public:
  1132. // Constructors & Destructor
  1133. CLogDestroyHash(void);
  1134. ~CLogDestroyHash();
  1135. // Properties
  1136. // Methods
  1137. void Request(
  1138. IN HCRYPTPROV hProv,
  1139. IN HCRYPTHASH hHash);
  1140. void Response(
  1141. BOOL fStatus,
  1142. IN HCRYPTPROV hProv,
  1143. IN HCRYPTHASH hHash);
  1144. void LogException(
  1145. void);
  1146. void LogNotCalled(
  1147. DWORD dwReturn);
  1148. };
  1149. class CLogGetHashParam
  1150. : public CLogObject
  1151. {
  1152. protected:
  1153. // Properties
  1154. struct {
  1155. LogHeader lh;
  1156. HCRYPTPROV hProv;
  1157. HCRYPTHASH hHash;
  1158. DWORD dwParam;
  1159. DWORD dwDataLen;
  1160. DWORD dwFlags;
  1161. LogBuffer bfData;
  1162. } m_LogData;
  1163. public:
  1164. // Constructors & Destructor
  1165. CLogGetHashParam(void);
  1166. ~CLogGetHashParam();
  1167. // Properties
  1168. // Methods
  1169. void Request(
  1170. IN HCRYPTPROV hProv,
  1171. IN HCRYPTHASH hHash,
  1172. IN DWORD dwParam,
  1173. OUT BYTE *pbData,
  1174. IN OUT DWORD *pdwDataLen,
  1175. IN DWORD dwFlags);
  1176. void Response(
  1177. BOOL fStatus,
  1178. IN HCRYPTPROV hProv,
  1179. IN HCRYPTHASH hHash,
  1180. IN DWORD dwParam,
  1181. OUT BYTE *pbData,
  1182. IN OUT DWORD *pdwDataLen,
  1183. IN DWORD dwFlags);
  1184. void LogException(
  1185. void);
  1186. void LogNotCalled(
  1187. DWORD dwReturn);
  1188. };
  1189. class CLogHashData
  1190. : public CLogObject
  1191. {
  1192. protected:
  1193. // Properties
  1194. struct {
  1195. LogHeader lh;
  1196. HCRYPTPROV hProv;
  1197. HCRYPTHASH hHash;
  1198. LogBuffer bfData;
  1199. DWORD dwFlags;
  1200. } m_LogData;
  1201. public:
  1202. // Constructors & Destructor
  1203. CLogHashData(void);
  1204. ~CLogHashData();
  1205. // Properties
  1206. // Methods
  1207. void Request(
  1208. IN HCRYPTPROV hProv,
  1209. IN HCRYPTHASH hHash,
  1210. IN CONST BYTE *pbData,
  1211. IN DWORD dwDataLen,
  1212. IN DWORD dwFlags);
  1213. void Response(
  1214. BOOL fStatus,
  1215. IN HCRYPTPROV hProv,
  1216. IN HCRYPTHASH hHash,
  1217. IN CONST BYTE *pbData,
  1218. IN DWORD dwDataLen,
  1219. IN DWORD dwFlags);
  1220. void LogException(
  1221. void);
  1222. void LogNotCalled(
  1223. DWORD dwReturn);
  1224. };
  1225. class CLogHashSessionKey
  1226. : public CLogObject
  1227. {
  1228. protected:
  1229. // Properties
  1230. struct {
  1231. LogHeader lh;
  1232. HCRYPTPROV hProv;
  1233. HCRYPTHASH hHash;
  1234. HCRYPTKEY hKey;
  1235. DWORD dwFlags;
  1236. } m_LogData;
  1237. public:
  1238. // Constructors & Destructor
  1239. CLogHashSessionKey(void);
  1240. ~CLogHashSessionKey();
  1241. // Properties
  1242. // Methods
  1243. void Request(
  1244. IN HCRYPTPROV hProv,
  1245. IN HCRYPTHASH hHash,
  1246. IN HCRYPTKEY hKey,
  1247. IN DWORD dwFlags);
  1248. void Response(
  1249. BOOL fStatus,
  1250. IN HCRYPTPROV hProv,
  1251. IN HCRYPTHASH hHash,
  1252. IN HCRYPTKEY hKey,
  1253. IN DWORD dwFlags);
  1254. void LogException(
  1255. void);
  1256. void LogNotCalled(
  1257. DWORD dwReturn);
  1258. };
  1259. class CLogSetHashParam
  1260. : public CLogObject
  1261. {
  1262. protected:
  1263. // Properties
  1264. struct {
  1265. LogHeader lh;
  1266. HCRYPTPROV hProv;
  1267. HCRYPTHASH hHash;
  1268. DWORD dwParam;
  1269. LogBuffer bfData;
  1270. DWORD dwFlags;
  1271. } m_LogData;
  1272. public:
  1273. // Constructors & Destructor
  1274. CLogSetHashParam(void);
  1275. ~CLogSetHashParam();
  1276. // Properties
  1277. // Methods
  1278. void Request(
  1279. IN HCRYPTPROV hProv,
  1280. IN HCRYPTHASH hHash,
  1281. IN DWORD dwParam,
  1282. IN CONST BYTE *pbData,
  1283. IN DWORD dwLength,
  1284. IN DWORD dwFlags);
  1285. void Response(
  1286. BOOL fStatus,
  1287. IN HCRYPTPROV hProv,
  1288. IN HCRYPTHASH hHash,
  1289. IN DWORD dwParam,
  1290. IN CONST BYTE *pbData,
  1291. IN DWORD dwFlags);
  1292. void LogException(
  1293. void);
  1294. void LogNotCalled(
  1295. DWORD dwReturn);
  1296. };
  1297. class CLogSignHash
  1298. : public CLogObject
  1299. {
  1300. protected:
  1301. // Properties
  1302. struct {
  1303. LogHeader lh;
  1304. HCRYPTPROV hProv;
  1305. HCRYPTHASH hHash;
  1306. DWORD dwKeySpec;
  1307. LogBuffer bfDescription;
  1308. DWORD dwFlags;
  1309. DWORD dwSigLen;
  1310. LogBuffer bfSignature;
  1311. } m_LogData;
  1312. public:
  1313. // Constructors & Destructor
  1314. CLogSignHash(void);
  1315. ~CLogSignHash();
  1316. // Properties
  1317. // Methods
  1318. void Request(
  1319. IN HCRYPTPROV hProv,
  1320. IN HCRYPTHASH hHash,
  1321. IN DWORD dwKeySpec,
  1322. IN LPCTSTR sDescription,
  1323. IN DWORD dwFlags,
  1324. OUT BYTE *pbSignature,
  1325. IN OUT DWORD *pdwSigLen);
  1326. void Response(
  1327. BOOL fStatus,
  1328. IN HCRYPTPROV hProv,
  1329. IN HCRYPTHASH hHash,
  1330. IN DWORD dwKeySpec,
  1331. IN LPCTSTR sDescription,
  1332. IN DWORD dwFlags,
  1333. OUT BYTE *pbSignature,
  1334. IN OUT DWORD *pdwSigLen);
  1335. void LogException(
  1336. void);
  1337. void LogNotCalled(
  1338. DWORD dwReturn);
  1339. };
  1340. class CLogVerifySignature
  1341. : public CLogObject
  1342. {
  1343. protected:
  1344. // Properties
  1345. struct {
  1346. LogHeader lh;
  1347. HCRYPTPROV hProv;
  1348. HCRYPTHASH hHash;
  1349. LogBuffer bfSignature;
  1350. DWORD dwSigLen;
  1351. HCRYPTKEY hPubKey;
  1352. LogBuffer bfDescription;
  1353. DWORD dwFlags;
  1354. } m_LogData;
  1355. public:
  1356. // Constructors & Destructor
  1357. CLogVerifySignature(void);
  1358. ~CLogVerifySignature();
  1359. // Properties
  1360. // Methods
  1361. void Request(
  1362. IN HCRYPTPROV hProv,
  1363. IN HCRYPTHASH hHash,
  1364. IN CONST BYTE *pbSignature,
  1365. IN DWORD dwSigLen,
  1366. IN HCRYPTKEY hPubKey,
  1367. IN LPCTSTR sDescription,
  1368. IN DWORD dwFlags);
  1369. void Response(
  1370. BOOL fStatus,
  1371. IN HCRYPTPROV hProv,
  1372. IN HCRYPTHASH hHash,
  1373. IN CONST BYTE *pbSignature,
  1374. IN DWORD dwSigLen,
  1375. IN HCRYPTKEY hPubKey,
  1376. IN LPCTSTR sDescription,
  1377. IN DWORD dwFlags);
  1378. void LogException(
  1379. void);
  1380. void LogNotCalled(
  1381. DWORD dwReturn);
  1382. };
  1383. class CLogDuplicateHash
  1384. : public CLogObject
  1385. {
  1386. protected:
  1387. // Properties
  1388. struct {
  1389. LogHeader lh;
  1390. HCRYPTPROV hProv;
  1391. HCRYPTHASH hHash;
  1392. DWORD *pdwReserved;
  1393. DWORD dwFlags;
  1394. HCRYPTHASH hPHash;
  1395. } m_LogData;
  1396. public:
  1397. // Constructors & Destructor
  1398. CLogDuplicateHash(void);
  1399. ~CLogDuplicateHash();
  1400. // Properties
  1401. // Methods
  1402. void Request(
  1403. IN HCRYPTPROV hUID,
  1404. IN HCRYPTHASH hHash,
  1405. IN DWORD *pdwReserved,
  1406. IN DWORD dwFlags,
  1407. IN HCRYPTHASH *phHash);
  1408. void Response(
  1409. BOOL fStatus,
  1410. IN HCRYPTPROV hUID,
  1411. IN HCRYPTHASH hHash,
  1412. IN DWORD *pdwReserved,
  1413. IN DWORD dwFlags,
  1414. IN HCRYPTHASH *phHash);
  1415. void LogException(
  1416. void);
  1417. void LogNotCalled(
  1418. DWORD dwReturn);
  1419. };
  1420. class CLogDuplicateKey
  1421. : public CLogObject
  1422. {
  1423. protected:
  1424. // Properties
  1425. struct {
  1426. LogHeader lh;
  1427. HCRYPTPROV hProv;
  1428. HCRYPTKEY hKey;
  1429. DWORD *pdwReserved;
  1430. DWORD dwFlags;
  1431. HCRYPTKEY hPKey;
  1432. } m_LogData;
  1433. public:
  1434. // Constructors & Destructor
  1435. CLogDuplicateKey(void);
  1436. ~CLogDuplicateKey();
  1437. // Properties
  1438. // Methods
  1439. void Request(
  1440. IN HCRYPTPROV hUID,
  1441. IN HCRYPTKEY hKey,
  1442. IN DWORD *pdwReserved,
  1443. IN DWORD dwFlags,
  1444. IN HCRYPTKEY *phKey);
  1445. void Response(
  1446. BOOL fStatus,
  1447. IN HCRYPTPROV hUID,
  1448. IN HCRYPTKEY hKey,
  1449. IN DWORD *pdwReserved,
  1450. IN DWORD dwFlags,
  1451. IN HCRYPTKEY *phKey);
  1452. void LogException(
  1453. void);
  1454. void LogNotCalled(
  1455. DWORD dwReturn);
  1456. };
  1457. #endif // _LOGCSP_H_