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

/gecko_api/include/nssckfw.h

http://firefox-mac-pdf.googlecode.com/
C Header | 526 lines | 203 code | 76 blank | 247 comment | 0 complexity | 2819a53de4dc9cfd5ba851e7a2edc1f2 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 NSSCKFW_H
  37. #define NSSCKFW_H
  38. #ifdef DEBUG
  39. static const char NSSCKFW_CVS_ID[] = "@(#) $RCSfile: nssckfw.h,v $ $Revision: 1.5 $ $Date: 2005/12/16 00:48:01 $";
  40. #endif /* DEBUG */
  41. /*
  42. * nssckfw.h
  43. *
  44. * This file prototypes the publicly available calls of the
  45. * NSS Cryptoki Framework.
  46. */
  47. #ifndef NSSBASET_H
  48. #include "nssbaset.h"
  49. #endif /* NSSBASET_H */
  50. #ifndef NSSCKT_H
  51. #include "nssckt.h"
  52. #endif /* NSSCKT_H */
  53. #ifndef NSSCKFWT_H
  54. #include "nssckfwt.h"
  55. #endif /* NSSCKFWT_H */
  56. /*
  57. * NSSCKFWInstance
  58. *
  59. * NSSCKFWInstance_GetMDInstance
  60. * NSSCKFWInstance_GetArena
  61. * NSSCKFWInstance_MayCreatePthreads
  62. * NSSCKFWInstance_CreateMutex
  63. * NSSCKFWInstance_GetConfigurationData
  64. */
  65. /*
  66. * NSSCKFWInstance_GetMDInstance
  67. *
  68. */
  69. NSS_EXTERN NSSCKMDInstance *
  70. NSSCKFWInstance_GetMDInstance
  71. (
  72. NSSCKFWInstance *fwInstance
  73. );
  74. /*
  75. * NSSCKFWInstance_GetArena
  76. *
  77. */
  78. NSS_EXTERN NSSArena *
  79. NSSCKFWInstance_GetArena
  80. (
  81. NSSCKFWInstance *fwInstance,
  82. CK_RV *pError
  83. );
  84. /*
  85. * NSSCKFWInstance_MayCreatePthreads
  86. *
  87. */
  88. NSS_EXTERN CK_BBOOL
  89. NSSCKFWInstance_MayCreatePthreads
  90. (
  91. NSSCKFWInstance *fwInstance
  92. );
  93. /*
  94. * NSSCKFWInstance_CreateMutex
  95. *
  96. */
  97. NSS_EXTERN NSSCKFWMutex *
  98. NSSCKFWInstance_CreateMutex
  99. (
  100. NSSCKFWInstance *fwInstance,
  101. NSSArena *arena,
  102. CK_RV *pError
  103. );
  104. /*
  105. * NSSCKFWInstance_GetConfigurationData
  106. *
  107. */
  108. NSS_EXTERN NSSUTF8 *
  109. NSSCKFWInstance_GetConfigurationData
  110. (
  111. NSSCKFWInstance *fwInstance
  112. );
  113. /*
  114. * NSSCKFWInstance_GetInitArgs
  115. *
  116. */
  117. NSS_EXTERN CK_C_INITIALIZE_ARGS_PTR
  118. NSSCKFWInstance_GetInitArgs
  119. (
  120. NSSCKFWInstance *fwInstance
  121. );
  122. /*
  123. * NSSCKFWSlot
  124. *
  125. * NSSCKFWSlot_GetMDSlot
  126. * NSSCKFWSlot_GetFWInstance
  127. * NSSCKFWSlot_GetMDInstance
  128. *
  129. */
  130. /*
  131. * NSSCKFWSlot_GetMDSlot
  132. *
  133. */
  134. NSS_EXTERN NSSCKMDSlot *
  135. NSSCKFWSlot_GetMDSlot
  136. (
  137. NSSCKFWSlot *fwSlot
  138. );
  139. /*
  140. * NSSCKFWSlot_GetFWInstance
  141. *
  142. */
  143. NSS_EXTERN NSSCKFWInstance *
  144. NSSCKFWSlot_GetFWInstance
  145. (
  146. NSSCKFWSlot *fwSlot
  147. );
  148. /*
  149. * NSSCKFWSlot_GetMDInstance
  150. *
  151. */
  152. NSS_EXTERN NSSCKMDInstance *
  153. NSSCKFWSlot_GetMDInstance
  154. (
  155. NSSCKFWSlot *fwSlot
  156. );
  157. /*
  158. * NSSCKFWToken
  159. *
  160. * NSSCKFWToken_GetMDToken
  161. * NSSCKFWToken_GetFWSlot
  162. * NSSCKFWToken_GetMDSlot
  163. * NSSCKFWToken_GetSessionState
  164. *
  165. */
  166. /*
  167. * NSSCKFWToken_GetMDToken
  168. *
  169. */
  170. NSS_EXTERN NSSCKMDToken *
  171. NSSCKFWToken_GetMDToken
  172. (
  173. NSSCKFWToken *fwToken
  174. );
  175. /*
  176. * NSSCKFWToken_GetArena
  177. *
  178. */
  179. NSS_EXTERN NSSArena *
  180. NSSCKFWToken_GetArena
  181. (
  182. NSSCKFWToken *fwToken,
  183. CK_RV *pError
  184. );
  185. /*
  186. * NSSCKFWToken_GetFWSlot
  187. *
  188. */
  189. NSS_EXTERN NSSCKFWSlot *
  190. NSSCKFWToken_GetFWSlot
  191. (
  192. NSSCKFWToken *fwToken
  193. );
  194. /*
  195. * NSSCKFWToken_GetMDSlot
  196. *
  197. */
  198. NSS_EXTERN NSSCKMDSlot *
  199. NSSCKFWToken_GetMDSlot
  200. (
  201. NSSCKFWToken *fwToken
  202. );
  203. /*
  204. * NSSCKFWToken_GetSessionState
  205. *
  206. */
  207. NSS_EXTERN CK_STATE
  208. NSSCKFWToken_GetSessionState
  209. (
  210. NSSCKFWToken *fwToken
  211. );
  212. /*
  213. * NSSCKFWMechanism
  214. *
  215. * NSSKCFWMechanism_GetMDMechanism
  216. * NSSCKFWMechanism_GetParameter
  217. *
  218. */
  219. /*
  220. * NSSKCFWMechanism_GetMDMechanism
  221. *
  222. */
  223. NSS_EXTERN NSSCKMDMechanism *
  224. NSSCKFWMechanism_GetMDMechanism
  225. (
  226. NSSCKFWMechanism *fwMechanism
  227. );
  228. /*
  229. * NSSCKFWMechanism_GetParameter
  230. *
  231. */
  232. NSS_EXTERN NSSItem *
  233. NSSCKFWMechanism_GetParameter
  234. (
  235. NSSCKFWMechanism *fwMechanism
  236. );
  237. /*
  238. * NSSCKFWSession
  239. *
  240. * NSSCKFWSession_GetMDSession
  241. * NSSCKFWSession_GetArena
  242. * NSSCKFWSession_CallNotification
  243. * NSSCKFWSession_IsRWSession
  244. * NSSCKFWSession_IsSO
  245. * NSSCKFWSession_GetCurrentCryptoOperation
  246. *
  247. */
  248. /*
  249. * NSSCKFWSession_GetMDSession
  250. *
  251. */
  252. NSS_EXTERN NSSCKMDSession *
  253. NSSCKFWSession_GetMDSession
  254. (
  255. NSSCKFWSession *fwSession
  256. );
  257. /*
  258. * NSSCKFWSession_GetArena
  259. *
  260. */
  261. NSS_EXTERN NSSArena *
  262. NSSCKFWSession_GetArena
  263. (
  264. NSSCKFWSession *fwSession,
  265. CK_RV *pError
  266. );
  267. /*
  268. * NSSCKFWSession_CallNotification
  269. *
  270. */
  271. NSS_EXTERN CK_RV
  272. NSSCKFWSession_CallNotification
  273. (
  274. NSSCKFWSession *fwSession,
  275. CK_NOTIFICATION event
  276. );
  277. /*
  278. * NSSCKFWSession_IsRWSession
  279. *
  280. */
  281. NSS_EXTERN CK_BBOOL
  282. NSSCKFWSession_IsRWSession
  283. (
  284. NSSCKFWSession *fwSession
  285. );
  286. /*
  287. * NSSCKFWSession_IsSO
  288. *
  289. */
  290. NSS_EXTERN CK_BBOOL
  291. NSSCKFWSession_IsSO
  292. (
  293. NSSCKFWSession *fwSession
  294. );
  295. /*
  296. * NSSCKFWSession_GetCurrentCryptoOperation
  297. *
  298. */
  299. NSS_EXTERN NSSCKFWCryptoOperation *
  300. NSSCKFWSession_GetCurrentCryptoOperation
  301. (
  302. NSSCKFWSession *fwSession,
  303. NSSCKFWCryptoOperationState state
  304. );
  305. /*
  306. * NSSCKFWObject
  307. *
  308. * NSSCKFWObject_GetMDObject
  309. * NSSCKFWObject_GetArena
  310. * NSSCKFWObject_IsTokenObject
  311. * NSSCKFWObject_GetAttributeCount
  312. * NSSCKFWObject_GetAttributeTypes
  313. * NSSCKFWObject_GetAttributeSize
  314. * NSSCKFWObject_GetAttribute
  315. * NSSCKFWObject_GetObjectSize
  316. */
  317. /*
  318. * NSSCKFWObject_GetMDObject
  319. *
  320. */
  321. NSS_EXTERN NSSCKMDObject *
  322. NSSCKFWObject_GetMDObject
  323. (
  324. NSSCKFWObject *fwObject
  325. );
  326. /*
  327. * NSSCKFWObject_GetArena
  328. *
  329. */
  330. NSS_EXTERN NSSArena *
  331. NSSCKFWObject_GetArena
  332. (
  333. NSSCKFWObject *fwObject,
  334. CK_RV *pError
  335. );
  336. /*
  337. * NSSCKFWObject_IsTokenObject
  338. *
  339. */
  340. NSS_EXTERN CK_BBOOL
  341. NSSCKFWObject_IsTokenObject
  342. (
  343. NSSCKFWObject *fwObject
  344. );
  345. /*
  346. * NSSCKFWObject_GetAttributeCount
  347. *
  348. */
  349. NSS_EXTERN CK_ULONG
  350. NSSCKFWObject_GetAttributeCount
  351. (
  352. NSSCKFWObject *fwObject,
  353. CK_RV *pError
  354. );
  355. /*
  356. * NSSCKFWObject_GetAttributeTypes
  357. *
  358. */
  359. NSS_EXTERN CK_RV
  360. NSSCKFWObject_GetAttributeTypes
  361. (
  362. NSSCKFWObject *fwObject,
  363. CK_ATTRIBUTE_TYPE_PTR typeArray,
  364. CK_ULONG ulCount
  365. );
  366. /*
  367. * NSSCKFWObject_GetAttributeSize
  368. *
  369. */
  370. NSS_EXTERN CK_ULONG
  371. NSSCKFWObject_GetAttributeSize
  372. (
  373. NSSCKFWObject *fwObject,
  374. CK_ATTRIBUTE_TYPE attribute,
  375. CK_RV *pError
  376. );
  377. /*
  378. * NSSCKFWObject_GetAttribute
  379. *
  380. */
  381. NSS_EXTERN NSSItem *
  382. NSSCKFWObject_GetAttribute
  383. (
  384. NSSCKFWObject *fwObject,
  385. CK_ATTRIBUTE_TYPE attribute,
  386. NSSItem *itemOpt,
  387. NSSArena *arenaOpt,
  388. CK_RV *pError
  389. );
  390. /*
  391. * NSSCKFWObject_GetObjectSize
  392. *
  393. */
  394. NSS_EXTERN CK_ULONG
  395. NSSCKFWObject_GetObjectSize
  396. (
  397. NSSCKFWObject *fwObject,
  398. CK_RV *pError
  399. );
  400. /*
  401. * NSSCKFWFindObjects
  402. *
  403. * NSSCKFWFindObjects_GetMDFindObjects
  404. *
  405. */
  406. /*
  407. * NSSCKFWFindObjects_GetMDFindObjects
  408. *
  409. */
  410. NSS_EXTERN NSSCKMDFindObjects *
  411. NSSCKFWFindObjects_GetMDFindObjects
  412. (
  413. NSSCKFWFindObjects *
  414. );
  415. /*
  416. * NSSCKFWMutex
  417. *
  418. * NSSCKFWMutex_Destroy
  419. * NSSCKFWMutex_Lock
  420. * NSSCKFWMutex_Unlock
  421. *
  422. */
  423. /*
  424. * NSSCKFWMutex_Destroy
  425. *
  426. */
  427. NSS_EXTERN CK_RV
  428. NSSCKFWMutex_Destroy
  429. (
  430. NSSCKFWMutex *mutex
  431. );
  432. /*
  433. * NSSCKFWMutex_Lock
  434. *
  435. */
  436. NSS_EXTERN CK_RV
  437. NSSCKFWMutex_Lock
  438. (
  439. NSSCKFWMutex *mutex
  440. );
  441. /*
  442. * NSSCKFWMutex_Unlock
  443. *
  444. */
  445. NSS_EXTERN CK_RV
  446. NSSCKFWMutex_Unlock
  447. (
  448. NSSCKFWMutex *mutex
  449. );
  450. #endif /* NSSCKFW_H */