PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nssckfwc.h

http://firefox-mac-pdf.googlecode.com/
C Header | 1049 lines | 585 code | 76 blank | 388 comment | 0 complexity | 714a295976e185ae140ea8abbfb96180 MD5 | raw file
  1. /* ***** BEGIN LICENSE BLOCK *****
  2. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3. *
  4. * The contents of this file are subject to the Mozilla Public License Version
  5. * 1.1 (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. * http://www.mozilla.org/MPL/
  8. *
  9. * Software distributed under the License is distributed on an "AS IS" basis,
  10. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. * for the specific language governing rights and limitations under the
  12. * License.
  13. *
  14. * The Original Code is the Netscape security libraries.
  15. *
  16. * The Initial Developer of the Original Code is
  17. * Netscape Communications Corporation.
  18. * Portions created by the Initial Developer are Copyright (C) 1994-2000
  19. * the Initial Developer. All Rights Reserved.
  20. *
  21. * Contributor(s):
  22. *
  23. * Alternatively, the contents of this file may be used under the terms of
  24. * either the GNU General Public License Version 2 or later (the "GPL"), or
  25. * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  26. * in which case the provisions of the GPL or the LGPL are applicable instead
  27. * of those above. If you wish to allow use of your version of this file only
  28. * under the terms of either the GPL or the LGPL, and not to allow others to
  29. * use your version of this file under the terms of the MPL, indicate your
  30. * decision by deleting the provisions above and replace them with the notice
  31. * and other provisions required by the GPL or the LGPL. If you do not delete
  32. * the provisions above, a recipient may use your version of this file under
  33. * the terms of any one of the MPL, the GPL or the LGPL.
  34. *
  35. * ***** END LICENSE BLOCK ***** */
  36. #ifndef NSSCKFWC_H
  37. #define NSSCKFWC_H
  38. #ifdef DEBUG
  39. static const char NSSCKFWC_CVS_ID[] = "@(#) $RCSfile: nssckfwc.h,v $ $Revision: 1.3 $ $Date: 2005/01/20 02:25:45 $";
  40. #endif /* DEBUG */
  41. /*
  42. * nssckfwc.h
  43. *
  44. * This file prototypes all of the NSS Cryptoki Framework "wrapper"
  45. * which implement the PKCS#11 API. Technically, these are public
  46. * routines (with capital "NSS" prefixes), since they are called
  47. * from (generated) code within a Module using the Framework.
  48. * However, they should not be called except from those generated
  49. * calls. Hence, the prototypes have been split out into this file.
  50. */
  51. #ifndef NSSCKT_H
  52. #include "nssckt.h"
  53. #endif /* NSSCKT_H */
  54. #ifndef NSSCKFWT_H
  55. #include "nssckfwt.h"
  56. #endif /* NSSCKFWT_H */
  57. #ifndef NSSCKMDT_H
  58. #include "nssckmdt.h"
  59. #endif /* NSSCKMDT_H */
  60. /*
  61. * NSSCKFWC_Initialize
  62. * NSSCKFWC_Finalize
  63. * NSSCKFWC_GetInfo
  64. * -- NSSCKFWC_GetFunctionList -- see the API insert file
  65. * NSSCKFWC_GetSlotList
  66. * NSSCKFWC_GetSlotInfo
  67. * NSSCKFWC_GetTokenInfo
  68. * NSSCKFWC_WaitForSlotEvent
  69. * NSSCKFWC_GetMechanismList
  70. * NSSCKFWC_GetMechanismInfo
  71. * NSSCKFWC_InitToken
  72. * NSSCKFWC_InitPIN
  73. * NSSCKFWC_SetPIN
  74. * NSSCKFWC_OpenSession
  75. * NSSCKFWC_CloseSession
  76. * NSSCKFWC_CloseAllSessions
  77. * NSSCKFWC_GetSessionInfo
  78. * NSSCKFWC_GetOperationState
  79. * NSSCKFWC_SetOperationState
  80. * NSSCKFWC_Login
  81. * NSSCKFWC_Logout
  82. * NSSCKFWC_CreateObject
  83. * NSSCKFWC_CopyObject
  84. * NSSCKFWC_DestroyObject
  85. * NSSCKFWC_GetObjectSize
  86. * NSSCKFWC_GetAttributeValue
  87. * NSSCKFWC_SetAttributeValue
  88. * NSSCKFWC_FindObjectsInit
  89. * NSSCKFWC_FindObjects
  90. * NSSCKFWC_FindObjectsFinal
  91. * NSSCKFWC_EncryptInit
  92. * NSSCKFWC_Encrypt
  93. * NSSCKFWC_EncryptUpdate
  94. * NSSCKFWC_EncryptFinal
  95. * NSSCKFWC_DecryptInit
  96. * NSSCKFWC_Decrypt
  97. * NSSCKFWC_DecryptUpdate
  98. * NSSCKFWC_DecryptFinal
  99. * NSSCKFWC_DigestInit
  100. * NSSCKFWC_Digest
  101. * NSSCKFWC_DigestUpdate
  102. * NSSCKFWC_DigestKey
  103. * NSSCKFWC_DigestFinal
  104. * NSSCKFWC_SignInit
  105. * NSSCKFWC_Sign
  106. * NSSCKFWC_SignUpdate
  107. * NSSCKFWC_SignFinal
  108. * NSSCKFWC_SignRecoverInit
  109. * NSSCKFWC_SignRecover
  110. * NSSCKFWC_VerifyInit
  111. * NSSCKFWC_Verify
  112. * NSSCKFWC_VerifyUpdate
  113. * NSSCKFWC_VerifyFinal
  114. * NSSCKFWC_VerifyRecoverInit
  115. * NSSCKFWC_VerifyRecover
  116. * NSSCKFWC_DigestEncryptUpdate
  117. * NSSCKFWC_DecryptDigestUpdate
  118. * NSSCKFWC_SignEncryptUpdate
  119. * NSSCKFWC_DecryptVerifyUpdate
  120. * NSSCKFWC_GenerateKey
  121. * NSSCKFWC_GenerateKeyPair
  122. * NSSCKFWC_WrapKey
  123. * NSSCKFWC_UnwrapKey
  124. * NSSCKFWC_DeriveKey
  125. * NSSCKFWC_SeedRandom
  126. * NSSCKFWC_GenerateRandom
  127. * NSSCKFWC_GetFunctionStatus
  128. * NSSCKFWC_CancelFunction
  129. */
  130. /*
  131. * NSSCKFWC_Initialize
  132. *
  133. */
  134. NSS_EXTERN CK_RV
  135. NSSCKFWC_Initialize
  136. (
  137. NSSCKFWInstance **pFwInstance,
  138. NSSCKMDInstance *mdInstance,
  139. CK_VOID_PTR pInitArgs
  140. );
  141. /*
  142. * NSSCKFWC_Finalize
  143. *
  144. */
  145. NSS_EXTERN CK_RV
  146. NSSCKFWC_Finalize
  147. (
  148. NSSCKFWInstance **pFwInstance
  149. );
  150. /*
  151. * NSSCKFWC_GetInfo
  152. *
  153. */
  154. NSS_EXTERN CK_RV
  155. NSSCKFWC_GetInfo
  156. (
  157. NSSCKFWInstance *fwInstance,
  158. CK_INFO_PTR pInfo
  159. );
  160. /*
  161. * C_GetFunctionList is implemented entirely in the Module's file which
  162. * includes the Framework API insert file. It requires no "actual"
  163. * NSSCKFW routine.
  164. */
  165. /*
  166. * NSSCKFWC_GetSlotList
  167. *
  168. */
  169. NSS_EXTERN CK_RV
  170. NSSCKFWC_GetSlotList
  171. (
  172. NSSCKFWInstance *fwInstance,
  173. CK_BBOOL tokenPresent,
  174. CK_SLOT_ID_PTR pSlotList,
  175. CK_ULONG_PTR pulCount
  176. );
  177. /*
  178. * NSSCKFWC_GetSlotInfo
  179. *
  180. */
  181. NSS_EXTERN CK_RV
  182. NSSCKFWC_GetSlotInfo
  183. (
  184. NSSCKFWInstance *fwInstance,
  185. CK_SLOT_ID slotID,
  186. CK_SLOT_INFO_PTR pInfo
  187. );
  188. /*
  189. * NSSCKFWC_GetTokenInfo
  190. *
  191. */
  192. NSS_EXTERN CK_RV
  193. NSSCKFWC_GetTokenInfo
  194. (
  195. NSSCKFWInstance *fwInstance,
  196. CK_SLOT_ID slotID,
  197. CK_TOKEN_INFO_PTR pInfo
  198. );
  199. /*
  200. * NSSCKFWC_WaitForSlotEvent
  201. *
  202. */
  203. NSS_EXTERN CK_RV
  204. NSSCKFWC_WaitForSlotEvent
  205. (
  206. NSSCKFWInstance *fwInstance,
  207. CK_FLAGS flags,
  208. CK_SLOT_ID_PTR pSlot,
  209. CK_VOID_PTR pReserved
  210. );
  211. /*
  212. * NSSCKFWC_GetMechanismList
  213. *
  214. */
  215. NSS_EXTERN CK_RV
  216. NSSCKFWC_GetMechanismList
  217. (
  218. NSSCKFWInstance *fwInstance,
  219. CK_SLOT_ID slotID,
  220. CK_MECHANISM_TYPE_PTR pMechanismList,
  221. CK_ULONG_PTR pulCount
  222. );
  223. /*
  224. * NSSCKFWC_GetMechanismInfo
  225. *
  226. */
  227. NSS_EXTERN CK_RV
  228. NSSCKFWC_GetMechanismInfo
  229. (
  230. NSSCKFWInstance *fwInstance,
  231. CK_SLOT_ID slotID,
  232. CK_MECHANISM_TYPE type,
  233. CK_MECHANISM_INFO_PTR pInfo
  234. );
  235. /*
  236. * NSSCKFWC_InitToken
  237. *
  238. */
  239. NSS_EXTERN CK_RV
  240. NSSCKFWC_InitToken
  241. (
  242. NSSCKFWInstance *fwInstance,
  243. CK_SLOT_ID slotID,
  244. CK_CHAR_PTR pPin,
  245. CK_ULONG ulPinLen,
  246. CK_CHAR_PTR pLabel
  247. );
  248. /*
  249. * NSSCKFWC_InitPIN
  250. *
  251. */
  252. NSS_EXTERN CK_RV
  253. NSSCKFWC_InitPIN
  254. (
  255. NSSCKFWInstance *fwInstance,
  256. CK_SESSION_HANDLE hSession,
  257. CK_CHAR_PTR pPin,
  258. CK_ULONG ulPinLen
  259. );
  260. /*
  261. * NSSCKFWC_SetPIN
  262. *
  263. */
  264. NSS_EXTERN CK_RV
  265. NSSCKFWC_SetPIN
  266. (
  267. NSSCKFWInstance *fwInstance,
  268. CK_SESSION_HANDLE hSession,
  269. CK_CHAR_PTR pOldPin,
  270. CK_ULONG ulOldLen,
  271. CK_CHAR_PTR pNewPin,
  272. CK_ULONG ulNewLen
  273. );
  274. /*
  275. * NSSCKFWC_OpenSession
  276. *
  277. */
  278. NSS_EXTERN CK_RV
  279. NSSCKFWC_OpenSession
  280. (
  281. NSSCKFWInstance *fwInstance,
  282. CK_SLOT_ID slotID,
  283. CK_FLAGS flags,
  284. CK_VOID_PTR pApplication,
  285. CK_NOTIFY Notify,
  286. CK_SESSION_HANDLE_PTR phSession
  287. );
  288. /*
  289. * NSSCKFWC_CloseSession
  290. *
  291. */
  292. NSS_EXTERN CK_RV
  293. NSSCKFWC_CloseSession
  294. (
  295. NSSCKFWInstance *fwInstance,
  296. CK_SESSION_HANDLE hSession
  297. );
  298. /*
  299. * NSSCKFWC_CloseAllSessions
  300. *
  301. */
  302. NSS_EXTERN CK_RV
  303. NSSCKFWC_CloseAllSessions
  304. (
  305. NSSCKFWInstance *fwInstance,
  306. CK_SLOT_ID slotID
  307. );
  308. /*
  309. * NSSCKFWC_GetSessionInfo
  310. *
  311. */
  312. NSS_EXTERN CK_RV
  313. NSSCKFWC_GetSessionInfo
  314. (
  315. NSSCKFWInstance *fwInstance,
  316. CK_SESSION_HANDLE hSession,
  317. CK_SESSION_INFO_PTR pInfo
  318. );
  319. /*
  320. * NSSCKFWC_GetOperationState
  321. *
  322. */
  323. NSS_EXTERN CK_RV
  324. NSSCKFWC_GetOperationState
  325. (
  326. NSSCKFWInstance *fwInstance,
  327. CK_SESSION_HANDLE hSession,
  328. CK_BYTE_PTR pOperationState,
  329. CK_ULONG_PTR pulOperationStateLen
  330. );
  331. /*
  332. * NSSCKFWC_SetOperationState
  333. *
  334. */
  335. NSS_EXTERN CK_RV
  336. NSSCKFWC_SetOperationState
  337. (
  338. NSSCKFWInstance *fwInstance,
  339. CK_SESSION_HANDLE hSession,
  340. CK_BYTE_PTR pOperationState,
  341. CK_ULONG ulOperationStateLen,
  342. CK_OBJECT_HANDLE hEncryptionKey,
  343. CK_OBJECT_HANDLE hAuthenticationKey
  344. );
  345. /*
  346. * NSSCKFWC_Login
  347. *
  348. */
  349. NSS_EXTERN CK_RV
  350. NSSCKFWC_Login
  351. (
  352. NSSCKFWInstance *fwInstance,
  353. CK_SESSION_HANDLE hSession,
  354. CK_USER_TYPE userType,
  355. CK_CHAR_PTR pPin,
  356. CK_ULONG ulPinLen
  357. );
  358. /*
  359. * NSSCKFWC_Logout
  360. *
  361. */
  362. NSS_EXTERN CK_RV
  363. NSSCKFWC_Logout
  364. (
  365. NSSCKFWInstance *fwInstance,
  366. CK_SESSION_HANDLE hSession
  367. );
  368. /*
  369. * NSSCKFWC_CreateObject
  370. *
  371. */
  372. NSS_EXTERN CK_RV
  373. NSSCKFWC_CreateObject
  374. (
  375. NSSCKFWInstance *fwInstance,
  376. CK_SESSION_HANDLE hSession,
  377. CK_ATTRIBUTE_PTR pTemplate,
  378. CK_ULONG ulCount,
  379. CK_OBJECT_HANDLE_PTR phObject
  380. );
  381. /*
  382. * NSSCKFWC_CopyObject
  383. *
  384. */
  385. NSS_EXTERN CK_RV
  386. NSSCKFWC_CopyObject
  387. (
  388. NSSCKFWInstance *fwInstance,
  389. CK_SESSION_HANDLE hSession,
  390. CK_OBJECT_HANDLE hObject,
  391. CK_ATTRIBUTE_PTR pTemplate,
  392. CK_ULONG ulCount,
  393. CK_OBJECT_HANDLE_PTR phNewObject
  394. );
  395. /*
  396. * NSSCKFWC_DestroyObject
  397. *
  398. */
  399. NSS_EXTERN CK_RV
  400. NSSCKFWC_DestroyObject
  401. (
  402. NSSCKFWInstance *fwInstance,
  403. CK_SESSION_HANDLE hSession,
  404. CK_OBJECT_HANDLE hObject
  405. );
  406. /*
  407. * NSSCKFWC_GetObjectSize
  408. *
  409. */
  410. NSS_EXTERN CK_RV
  411. NSSCKFWC_GetObjectSize
  412. (
  413. NSSCKFWInstance *fwInstance,
  414. CK_SESSION_HANDLE hSession,
  415. CK_OBJECT_HANDLE hObject,
  416. CK_ULONG_PTR pulSize
  417. );
  418. /*
  419. * NSSCKFWC_GetAttributeValue
  420. *
  421. */
  422. NSS_EXTERN CK_RV
  423. NSSCKFWC_GetAttributeValue
  424. (
  425. NSSCKFWInstance *fwInstance,
  426. CK_SESSION_HANDLE hSession,
  427. CK_OBJECT_HANDLE hObject,
  428. CK_ATTRIBUTE_PTR pTemplate,
  429. CK_ULONG ulCount
  430. );
  431. /*
  432. * NSSCKFWC_SetAttributeValue
  433. *
  434. */
  435. NSS_EXTERN CK_RV
  436. NSSCKFWC_SetAttributeValue
  437. (
  438. NSSCKFWInstance *fwInstance,
  439. CK_SESSION_HANDLE hSession,
  440. CK_OBJECT_HANDLE hObject,
  441. CK_ATTRIBUTE_PTR pTemplate,
  442. CK_ULONG ulCount
  443. );
  444. /*
  445. * NSSCKFWC_FindObjectsInit
  446. *
  447. */
  448. NSS_EXTERN CK_RV
  449. NSSCKFWC_FindObjectsInit
  450. (
  451. NSSCKFWInstance *fwInstance,
  452. CK_SESSION_HANDLE hSession,
  453. CK_ATTRIBUTE_PTR pTemplate,
  454. CK_ULONG ulCount
  455. );
  456. /*
  457. * NSSCKFWC_FindObjects
  458. *
  459. */
  460. NSS_EXTERN CK_RV
  461. NSSCKFWC_FindObjects
  462. (
  463. NSSCKFWInstance *fwInstance,
  464. CK_SESSION_HANDLE hSession,
  465. CK_OBJECT_HANDLE_PTR phObject,
  466. CK_ULONG ulMaxObjectCount,
  467. CK_ULONG_PTR pulObjectCount
  468. );
  469. /*
  470. * NSSCKFWC_FindObjectsFinal
  471. *
  472. */
  473. NSS_EXTERN CK_RV
  474. NSSCKFWC_FindObjectsFinal
  475. (
  476. NSSCKFWInstance *fwInstance,
  477. CK_SESSION_HANDLE hSession
  478. );
  479. /*
  480. * NSSCKFWC_EncryptInit
  481. *
  482. */
  483. NSS_EXTERN CK_RV
  484. NSSCKFWC_EncryptInit
  485. (
  486. NSSCKFWInstance *fwInstance,
  487. CK_SESSION_HANDLE hSession,
  488. CK_MECHANISM_PTR pMechanism,
  489. CK_OBJECT_HANDLE hKey
  490. );
  491. /*
  492. * NSSCKFWC_Encrypt
  493. *
  494. */
  495. NSS_EXTERN CK_RV
  496. NSSCKFWC_Encrypt
  497. (
  498. NSSCKFWInstance *fwInstance,
  499. CK_SESSION_HANDLE hSession,
  500. CK_BYTE_PTR pData,
  501. CK_ULONG ulDataLen,
  502. CK_BYTE_PTR pEncryptedData,
  503. CK_ULONG_PTR pulEncryptedDataLen
  504. );
  505. /*
  506. * NSSCKFWC_EncryptUpdate
  507. *
  508. */
  509. NSS_EXTERN CK_RV
  510. NSSCKFWC_EncryptUpdate
  511. (
  512. NSSCKFWInstance *fwInstance,
  513. CK_SESSION_HANDLE hSession,
  514. CK_BYTE_PTR pPart,
  515. CK_ULONG ulPartLen,
  516. CK_BYTE_PTR pEncryptedPart,
  517. CK_ULONG_PTR pulEncryptedPartLen
  518. );
  519. /*
  520. * NSSCKFWC_EncryptFinal
  521. *
  522. */
  523. NSS_EXTERN CK_RV
  524. NSSCKFWC_EncryptFinal
  525. (
  526. NSSCKFWInstance *fwInstance,
  527. CK_SESSION_HANDLE hSession,
  528. CK_BYTE_PTR pLastEncryptedPart,
  529. CK_ULONG_PTR pulLastEncryptedPartLen
  530. );
  531. /*
  532. * NSSCKFWC_DecryptInit
  533. *
  534. */
  535. NSS_EXTERN CK_RV
  536. NSSCKFWC_DecryptInit
  537. (
  538. NSSCKFWInstance *fwInstance,
  539. CK_SESSION_HANDLE hSession,
  540. CK_MECHANISM_PTR pMechanism,
  541. CK_OBJECT_HANDLE hKey
  542. );
  543. /*
  544. * NSSCKFWC_Decrypt
  545. *
  546. */
  547. NSS_EXTERN CK_RV
  548. NSSCKFWC_Decrypt
  549. (
  550. NSSCKFWInstance *fwInstance,
  551. CK_SESSION_HANDLE hSession,
  552. CK_BYTE_PTR pEncryptedData,
  553. CK_ULONG ulEncryptedDataLen,
  554. CK_BYTE_PTR pData,
  555. CK_ULONG_PTR pulDataLen
  556. );
  557. /*
  558. * NSSCKFWC_DecryptUpdate
  559. *
  560. */
  561. NSS_EXTERN CK_RV
  562. NSSCKFWC_DecryptUpdate
  563. (
  564. NSSCKFWInstance *fwInstance,
  565. CK_SESSION_HANDLE hSession,
  566. CK_BYTE_PTR pEncryptedPart,
  567. CK_ULONG ulEncryptedPartLen,
  568. CK_BYTE_PTR pPart,
  569. CK_ULONG_PTR pulPartLen
  570. );
  571. /*
  572. * NSSCKFWC_DecryptFinal
  573. *
  574. */
  575. NSS_EXTERN CK_RV
  576. NSSCKFWC_DecryptFinal
  577. (
  578. NSSCKFWInstance *fwInstance,
  579. CK_SESSION_HANDLE hSession,
  580. CK_BYTE_PTR pLastPart,
  581. CK_ULONG_PTR pulLastPartLen
  582. );
  583. /*
  584. * NSSCKFWC_DigestInit
  585. *
  586. */
  587. NSS_EXTERN CK_RV
  588. NSSCKFWC_DigestInit
  589. (
  590. NSSCKFWInstance *fwInstance,
  591. CK_SESSION_HANDLE hSession,
  592. CK_MECHANISM_PTR pMechanism
  593. );
  594. /*
  595. * NSSCKFWC_Digest
  596. *
  597. */
  598. NSS_EXTERN CK_RV
  599. NSSCKFWC_Digest
  600. (
  601. NSSCKFWInstance *fwInstance,
  602. CK_SESSION_HANDLE hSession,
  603. CK_BYTE_PTR pData,
  604. CK_ULONG ulDataLen,
  605. CK_BYTE_PTR pDigest,
  606. CK_ULONG_PTR pulDigestLen
  607. );
  608. /*
  609. * NSSCKFWC_DigestUpdate
  610. *
  611. */
  612. NSS_EXTERN CK_RV
  613. NSSCKFWC_DigestUpdate
  614. (
  615. NSSCKFWInstance *fwInstance,
  616. CK_SESSION_HANDLE hSession,
  617. CK_BYTE_PTR pData,
  618. CK_ULONG ulDataLen
  619. );
  620. /*
  621. * NSSCKFWC_DigestKey
  622. *
  623. */
  624. NSS_EXTERN CK_RV
  625. NSSCKFWC_DigestKey
  626. (
  627. NSSCKFWInstance *fwInstance,
  628. CK_SESSION_HANDLE hSession,
  629. CK_OBJECT_HANDLE hKey
  630. );
  631. /*
  632. * NSSCKFWC_DigestFinal
  633. *
  634. */
  635. NSS_EXTERN CK_RV
  636. NSSCKFWC_DigestFinal
  637. (
  638. NSSCKFWInstance *fwInstance,
  639. CK_SESSION_HANDLE hSession,
  640. CK_BYTE_PTR pDigest,
  641. CK_ULONG_PTR pulDigestLen
  642. );
  643. /*
  644. * NSSCKFWC_SignInit
  645. *
  646. */
  647. NSS_EXTERN CK_RV
  648. NSSCKFWC_SignInit
  649. (
  650. NSSCKFWInstance *fwInstance,
  651. CK_SESSION_HANDLE hSession,
  652. CK_MECHANISM_PTR pMechanism,
  653. CK_OBJECT_HANDLE hKey
  654. );
  655. /*
  656. * NSSCKFWC_Sign
  657. *
  658. */
  659. NSS_EXTERN CK_RV
  660. NSSCKFWC_Sign
  661. (
  662. NSSCKFWInstance *fwInstance,
  663. CK_SESSION_HANDLE hSession,
  664. CK_BYTE_PTR pData,
  665. CK_ULONG ulDataLen,
  666. CK_BYTE_PTR pSignature,
  667. CK_ULONG_PTR pulSignatureLen
  668. );
  669. /*
  670. * NSSCKFWC_SignUpdate
  671. *
  672. */
  673. NSS_EXTERN CK_RV
  674. NSSCKFWC_SignUpdate
  675. (
  676. NSSCKFWInstance *fwInstance,
  677. CK_SESSION_HANDLE hSession,
  678. CK_BYTE_PTR pPart,
  679. CK_ULONG ulPartLen
  680. );
  681. /*
  682. * NSSCKFWC_SignFinal
  683. *
  684. */
  685. NSS_EXTERN CK_RV
  686. NSSCKFWC_SignFinal
  687. (
  688. NSSCKFWInstance *fwInstance,
  689. CK_SESSION_HANDLE hSession,
  690. CK_BYTE_PTR pSignature,
  691. CK_ULONG_PTR pulSignatureLen
  692. );
  693. /*
  694. * NSSCKFWC_SignRecoverInit
  695. *
  696. */
  697. NSS_EXTERN CK_RV
  698. NSSCKFWC_SignRecoverInit
  699. (
  700. NSSCKFWInstance *fwInstance,
  701. CK_SESSION_HANDLE hSession,
  702. CK_MECHANISM_PTR pMechanism,
  703. CK_OBJECT_HANDLE hKey
  704. );
  705. /*
  706. * NSSCKFWC_SignRecover
  707. *
  708. */
  709. NSS_EXTERN CK_RV
  710. NSSCKFWC_SignRecover
  711. (
  712. NSSCKFWInstance *fwInstance,
  713. CK_SESSION_HANDLE hSession,
  714. CK_BYTE_PTR pData,
  715. CK_ULONG ulDataLen,
  716. CK_BYTE_PTR pSignature,
  717. CK_ULONG_PTR pulSignatureLen
  718. );
  719. /*
  720. * NSSCKFWC_VerifyInit
  721. *
  722. */
  723. NSS_EXTERN CK_RV
  724. NSSCKFWC_VerifyInit
  725. (
  726. NSSCKFWInstance *fwInstance,
  727. CK_SESSION_HANDLE hSession,
  728. CK_MECHANISM_PTR pMechanism,
  729. CK_OBJECT_HANDLE hKey
  730. );
  731. /*
  732. * NSSCKFWC_Verify
  733. *
  734. */
  735. NSS_EXTERN CK_RV
  736. NSSCKFWC_Verify
  737. (
  738. NSSCKFWInstance *fwInstance,
  739. CK_SESSION_HANDLE hSession,
  740. CK_BYTE_PTR pData,
  741. CK_ULONG ulDataLen,
  742. CK_BYTE_PTR pSignature,
  743. CK_ULONG ulSignatureLen
  744. );
  745. /*
  746. * NSSCKFWC_VerifyUpdate
  747. *
  748. */
  749. NSS_EXTERN CK_RV
  750. NSSCKFWC_VerifyUpdate
  751. (
  752. NSSCKFWInstance *fwInstance,
  753. CK_SESSION_HANDLE hSession,
  754. CK_BYTE_PTR pPart,
  755. CK_ULONG ulPartLen
  756. );
  757. /*
  758. * NSSCKFWC_VerifyFinal
  759. *
  760. */
  761. NSS_EXTERN CK_RV
  762. NSSCKFWC_VerifyFinal
  763. (
  764. NSSCKFWInstance *fwInstance,
  765. CK_SESSION_HANDLE hSession,
  766. CK_BYTE_PTR pSignature,
  767. CK_ULONG ulSignatureLen
  768. );
  769. /*
  770. * NSSCKFWC_VerifyRecoverInit
  771. *
  772. */
  773. NSS_EXTERN CK_RV
  774. NSSCKFWC_VerifyRecoverInit
  775. (
  776. NSSCKFWInstance *fwInstance,
  777. CK_SESSION_HANDLE hSession,
  778. CK_MECHANISM_PTR pMechanism,
  779. CK_OBJECT_HANDLE hKey
  780. );
  781. /*
  782. * NSSCKFWC_VerifyRecover
  783. *
  784. */
  785. NSS_EXTERN CK_RV
  786. NSSCKFWC_VerifyRecover
  787. (
  788. NSSCKFWInstance *fwInstance,
  789. CK_SESSION_HANDLE hSession,
  790. CK_BYTE_PTR pSignature,
  791. CK_ULONG ulSignatureLen,
  792. CK_BYTE_PTR pData,
  793. CK_ULONG_PTR pulDataLen
  794. );
  795. /*
  796. * NSSCKFWC_DigestEncryptUpdate
  797. *
  798. */
  799. NSS_EXTERN CK_RV
  800. NSSCKFWC_DigestEncryptUpdate
  801. (
  802. NSSCKFWInstance *fwInstance,
  803. CK_SESSION_HANDLE hSession,
  804. CK_BYTE_PTR pPart,
  805. CK_ULONG ulPartLen,
  806. CK_BYTE_PTR pEncryptedPart,
  807. CK_ULONG_PTR pulEncryptedPartLen
  808. );
  809. /*
  810. * NSSCKFWC_DecryptDigestUpdate
  811. *
  812. */
  813. NSS_EXTERN CK_RV
  814. NSSCKFWC_DecryptDigestUpdate
  815. (
  816. NSSCKFWInstance *fwInstance,
  817. CK_SESSION_HANDLE hSession,
  818. CK_BYTE_PTR pEncryptedPart,
  819. CK_ULONG ulEncryptedPartLen,
  820. CK_BYTE_PTR pPart,
  821. CK_ULONG_PTR pulPartLen
  822. );
  823. /*
  824. * NSSCKFWC_SignEncryptUpdate
  825. *
  826. */
  827. NSS_EXTERN CK_RV
  828. NSSCKFWC_SignEncryptUpdate
  829. (
  830. NSSCKFWInstance *fwInstance,
  831. CK_SESSION_HANDLE hSession,
  832. CK_BYTE_PTR pPart,
  833. CK_ULONG ulPartLen,
  834. CK_BYTE_PTR pEncryptedPart,
  835. CK_ULONG_PTR pulEncryptedPartLen
  836. );
  837. /*
  838. * NSSCKFWC_DecryptVerifyUpdate
  839. *
  840. */
  841. NSS_EXTERN CK_RV
  842. NSSCKFWC_DecryptVerifyUpdate
  843. (
  844. NSSCKFWInstance *fwInstance,
  845. CK_SESSION_HANDLE hSession,
  846. CK_BYTE_PTR pEncryptedPart,
  847. CK_ULONG ulEncryptedPartLen,
  848. CK_BYTE_PTR pPart,
  849. CK_ULONG_PTR pulPartLen
  850. );
  851. /*
  852. * NSSCKFWC_GenerateKey
  853. *
  854. */
  855. NSS_EXTERN CK_RV
  856. NSSCKFWC_GenerateKey
  857. (
  858. NSSCKFWInstance *fwInstance,
  859. CK_SESSION_HANDLE hSession,
  860. CK_MECHANISM_PTR pMechanism,
  861. CK_ATTRIBUTE_PTR pTemplate,
  862. CK_ULONG ulCount,
  863. CK_OBJECT_HANDLE_PTR phKey
  864. );
  865. /*
  866. * NSSCKFWC_GenerateKeyPair
  867. *
  868. */
  869. NSS_EXTERN CK_RV
  870. NSSCKFWC_GenerateKeyPair
  871. (
  872. NSSCKFWInstance *fwInstance,
  873. CK_SESSION_HANDLE hSession,
  874. CK_MECHANISM_PTR pMechanism,
  875. CK_ATTRIBUTE_PTR pPublicKeyTemplate,
  876. CK_ULONG ulPublicKeyAttributeCount,
  877. CK_ATTRIBUTE_PTR pPrivateKeyTemplate,
  878. CK_ULONG ulPrivateKeyAttributeCount,
  879. CK_OBJECT_HANDLE_PTR phPublicKey,
  880. CK_OBJECT_HANDLE_PTR phPrivateKey
  881. );
  882. /*
  883. * NSSCKFWC_WrapKey
  884. *
  885. */
  886. NSS_EXTERN CK_RV
  887. NSSCKFWC_WrapKey
  888. (
  889. NSSCKFWInstance *fwInstance,
  890. CK_SESSION_HANDLE hSession,
  891. CK_MECHANISM_PTR pMechanism,
  892. CK_OBJECT_HANDLE hWrappingKey,
  893. CK_OBJECT_HANDLE hKey,
  894. CK_BYTE_PTR pWrappedKey,
  895. CK_ULONG_PTR pulWrappedKeyLen
  896. );
  897. /*
  898. * NSSCKFWC_UnwrapKey
  899. *
  900. */
  901. NSS_EXTERN CK_RV
  902. NSSCKFWC_UnwrapKey
  903. (
  904. NSSCKFWInstance *fwInstance,
  905. CK_SESSION_HANDLE hSession,
  906. CK_MECHANISM_PTR pMechanism,
  907. CK_OBJECT_HANDLE hUnwrappingKey,
  908. CK_BYTE_PTR pWrappedKey,
  909. CK_ULONG ulWrappedKeyLen,
  910. CK_ATTRIBUTE_PTR pTemplate,
  911. CK_ULONG ulAttributeCount,
  912. CK_OBJECT_HANDLE_PTR phKey
  913. );
  914. /*
  915. * NSSCKFWC_DeriveKey
  916. *
  917. */
  918. NSS_EXTERN CK_RV
  919. NSSCKFWC_DeriveKey
  920. (
  921. NSSCKFWInstance *fwInstance,
  922. CK_SESSION_HANDLE hSession,
  923. CK_MECHANISM_PTR pMechanism,
  924. CK_OBJECT_HANDLE hBaseKey,
  925. CK_ATTRIBUTE_PTR pTemplate,
  926. CK_ULONG ulAttributeCount,
  927. CK_OBJECT_HANDLE_PTR phKey
  928. );
  929. /*
  930. * NSSCKFWC_SeedRandom
  931. *
  932. */
  933. NSS_EXTERN CK_RV
  934. NSSCKFWC_SeedRandom
  935. (
  936. NSSCKFWInstance *fwInstance,
  937. CK_SESSION_HANDLE hSession,
  938. CK_BYTE_PTR pSeed,
  939. CK_ULONG ulSeedLen
  940. );
  941. /*
  942. * NSSCKFWC_GenerateRandom
  943. *
  944. */
  945. NSS_EXTERN CK_RV
  946. NSSCKFWC_GenerateRandom
  947. (
  948. NSSCKFWInstance *fwInstance,
  949. CK_SESSION_HANDLE hSession,
  950. CK_BYTE_PTR pRandomData,
  951. CK_ULONG ulRandomLen
  952. );
  953. /*
  954. * NSSCKFWC_GetFunctionStatus
  955. *
  956. */
  957. NSS_EXTERN CK_RV
  958. NSSCKFWC_GetFunctionStatus
  959. (
  960. NSSCKFWInstance *fwInstance,
  961. CK_SESSION_HANDLE hSession
  962. );
  963. /*
  964. * NSSCKFWC_CancelFunction
  965. *
  966. */
  967. NSS_EXTERN CK_RV
  968. NSSCKFWC_CancelFunction
  969. (
  970. NSSCKFWInstance *fwInstance,
  971. CK_SESSION_HANDLE hSession
  972. );
  973. #endif /* NSSCKFWC_H */