Back to index

lightning-sunbird  0.9+nobinonly
ckfw.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the Netscape security libraries.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corporation.
00018  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 #ifndef CKFW_H
00038 #define CKFW_H
00039 
00040 #ifdef DEBUG
00041 static const char CKFW_CVS_ID[] = "@(#) $RCSfile: ckfw.h,v $ $Revision: 1.7 $ $Date: 2005/01/20 02:25:45 $";
00042 #endif /* DEBUG */
00043 
00044 /*
00045  * ckfw.h
00046  *
00047  * This file prototypes the private calls of the NSS Cryptoki Framework.
00048  */
00049 
00050 #ifndef NSSBASET_H
00051 #include "nssbaset.h"
00052 #endif /* NSSBASET_H */
00053 
00054 #ifndef NSSCKT_H
00055 #include "nssckt.h"
00056 #endif /* NSSCKT_H */
00057 
00058 #ifndef NSSCKFWT_H
00059 #include "nssckfwt.h"
00060 #endif /* NSSCKFWT_H */
00061 
00062 #ifndef NSSCKMDT_H
00063 #include "nssckmdt.h"
00064 #endif /* NSSCKMDT_H */
00065 
00066 /*
00067  * NSSCKFWInstance
00068  *
00069  *  -- create/destroy --
00070  *  nssCKFWInstance_Create
00071  *  nssCKFWInstance_Destroy
00072  *
00073  *  -- implement public accessors --
00074  *  nssCKFWInstance_GetMDInstance
00075  *  nssCKFWInstance_GetArena
00076  *  nssCKFWInstance_MayCreatePthreads
00077  *  nssCKFWInstance_CreateMutex
00078  *  nssCKFWInstance_GetConfigurationData
00079  *  nssCKFWInstance_GetInitArgs 
00080  *
00081  *  -- private accessors --
00082  *  nssCKFWInstance_CreateSessionHandle
00083  *  nssCKFWInstance_ResolveSessionHandle
00084  *  nssCKFWInstance_DestroySessionHandle
00085  *  nssCKFWInstance_FindSessionHandle
00086  *  nssCKFWInstance_CreateObjectHandle
00087  *  nssCKFWInstance_ResolveObjectHandle
00088  *  nssCKFWInstance_DestroyObjectHandle
00089  *  nssCKFWInstance_FindObjectHandle
00090  *
00091  *  -- module fronts --
00092  *  nssCKFWInstance_GetNSlots
00093  *  nssCKFWInstance_GetCryptokiVersion
00094  *  nssCKFWInstance_GetManufacturerID
00095  *  nssCKFWInstance_GetFlags
00096  *  nssCKFWInstance_GetLibraryDescription
00097  *  nssCKFWInstance_GetLibraryVersion
00098  *  nssCKFWInstance_GetModuleHandlesSessionObjects
00099  *  nssCKFWInstance_GetSlots
00100  *  nssCKFWInstance_WaitForSlotEvent
00101  *
00102  *  -- debugging versions only --
00103  *  nssCKFWInstance_verifyPointer
00104  */
00105 
00106 /*
00107  * nssCKFWInstance_Create
00108  *
00109  */
00110 NSS_EXTERN NSSCKFWInstance *
00111 nssCKFWInstance_Create
00112 (
00113   CK_C_INITIALIZE_ARGS_PTR pInitArgs,
00114   CryptokiLockingState LockingState,
00115   NSSCKMDInstance *mdInstance,
00116   CK_RV *pError
00117 );
00118 
00119 /*
00120  * nssCKFWInstance_Destroy
00121  *
00122  */
00123 NSS_EXTERN CK_RV
00124 nssCKFWInstance_Destroy
00125 (
00126   NSSCKFWInstance *fwInstance
00127 );
00128 
00129 /*
00130  * nssCKFWInstance_GetMDInstance
00131  *
00132  */
00133 NSS_EXTERN NSSCKMDInstance *
00134 nssCKFWInstance_GetMDInstance
00135 (
00136   NSSCKFWInstance *fwInstance
00137 );
00138 
00139 /*
00140  * nssCKFWInstance_GetArena
00141  *
00142  */
00143 NSS_EXTERN NSSArena *
00144 nssCKFWInstance_GetArena
00145 (
00146   NSSCKFWInstance *fwInstance,
00147   CK_RV *pError
00148 );
00149 
00150 /*
00151  * nssCKFWInstance_MayCreatePthreads
00152  *
00153  */
00154 NSS_EXTERN CK_BBOOL
00155 nssCKFWInstance_MayCreatePthreads
00156 (
00157   NSSCKFWInstance *fwInstance
00158 );
00159 
00160 /*
00161  * nssCKFWInstance_CreateMutex
00162  *
00163  */
00164 NSS_EXTERN NSSCKFWMutex *
00165 nssCKFWInstance_CreateMutex
00166 (
00167   NSSCKFWInstance *fwInstance,
00168   NSSArena *arena,
00169   CK_RV *pError
00170 );
00171 
00172 /*
00173  * nssCKFWInstance_GetConfigurationData
00174  *
00175  */
00176 NSS_EXTERN NSSUTF8 *
00177 nssCKFWInstance_GetConfigurationData
00178 (
00179   NSSCKFWInstance *fwInstance
00180 );
00181 
00182 /*
00183  * nssCKFWInstance_GetInitArgs
00184  *
00185  */
00186 NSS_EXTERN CK_C_INITIALIZE_ARGS_PTR
00187 nssCKFWInstance_GetInitArgs
00188 (
00189   NSSCKFWInstance *fwInstance
00190 );
00191 
00192 /*
00193  * nssCKFWInstance_CreateSessionHandle
00194  *
00195  */
00196 NSS_EXTERN CK_SESSION_HANDLE
00197 nssCKFWInstance_CreateSessionHandle
00198 (
00199   NSSCKFWInstance *fwInstance,
00200   NSSCKFWSession *fwSession,
00201   CK_RV *pError
00202 );
00203 
00204 /*
00205  * nssCKFWInstance_ResolveSessionHandle
00206  *
00207  */
00208 NSS_EXTERN NSSCKFWSession *
00209 nssCKFWInstance_ResolveSessionHandle
00210 (
00211   NSSCKFWInstance *fwInstance,
00212   CK_SESSION_HANDLE hSession
00213 );
00214 
00215 /*
00216  * nssCKFWInstance_DestroySessionHandle
00217  *
00218  */
00219 NSS_EXTERN void
00220 nssCKFWInstance_DestroySessionHandle
00221 (
00222   NSSCKFWInstance *fwInstance,
00223   CK_SESSION_HANDLE hSession
00224 );
00225 
00226 /*
00227  * nssCKFWInstance_FindSessionHandle
00228  *
00229  */
00230 NSS_EXTERN CK_SESSION_HANDLE
00231 nssCKFWInstance_FindSessionHandle
00232 (
00233   NSSCKFWInstance *fwInstance,
00234   NSSCKFWSession *fwSession
00235 );
00236 
00237 /*
00238  * nssCKFWInstance_CreateObjectHandle
00239  *
00240  */
00241 NSS_EXTERN CK_OBJECT_HANDLE
00242 nssCKFWInstance_CreateObjectHandle
00243 (
00244   NSSCKFWInstance *fwInstance,
00245   NSSCKFWObject *fwObject,
00246   CK_RV *pError
00247 );
00248 
00249 /*
00250  * nssCKFWInstance_ResolveObjectHandle
00251  *
00252  */
00253 NSS_EXTERN NSSCKFWObject *
00254 nssCKFWInstance_ResolveObjectHandle
00255 (
00256   NSSCKFWInstance *fwInstance,
00257   CK_OBJECT_HANDLE hObject
00258 );
00259 
00260 /*
00261  * nssCKFWInstance_ReassignObjectHandle
00262  *
00263  */
00264 NSS_EXTERN CK_RV
00265 nssCKFWInstance_ReassignObjectHandle
00266 (
00267   NSSCKFWInstance *fwInstance,
00268   CK_OBJECT_HANDLE hObject,
00269   NSSCKFWObject *fwObject
00270 );
00271 
00272 /*
00273  * nssCKFWInstance_DestroyObjectHandle
00274  *
00275  */
00276 NSS_EXTERN void
00277 nssCKFWInstance_DestroyObjectHandle
00278 (
00279   NSSCKFWInstance *fwInstance,
00280   CK_OBJECT_HANDLE hObject
00281 );
00282 
00283 /*
00284  * nssCKFWInstance_FindObjectHandle
00285  *
00286  */
00287 NSS_EXTERN CK_OBJECT_HANDLE
00288 nssCKFWInstance_FindObjectHandle
00289 (
00290   NSSCKFWInstance *fwInstance,
00291   NSSCKFWObject *fwObject
00292 );
00293 
00294 /*
00295  * nssCKFWInstance_GetNSlots
00296  *
00297  */
00298 NSS_EXTERN CK_ULONG
00299 nssCKFWInstance_GetNSlots
00300 (
00301   NSSCKFWInstance *fwInstance,
00302   CK_RV *pError
00303 );
00304 
00305 /*
00306  * nssCKFWInstance_GetCryptokiVersion
00307  *
00308  */
00309 NSS_EXTERN CK_VERSION
00310 nssCKFWInstance_GetCryptokiVersion
00311 (
00312   NSSCKFWInstance *fwInstance
00313 );
00314 
00315 /*
00316  * nssCKFWInstance_GetManufacturerID
00317  *
00318  */
00319 NSS_EXTERN CK_RV
00320 nssCKFWInstance_GetManufacturerID
00321 (
00322   NSSCKFWInstance *fwInstance,
00323   CK_CHAR manufacturerID[32]
00324 );
00325 
00326 /*
00327  * nssCKFWInstance_GetFlags
00328  *
00329  */
00330 NSS_EXTERN CK_ULONG
00331 nssCKFWInstance_GetFlags
00332 (
00333   NSSCKFWInstance *fwInstance
00334 );
00335 
00336 /*
00337  * nssCKFWInstance_GetLibraryDescription
00338  *
00339  */
00340 NSS_EXTERN CK_RV
00341 nssCKFWInstance_GetLibraryDescription
00342 (
00343   NSSCKFWInstance *fwInstance,
00344   CK_CHAR libraryDescription[32]
00345 );
00346 
00347 /*
00348  * nssCKFWInstance_GetLibraryVersion
00349  *
00350  */
00351 NSS_EXTERN CK_VERSION
00352 nssCKFWInstance_GetLibraryVersion
00353 (
00354   NSSCKFWInstance *fwInstance
00355 );
00356 
00357 /*
00358  * nssCKFWInstance_GetModuleHandlesSessionObjects
00359  *
00360  */
00361 NSS_EXTERN CK_BBOOL
00362 nssCKFWInstance_GetModuleHandlesSessionObjects
00363 (
00364   NSSCKFWInstance *fwInstance
00365 );
00366 
00367 /*
00368  * nssCKFWInstance_GetSlots
00369  *
00370  */
00371 NSS_EXTERN NSSCKFWSlot **
00372 nssCKFWInstance_GetSlots
00373 (
00374   NSSCKFWInstance *fwInstance,
00375   CK_RV *pError
00376 );
00377 
00378 /*
00379  * nssCKFWInstance_WaitForSlotEvent
00380  *
00381  */
00382 NSS_EXTERN NSSCKFWSlot *
00383 nssCKFWInstance_WaitForSlotEvent
00384 (
00385   NSSCKFWInstance *fwInstance,
00386   CK_BBOOL block,
00387   CK_RV *pError
00388 );
00389 
00390 /*
00391  * nssCKFWInstance_verifyPointer
00392  *
00393  */
00394 NSS_EXTERN CK_RV
00395 nssCKFWInstance_verifyPointer
00396 (
00397   const NSSCKFWInstance *fwInstance
00398 );
00399 
00400 
00401 /*
00402  * NSSCKFWSlot
00403  *
00404  *  -- create/destroy --
00405  *  nssCKFWSlot_Create
00406  *  nssCKFWSlot_Destroy
00407  *
00408  *  -- implement public accessors --
00409  *  nssCKFWSlot_GetMDSlot
00410  *  nssCKFWSlot_GetFWInstance
00411  *  nssCKFWSlot_GetMDInstance
00412  *
00413  *  -- private accessors --
00414  *  nssCKFWSlot_GetSlotID
00415  *
00416  *  -- module fronts --
00417  *  nssCKFWSlot_GetSlotDescription
00418  *  nssCKFWSlot_GetManufacturerID
00419  *  nssCKFWSlot_GetTokenPresent
00420  *  nssCKFWSlot_GetRemovableDevice
00421  *  nssCKFWSlot_GetHardwareSlot
00422  *  nssCKFWSlot_GetHardwareVersion
00423  *  nssCKFWSlot_GetFirmwareVersion
00424  *  nssCKFWSlot_GetToken
00425  */
00426 
00427 /*
00428  * nssCKFWSlot_Create
00429  *
00430  */
00431 NSS_EXTERN NSSCKFWSlot *
00432 nssCKFWSlot_Create
00433 (
00434   NSSCKFWInstance *fwInstance,
00435   NSSCKMDSlot *mdSlot,
00436   CK_SLOT_ID slotID,
00437   CK_RV *pError
00438 );
00439 
00440 /*
00441  * nssCKFWSlot_Destroy
00442  *
00443  */
00444 NSS_EXTERN CK_RV
00445 nssCKFWSlot_Destroy
00446 (
00447   NSSCKFWSlot *fwSlot
00448 );
00449 
00450 /*
00451  * nssCKFWSlot_GetMDSlot
00452  *
00453  */
00454 NSS_EXTERN NSSCKMDSlot *
00455 nssCKFWSlot_GetMDSlot
00456 (
00457   NSSCKFWSlot *fwSlot
00458 );
00459 
00460 /*
00461  * nssCKFWSlot_GetFWInstance
00462  *
00463  */
00464 
00465 NSS_EXTERN NSSCKFWInstance *
00466 nssCKFWSlot_GetFWInstance
00467 (
00468   NSSCKFWSlot *fwSlot
00469 );
00470 
00471 /*
00472  * nssCKFWSlot_GetMDInstance
00473  *
00474  */
00475 
00476 NSS_EXTERN NSSCKMDInstance *
00477 nssCKFWSlot_GetMDInstance
00478 (
00479   NSSCKFWSlot *fwSlot
00480 );
00481 
00482 /*
00483  * nssCKFWSlot_GetSlotID
00484  *
00485  */
00486 NSS_EXTERN CK_SLOT_ID
00487 nssCKFWSlot_GetSlotID
00488 (
00489   NSSCKFWSlot *fwSlot
00490 );
00491 
00492 /*
00493  * nssCKFWSlot_GetSlotDescription
00494  *
00495  */
00496 NSS_EXTERN CK_RV
00497 nssCKFWSlot_GetSlotDescription
00498 (
00499   NSSCKFWSlot *fwSlot,
00500   CK_CHAR slotDescription[64]
00501 );
00502 
00503 /*
00504  * nssCKFWSlot_GetManufacturerID
00505  *
00506  */
00507 NSS_EXTERN CK_RV
00508 nssCKFWSlot_GetManufacturerID
00509 (
00510   NSSCKFWSlot *fwSlot,
00511   CK_CHAR manufacturerID[32]
00512 );
00513 
00514 /*
00515  * nssCKFWSlot_GetTokenPresent
00516  *
00517  */
00518 NSS_EXTERN CK_BBOOL
00519 nssCKFWSlot_GetTokenPresent
00520 (
00521   NSSCKFWSlot *fwSlot
00522 );
00523 
00524 /*
00525  * nssCKFWSlot_GetRemovableDevice
00526  *
00527  */
00528 NSS_EXTERN CK_BBOOL
00529 nssCKFWSlot_GetRemovableDevice
00530 (
00531   NSSCKFWSlot *fwSlot
00532 );
00533 
00534 /*
00535  * nssCKFWSlot_GetHardwareSlot
00536  *
00537  */
00538 NSS_EXTERN CK_BBOOL
00539 nssCKFWSlot_GetHardwareSlot
00540 (
00541   NSSCKFWSlot *fwSlot
00542 );
00543 
00544 /*
00545  * nssCKFWSlot_GetHardwareVersion
00546  *
00547  */
00548 NSS_EXTERN CK_VERSION
00549 nssCKFWSlot_GetHardwareVersion
00550 (
00551   NSSCKFWSlot *fwSlot
00552 );
00553 
00554 /*
00555  * nssCKFWSlot_GetFirmwareVersion
00556  *
00557  */
00558 NSS_EXTERN CK_VERSION
00559 nssCKFWSlot_GetFirmwareVersion
00560 (
00561   NSSCKFWSlot *fwSlot
00562 );
00563 
00564 /*
00565  * nssCKFWSlot_GetToken
00566  * 
00567  */
00568 NSS_EXTERN NSSCKFWToken *
00569 nssCKFWSlot_GetToken
00570 (
00571   NSSCKFWSlot *fwSlot,
00572   CK_RV *pError
00573 );
00574 
00575 /*
00576  * nssCKFWSlot_ClearToken
00577  *
00578  */
00579 NSS_EXTERN void
00580 nssCKFWSlot_ClearToken
00581 (
00582   NSSCKFWSlot *fwSlot
00583 );
00584 
00585 /*
00586  * NSSCKFWToken
00587  *
00588  *  -- create/destroy --
00589  *  nssCKFWToken_Create
00590  *  nssCKFWToken_Destroy
00591  *
00592  *  -- implement public accessors --
00593  *  nssCKFWToken_GetMDToken
00594  *  nssCKFWToken_GetFWSlot
00595  *  nssCKFWToken_GetMDSlot
00596  *  nssCKFWToken_GetSessionState
00597  *
00598  *  -- private accessors --
00599  *  nssCKFWToken_SetSessionState
00600  *  nssCKFWToken_RemoveSession
00601  *  nssCKFWToken_CloseAllSessions
00602  *  nssCKFWToken_GetSessionCount
00603  *  nssCKFWToken_GetRwSessionCount
00604  *  nssCKFWToken_GetRoSessionCount
00605  *  nssCKFWToken_GetSessionObjectHash
00606  *  nssCKFWToken_GetMDObjectHash
00607  *  nssCKFWToken_GetObjectHandleHash
00608  *
00609  *  -- module fronts --
00610  *  nssCKFWToken_InitToken
00611  *  nssCKFWToken_GetLabel
00612  *  nssCKFWToken_GetManufacturerID
00613  *  nssCKFWToken_GetModel
00614  *  nssCKFWToken_GetSerialNumber
00615  *  nssCKFWToken_GetHasRNG
00616  *  nssCKFWToken_GetIsWriteProtected
00617  *  nssCKFWToken_GetLoginRequired
00618  *  nssCKFWToken_GetUserPinInitialized
00619  *  nssCKFWToken_GetRestoreKeyNotNeeded
00620  *  nssCKFWToken_GetHasClockOnToken
00621  *  nssCKFWToken_GetHasProtectedAuthenticationPath
00622  *  nssCKFWToken_GetSupportsDualCryptoOperations
00623  *  nssCKFWToken_GetMaxSessionCount
00624  *  nssCKFWToken_GetMaxRwSessionCount
00625  *  nssCKFWToken_GetMaxPinLen
00626  *  nssCKFWToken_GetMinPinLen
00627  *  nssCKFWToken_GetTotalPublicMemory
00628  *  nssCKFWToken_GetFreePublicMemory
00629  *  nssCKFWToken_GetTotalPrivateMemory
00630  *  nssCKFWToken_GetFreePrivateMemory
00631  *  nssCKFWToken_GetHardwareVersion
00632  *  nssCKFWToken_GetFirmwareVersion
00633  *  nssCKFWToken_GetUTCTime
00634  *  nssCKFWToken_OpenSession
00635  *  nssCKFWToken_GetMechanismCount
00636  *  nssCKFWToken_GetMechanismTypes
00637  *  nssCKFWToken_GetMechanism
00638  */
00639 
00640 /*
00641  * nssCKFWToken_Create
00642  *
00643  */
00644 NSS_EXTERN NSSCKFWToken *
00645 nssCKFWToken_Create
00646 (
00647   NSSCKFWSlot *fwSlot,
00648   NSSCKMDToken *mdToken,
00649   CK_RV *pError
00650 );
00651 
00652 /*
00653  * nssCKFWToken_Destroy
00654  *
00655  */
00656 NSS_EXTERN CK_RV
00657 nssCKFWToken_Destroy
00658 (
00659   NSSCKFWToken *fwToken
00660 );
00661 
00662 /*
00663  * nssCKFWToken_GetMDToken
00664  *
00665  */
00666 NSS_EXTERN NSSCKMDToken *
00667 nssCKFWToken_GetMDToken
00668 (
00669   NSSCKFWToken *fwToken
00670 );
00671 
00672 /*
00673  * nssCKFWToken_GetArena
00674  *
00675  */
00676 NSS_EXTERN NSSArena *
00677 nssCKFWToken_GetArena
00678 (
00679   NSSCKFWToken *fwToken,
00680   CK_RV *pError
00681 );
00682 
00683 /*
00684  * nssCKFWToken_GetFWSlot
00685  *
00686  */
00687 NSS_EXTERN NSSCKFWSlot *
00688 nssCKFWToken_GetFWSlot
00689 (
00690   NSSCKFWToken *fwToken
00691 );
00692 
00693 /*
00694  * nssCKFWToken_GetMDSlot
00695  *
00696  */
00697 NSS_EXTERN NSSCKMDSlot *
00698 nssCKFWToken_GetMDSlot
00699 (
00700   NSSCKFWToken *fwToken
00701 );
00702 
00703 /*
00704  * nssCKFWToken_GetSessionState
00705  *
00706  */
00707 NSS_EXTERN CK_STATE
00708 nssCKFWToken_GetSessionState
00709 (
00710   NSSCKFWToken *fwToken
00711 );
00712 
00713 /*
00714  * nssCKFWToken_InitToken
00715  *
00716  */
00717 NSS_EXTERN CK_RV
00718 nssCKFWToken_InitToken
00719 (
00720   NSSCKFWToken *fwToken,
00721   NSSItem *pin,
00722   NSSUTF8 *label
00723 );
00724 
00725 /*
00726  * nssCKFWToken_GetLabel
00727  *
00728  */
00729 NSS_EXTERN CK_RV
00730 nssCKFWToken_GetLabel
00731 (
00732   NSSCKFWToken *fwToken,
00733   CK_CHAR label[32]
00734 );
00735 
00736 /*
00737  * nssCKFWToken_GetManufacturerID
00738  *
00739  */
00740 NSS_EXTERN CK_RV
00741 nssCKFWToken_GetManufacturerID
00742 (
00743   NSSCKFWToken *fwToken,
00744   CK_CHAR manufacturerID[32]
00745 );
00746 
00747 /*
00748  * nssCKFWToken_GetModel
00749  *
00750  */
00751 NSS_EXTERN CK_RV
00752 nssCKFWToken_GetModel
00753 (
00754   NSSCKFWToken *fwToken,
00755   CK_CHAR model[16]
00756 );
00757 
00758 /*
00759  * nssCKFWToken_GetSerialNumber
00760  *
00761  */
00762 NSS_EXTERN CK_RV
00763 nssCKFWToken_GetSerialNumber
00764 (
00765   NSSCKFWToken *fwToken,
00766   CK_CHAR serialNumber[16]
00767 );
00768 
00769 /*
00770  * nssCKFWToken_GetHasRNG
00771  *
00772  */
00773 NSS_EXTERN CK_BBOOL
00774 nssCKFWToken_GetHasRNG
00775 (
00776   NSSCKFWToken *fwToken
00777 );
00778 
00779 /*
00780  * nssCKFWToken_GetIsWriteProtected
00781  *
00782  */
00783 NSS_EXTERN CK_BBOOL
00784 nssCKFWToken_GetIsWriteProtected
00785 (
00786   NSSCKFWToken *fwToken
00787 );
00788 
00789 /*
00790  * nssCKFWToken_GetLoginRequired
00791  *
00792  */
00793 NSS_EXTERN CK_BBOOL
00794 nssCKFWToken_GetLoginRequired
00795 (
00796   NSSCKFWToken *fwToken
00797 );
00798 
00799 /*
00800  * nssCKFWToken_GetUserPinInitialized
00801  *
00802  */
00803 NSS_EXTERN CK_BBOOL
00804 nssCKFWToken_GetUserPinInitialized
00805 (
00806   NSSCKFWToken *fwToken
00807 );
00808 
00809 /*
00810  * nssCKFWToken_GetRestoreKeyNotNeeded
00811  *
00812  */
00813 NSS_EXTERN CK_BBOOL
00814 nssCKFWToken_GetRestoreKeyNotNeeded
00815 (
00816   NSSCKFWToken *fwToken
00817 );
00818 
00819 /*
00820  * nssCKFWToken_GetHasClockOnToken
00821  *
00822  */
00823 NSS_EXTERN CK_BBOOL
00824 nssCKFWToken_GetHasClockOnToken
00825 (
00826   NSSCKFWToken *fwToken
00827 );
00828 
00829 /*
00830  * nssCKFWToken_GetHasProtectedAuthenticationPath
00831  *
00832  */
00833 NSS_EXTERN CK_BBOOL
00834 nssCKFWToken_GetHasProtectedAuthenticationPath
00835 (
00836   NSSCKFWToken *fwToken
00837 );
00838 
00839 /*
00840  * nssCKFWToken_GetSupportsDualCryptoOperations
00841  *
00842  */
00843 NSS_EXTERN CK_BBOOL
00844 nssCKFWToken_GetSupportsDualCryptoOperations
00845 (
00846   NSSCKFWToken *fwToken
00847 );
00848 
00849 /*
00850  * nssCKFWToken_GetMaxSessionCount
00851  *
00852  */
00853 NSS_EXTERN CK_ULONG
00854 nssCKFWToken_GetMaxSessionCount
00855 (
00856   NSSCKFWToken *fwToken
00857 );
00858 
00859 /*
00860  * nssCKFWToken_GetMaxRwSessionCount
00861  *
00862  */
00863 NSS_EXTERN CK_ULONG
00864 nssCKFWToken_GetMaxRwSessionCount
00865 (
00866   NSSCKFWToken *fwToken
00867 );
00868 
00869 /*
00870  * nssCKFWToken_GetMaxPinLen
00871  *
00872  */
00873 NSS_EXTERN CK_ULONG
00874 nssCKFWToken_GetMaxPinLen
00875 (
00876   NSSCKFWToken *fwToken
00877 );
00878 
00879 /*
00880  * nssCKFWToken_GetMinPinLen
00881  *
00882  */
00883 NSS_EXTERN CK_ULONG
00884 nssCKFWToken_GetMinPinLen
00885 (
00886   NSSCKFWToken *fwToken
00887 );
00888 
00889 /*
00890  * nssCKFWToken_GetTotalPublicMemory
00891  *
00892  */
00893 NSS_EXTERN CK_ULONG
00894 nssCKFWToken_GetTotalPublicMemory
00895 (
00896   NSSCKFWToken *fwToken
00897 );
00898 
00899 /*
00900  * nssCKFWToken_GetFreePublicMemory
00901  *
00902  */
00903 NSS_EXTERN CK_ULONG
00904 nssCKFWToken_GetFreePublicMemory
00905 (
00906   NSSCKFWToken *fwToken
00907 );
00908 
00909 /*
00910  * nssCKFWToken_GetTotalPrivateMemory
00911  *
00912  */
00913 NSS_EXTERN CK_ULONG
00914 nssCKFWToken_GetTotalPrivateMemory
00915 (
00916   NSSCKFWToken *fwToken
00917 );
00918 
00919 /*
00920  * nssCKFWToken_GetFreePrivateMemory
00921  *
00922  */
00923 NSS_EXTERN CK_ULONG
00924 nssCKFWToken_GetFreePrivateMemory
00925 (
00926   NSSCKFWToken *fwToken
00927 );
00928 
00929 /*
00930  * nssCKFWToken_GetHardwareVersion
00931  *
00932  */
00933 NSS_EXTERN CK_VERSION
00934 nssCKFWToken_GetHardwareVersion
00935 (
00936   NSSCKFWToken *fwToken
00937 );
00938 
00939 /*
00940  * nssCKFWToken_GetFirmwareVersion
00941  *
00942  */
00943 NSS_EXTERN CK_VERSION
00944 nssCKFWToken_GetFirmwareVersion
00945 (
00946   NSSCKFWToken *fwToken
00947 );
00948 
00949 /*
00950  * nssCKFWToken_GetUTCTime
00951  *
00952  */
00953 NSS_EXTERN CK_RV
00954 nssCKFWToken_GetUTCTime
00955 (
00956   NSSCKFWToken *fwToken,
00957   CK_CHAR utcTime[16]
00958 );
00959 
00960 /*
00961  * nssCKFWToken_OpenSession
00962  *
00963  */
00964 NSS_EXTERN NSSCKFWSession *
00965 nssCKFWToken_OpenSession
00966 (
00967   NSSCKFWToken *fwToken,
00968   CK_BBOOL rw,
00969   CK_VOID_PTR pApplication,
00970   CK_NOTIFY Notify,
00971   CK_RV *pError
00972 );
00973 
00974 /*
00975  * nssCKFWToken_GetMechanismCount
00976  *
00977  */
00978 NSS_EXTERN CK_ULONG
00979 nssCKFWToken_GetMechanismCount
00980 (
00981   NSSCKFWToken *fwToken
00982 );
00983 
00984 /*
00985  * nssCKFWToken_GetMechanismTypes
00986  *
00987  */
00988 NSS_EXTERN CK_RV
00989 nssCKFWToken_GetMechanismTypes
00990 (
00991   NSSCKFWToken *fwToken,
00992   CK_MECHANISM_TYPE types[]
00993 );
00994 
00995 /*
00996  * nssCKFWToken_GetMechanism
00997  *
00998  */
00999 NSS_EXTERN NSSCKFWMechanism *
01000 nssCKFWToken_GetMechanism
01001 (
01002   NSSCKFWToken *fwToken,
01003   CK_MECHANISM_TYPE which,
01004   CK_RV *pError
01005 );
01006 
01007 /*
01008  * nssCKFWToken_SetSessionState
01009  *
01010  */
01011 NSS_EXTERN CK_RV
01012 nssCKFWToken_SetSessionState
01013 (
01014   NSSCKFWToken *fwToken,
01015   CK_STATE newState
01016 );
01017 
01018 /*
01019  * nssCKFWToken_RemoveSession
01020  *
01021  */
01022 NSS_EXTERN CK_RV
01023 nssCKFWToken_RemoveSession
01024 (
01025   NSSCKFWToken *fwToken,
01026   NSSCKFWSession *fwSession
01027 );
01028 
01029 /*
01030  * nssCKFWToken_CloseAllSessions
01031  *
01032  */
01033 NSS_EXTERN CK_RV
01034 nssCKFWToken_CloseAllSessions
01035 (
01036   NSSCKFWToken *fwToken
01037 );
01038 
01039 /*
01040  * nssCKFWToken_GetSessionCount
01041  *
01042  */
01043 NSS_EXTERN CK_ULONG
01044 nssCKFWToken_GetSessionCount
01045 (
01046   NSSCKFWToken *fwToken
01047 );
01048 
01049 /*
01050  * nssCKFWToken_GetRwSessionCount
01051  *
01052  */
01053 NSS_EXTERN CK_ULONG
01054 nssCKFWToken_GetRwSessionCount
01055 (
01056   NSSCKFWToken *fwToken
01057 );
01058 
01059 /*
01060  * nssCKFWToken_GetRoSessionCount
01061  *
01062  */
01063 NSS_EXTERN CK_ULONG
01064 nssCKFWToken_GetRoSessionCount
01065 (
01066   NSSCKFWToken *fwToken
01067 );
01068 
01069 /*
01070  * nssCKFWToken_GetSessionObjectHash
01071  *
01072  */
01073 NSS_EXTERN nssCKFWHash *
01074 nssCKFWToken_GetSessionObjectHash
01075 (
01076   NSSCKFWToken *fwToken
01077 );
01078 
01079 /*
01080  * nssCKFWToken_GetMDObjectHash
01081  *
01082  */
01083 NSS_EXTERN nssCKFWHash *
01084 nssCKFWToken_GetMDObjectHash
01085 (
01086   NSSCKFWToken *fwToken
01087 );
01088 
01089 /*
01090  * nssCKFWToken_GetObjectHandleHash
01091  *
01092  */
01093 NSS_EXTERN nssCKFWHash *
01094 nssCKFWToken_GetObjectHandleHash
01095 (
01096   NSSCKFWToken *fwToken
01097 );
01098 
01099 /*
01100  * NSSCKFWMechanism
01101  *
01102  *  -- create/destroy --
01103  *  nssCKFWMechanism_Create
01104  *  nssCKFWMechanism_Destroy
01105  *
01106  *  -- implement public accessors --
01107  *  nssCKFWMechanism_GetMDMechanism
01108  *  nssCKFWMechanism_GetParameter
01109  *
01110  *  -- private accessors --
01111  *
01112  *  -- module fronts --
01113  *  nssCKFWMechanism_GetMinKeySize
01114  *  nssCKFWMechanism_GetMaxKeySize
01115  *  nssCKFWMechanism_GetInHardware
01116  */
01117 
01118 /*
01119  * nssCKFWMechanism_Create
01120  *
01121  */
01122 NSS_EXTERN NSSCKFWMechanism *
01123 nssCKFWMechanism_Create
01124 (
01125   void /* XXX fgmr */
01126 );
01127 
01128 /*
01129  * nssCKFWMechanism_Destroy
01130  *
01131  */
01132 NSS_EXTERN CK_RV
01133 nssCKFWMechanism_Destroy
01134 (
01135   NSSCKFWMechanism *fwMechanism
01136 );
01137 
01138 /*
01139  * nssCKFWMechanism_GetMDMechanism
01140  *
01141  */
01142 
01143 NSS_EXTERN NSSCKMDMechanism *
01144 nssCKFWMechanism_GetMDMechanism
01145 (
01146   NSSCKFWMechanism *fwMechanism
01147 );
01148 
01149 /*
01150  * nssCKFWMechanism_GetParameter
01151  *
01152  * XXX fgmr-- or as an additional parameter to the crypto ops?
01153  */
01154 NSS_EXTERN NSSItem *
01155 nssCKFWMechanism_GetParameter
01156 (
01157   NSSCKFWMechanism *fwMechanism
01158 );
01159 
01160 /*
01161  * nssCKFWMechanism_GetMinKeySize
01162  *
01163  */
01164 NSS_EXTERN CK_ULONG
01165 nssCKFWMechanism_GetMinKeySize
01166 (
01167   NSSCKFWMechanism *fwMechanism
01168 );
01169 
01170 /*
01171  * nssCKFWMechanism_GetMaxKeySize
01172  *
01173  */
01174 NSS_EXTERN CK_ULONG
01175 nssCKFWMechanism_GetMaxKeySize
01176 (
01177   NSSCKFWMechanism *fwMechanism
01178 );
01179 
01180 /*
01181  * nssCKFWMechanism_GetInHardware
01182  *
01183  */
01184 NSS_EXTERN CK_BBOOL
01185 nssCKFWMechanism_GetInHardware
01186 (
01187   NSSCKFWMechanism *fwMechanism
01188 );
01189 
01190 /*
01191  * NSSCKFWSession
01192  *
01193  *  -- create/destroy --
01194  *  nssCKFWSession_Create
01195  *  nssCKFWSession_Destroy
01196  *
01197  *  -- implement public accessors --
01198  *  nssCKFWSession_GetMDSession
01199  *  nssCKFWSession_GetArena
01200  *  nssCKFWSession_CallNotification
01201  *  nssCKFWSession_IsRWSession
01202  *  nssCKFWSession_IsSO
01203  *
01204  *  -- private accessors --
01205  *  nssCKFWSession_GetFWSlot
01206  *  nssCKFWSession_GetSessionState
01207  *  nssCKFWSession_SetFWFindObjects
01208  *  nssCKFWSession_GetFWFindObjects
01209  *  nssCKFWSession_SetMDSession
01210  *  nssCKFWSession_SetHandle
01211  *  nssCKFWSession_GetHandle
01212  *  nssCKFWSession_RegisterSessionObject
01213  *  nssCKFWSession_DeregisterSessionObject
01214  *
01215  *  -- module fronts --
01216  *  nssCKFWSession_GetDeviceError
01217  *  nssCKFWSession_Login
01218  *  nssCKFWSession_Logout
01219  *  nssCKFWSession_InitPIN
01220  *  nssCKFWSession_SetPIN
01221  *  nssCKFWSession_GetOperationStateLen
01222  *  nssCKFWSession_GetOperationState
01223  *  nssCKFWSession_SetOperationState
01224  *  nssCKFWSession_CreateObject
01225  *  nssCKFWSession_CopyObject
01226  *  nssCKFWSession_FindObjectsInit
01227  *  nssCKFWSession_SeedRandom
01228  *  nssCKFWSession_GetRandom
01229  */
01230 
01231 /*
01232  * nssCKFWSession_Create
01233  *
01234  */
01235 NSS_EXTERN NSSCKFWSession *
01236 nssCKFWSession_Create
01237 (
01238   NSSCKFWToken *fwToken,
01239   CK_BBOOL rw,
01240   CK_VOID_PTR pApplication,
01241   CK_NOTIFY Notify,
01242   CK_RV *pError
01243 );
01244 
01245 /*
01246  * nssCKFWSession_Destroy
01247  *
01248  */
01249 NSS_EXTERN CK_RV
01250 nssCKFWSession_Destroy
01251 (
01252   NSSCKFWSession *fwSession,
01253   CK_BBOOL removeFromTokenHash
01254 );
01255 
01256 /*
01257  * nssCKFWSession_GetMDSession
01258  *
01259  */
01260 NSS_EXTERN NSSCKMDSession *
01261 nssCKFWSession_GetMDSession
01262 (
01263   NSSCKFWSession *fwSession
01264 );
01265 
01266 /*
01267  * nssCKFWSession_GetArena
01268  *
01269  */
01270 NSS_EXTERN NSSArena *
01271 nssCKFWSession_GetArena
01272 (
01273   NSSCKFWSession *fwSession,
01274   CK_RV *pError
01275 );
01276 
01277 /*
01278  * nssCKFWSession_CallNotification
01279  *
01280  */
01281 NSS_EXTERN CK_RV
01282 nssCKFWSession_CallNotification
01283 (
01284   NSSCKFWSession *fwSession,
01285   CK_NOTIFICATION event
01286 );
01287 
01288 /*
01289  * nssCKFWSession_IsRWSession
01290  *
01291  */
01292 NSS_EXTERN CK_BBOOL
01293 nssCKFWSession_IsRWSession
01294 (
01295   NSSCKFWSession *fwSession
01296 );
01297 
01298 /*
01299  * nssCKFWSession_IsSO
01300  *
01301  */
01302 NSS_EXTERN CK_BBOOL
01303 nssCKFWSession_IsSO
01304 (
01305   NSSCKFWSession *fwSession
01306 );
01307 
01308 /*
01309  * nssCKFWSession_GetFWSlot
01310  *
01311  */
01312 NSS_EXTERN NSSCKFWSlot *
01313 nssCKFWSession_GetFWSlot
01314 (
01315   NSSCKFWSession *fwSession
01316 );
01317 
01318 /*
01319  * nssCFKWSession_GetSessionState
01320  *
01321  */
01322 NSS_EXTERN CK_STATE
01323 nssCKFWSession_GetSessionState
01324 (
01325   NSSCKFWSession *fwSession
01326 );
01327 
01328 /*
01329  * nssCKFWSession_SetFWFindObjects
01330  *
01331  */
01332 NSS_EXTERN CK_RV
01333 nssCKFWSession_SetFWFindObjects
01334 (
01335   NSSCKFWSession *fwSession,
01336   NSSCKFWFindObjects *fwFindObjects
01337 );
01338 
01339 /*
01340  * nssCKFWSession_GetFWFindObjects
01341  *
01342  */
01343 NSS_EXTERN NSSCKFWFindObjects *
01344 nssCKFWSession_GetFWFindObjects
01345 (
01346   NSSCKFWSession *fwSesssion,
01347   CK_RV *pError
01348 );
01349 
01350 /*
01351  * nssCKFWSession_SetMDSession
01352  *
01353  */
01354 NSS_EXTERN CK_RV
01355 nssCKFWSession_SetMDSession
01356 (
01357   NSSCKFWSession *fwSession,
01358   NSSCKMDSession *mdSession
01359 );
01360 
01361 /*
01362  * nssCKFWSession_SetHandle
01363  *
01364  */
01365 NSS_EXTERN CK_RV
01366 nssCKFWSession_SetHandle
01367 (
01368   NSSCKFWSession *fwSession,
01369   CK_SESSION_HANDLE hSession
01370 );
01371 
01372 /*
01373  * nssCKFWSession_GetHandle
01374  *
01375  */
01376 NSS_EXTERN CK_SESSION_HANDLE
01377 nssCKFWSession_GetHandle
01378 (
01379   NSSCKFWSession *fwSession
01380 );
01381 
01382 /*
01383  * nssCKFWSession_RegisterSessionObject
01384  *
01385  */
01386 NSS_EXTERN CK_RV
01387 nssCKFWSession_RegisterSessionObject
01388 (
01389   NSSCKFWSession *fwSession,
01390   NSSCKFWObject *fwObject
01391 );
01392 
01393 /*
01394  * nssCKFWSession_DeregisterSessionObject
01395  *
01396  */
01397 NSS_EXTERN CK_RV
01398 nssCKFWSession_DeregisterSessionObject
01399 (
01400   NSSCKFWSession *fwSession,
01401   NSSCKFWObject *fwObject
01402 );
01403 
01404 /*
01405  * nssCKFWSession_GetDeviceError
01406  *
01407  */
01408 NSS_EXTERN CK_ULONG
01409 nssCKFWSession_GetDeviceError
01410 (
01411   NSSCKFWSession *fwSession
01412 );
01413 
01414 /*
01415  * nssCKFWSession_Login
01416  *
01417  */
01418 NSS_EXTERN CK_RV
01419 nssCKFWSession_Login
01420 (
01421   NSSCKFWSession *fwSession,
01422   CK_USER_TYPE userType,
01423   NSSItem *pin
01424 );
01425 
01426 /*
01427  * nssCKFWSession_Logout
01428  *
01429  */
01430 NSS_EXTERN CK_RV
01431 nssCKFWSession_Logout
01432 (
01433   NSSCKFWSession *fwSession
01434 );
01435 
01436 /*
01437  * nssCKFWSession_InitPIN
01438  *
01439  */
01440 NSS_EXTERN CK_RV
01441 nssCKFWSession_InitPIN
01442 (
01443   NSSCKFWSession *fwSession,
01444   NSSItem *pin
01445 );
01446 
01447 /*
01448  * nssCKFWSession_SetPIN
01449  *
01450  */
01451 NSS_EXTERN CK_RV
01452 nssCKFWSession_SetPIN
01453 (
01454   NSSCKFWSession *fwSession,
01455   NSSItem *newPin,
01456   NSSItem *oldPin
01457 );
01458 
01459 /*
01460  * nssCKFWSession_GetOperationStateLen
01461  *
01462  */
01463 NSS_EXTERN CK_ULONG
01464 nssCKFWSession_GetOperationStateLen
01465 (
01466   NSSCKFWSession *fwSession,
01467   CK_RV *pError
01468 );
01469 
01470 /*
01471  * nssCKFWSession_GetOperationState
01472  *
01473  */
01474 NSS_EXTERN CK_RV
01475 nssCKFWSession_GetOperationState
01476 (
01477   NSSCKFWSession *fwSession,
01478   NSSItem *buffer
01479 );
01480 
01481 /*
01482  * nssCKFWSession_SetOperationState
01483  *
01484  */
01485 NSS_EXTERN CK_RV
01486 nssCKFWSession_SetOperationState
01487 (
01488   NSSCKFWSession *fwSession,
01489   NSSItem *state,
01490   NSSCKFWObject *encryptionKey,
01491   NSSCKFWObject *authenticationKey
01492 );
01493 
01494 /*
01495  * nssCKFWSession_CreateObject
01496  *
01497  */
01498 NSS_EXTERN NSSCKFWObject *
01499 nssCKFWSession_CreateObject
01500 (
01501   NSSCKFWSession *fwSession,
01502   CK_ATTRIBUTE_PTR pTemplate,
01503   CK_ULONG ulAttributeCount,
01504   CK_RV *pError
01505 );
01506 
01507 /*
01508  * nssCKFWSession_CopyObject
01509  *
01510  */
01511 NSS_EXTERN NSSCKFWObject *
01512 nssCKFWSession_CopyObject
01513 (
01514   NSSCKFWSession *fwSession,
01515   NSSCKFWObject *object,
01516   CK_ATTRIBUTE_PTR pTemplate,
01517   CK_ULONG ulAttributeCount,
01518   CK_RV *pError
01519 );
01520 
01521 /*
01522  * nssCKFWSession_FindObjectsInit
01523  *
01524  */
01525 NSS_EXTERN NSSCKFWFindObjects *
01526 nssCKFWSession_FindObjectsInit
01527 (
01528   NSSCKFWSession *fwSession,
01529   CK_ATTRIBUTE_PTR pTemplate,
01530   CK_ULONG ulAttributeCount,
01531   CK_RV *pError
01532 );
01533 
01534 /*
01535  * nssCKFWSession_SeedRandom
01536  *
01537  */
01538 NSS_EXTERN CK_RV
01539 nssCKFWSession_SeedRandom
01540 (
01541   NSSCKFWSession *fwSession,
01542   NSSItem *seed
01543 );
01544 
01545 /*
01546  * nssCKFWSession_GetRandom
01547  *
01548  */
01549 NSS_EXTERN CK_RV
01550 nssCKFWSession_GetRandom
01551 (
01552   NSSCKFWSession *fwSession,
01553   NSSItem *buffer
01554 );
01555 
01556 /*
01557  * NSSCKFWObject
01558  *
01559  * -- create/destroy --
01560  *  nssCKFWObject_Create
01561  *  nssCKFWObject_Finalize
01562  *  nssCKFWObject_Destroy
01563  *
01564  * -- implement public accessors --
01565  *  nssCKFWObject_GetMDObject
01566  *  nssCKFWObject_GetArena
01567  *
01568  * -- private accessors --
01569  *  nssCKFWObject_SetHandle
01570  *  nssCKFWObject_GetHandle
01571  *
01572  * -- module fronts --
01573  *  nssCKFWObject_IsTokenObject
01574  *  nssCKFWObject_GetAttributeCount
01575  *  nssCKFWObject_GetAttributeTypes
01576  *  nssCKFWObject_GetAttributeSize
01577  *  nssCKFWObject_GetAttribute
01578  *  nssCKFWObject_SetAttribute
01579  *  nssCKFWObject_GetObjectSize
01580  */
01581 
01582 /*
01583  * nssCKFWObject_Create
01584  *
01585  */
01586 NSS_EXTERN NSSCKFWObject *
01587 nssCKFWObject_Create
01588 (
01589   NSSArena *arena,
01590   NSSCKMDObject *mdObject,
01591   NSSCKFWSession *fwSession,
01592   NSSCKFWToken *fwToken,
01593   NSSCKFWInstance *fwInstance,
01594   CK_RV *pError
01595 );
01596 
01597 /*
01598  * nssCKFWObject_Finalize
01599  *
01600  */
01601 NSS_EXTERN void
01602 nssCKFWObject_Finalize
01603 (
01604   NSSCKFWObject *fwObject
01605 );
01606 
01607 /*
01608  * nssCKFWObject_Destroy
01609  *
01610  */
01611 NSS_EXTERN void
01612 nssCKFWObject_Destroy
01613 (
01614   NSSCKFWObject *fwObject
01615 );
01616 
01617 /*
01618  * nssCKFWObject_GetMDObject
01619  *
01620  */
01621 NSS_EXTERN NSSCKMDObject *
01622 nssCKFWObject_GetMDObject
01623 (
01624   NSSCKFWObject *fwObject
01625 );
01626 
01627 /*
01628  * nssCKFWObject_GetArena
01629  *
01630  */
01631 NSS_EXTERN NSSArena *
01632 nssCKFWObject_GetArena
01633 (
01634   NSSCKFWObject *fwObject,
01635   CK_RV *pError
01636 );
01637 
01638 /*
01639  * nssCKFWObject_SetHandle
01640  *
01641  */
01642 NSS_EXTERN CK_RV
01643 nssCKFWObject_SetHandle
01644 (
01645   NSSCKFWObject *fwObject,
01646   CK_OBJECT_HANDLE hObject
01647 );
01648 
01649 /*
01650  * nssCKFWObject_GetHandle
01651  *
01652  */
01653 NSS_EXTERN CK_OBJECT_HANDLE
01654 nssCKFWObject_GetHandle
01655 (
01656   NSSCKFWObject *fwObject
01657 );
01658 
01659 /*
01660  * nssCKFWObject_IsTokenObject
01661  *
01662  */
01663 NSS_EXTERN CK_BBOOL
01664 nssCKFWObject_IsTokenObject
01665 (
01666   NSSCKFWObject *fwObject
01667 );
01668 
01669 /*
01670  * nssCKFWObject_GetAttributeCount
01671  *
01672  */
01673 NSS_EXTERN CK_ULONG
01674 nssCKFWObject_GetAttributeCount
01675 (
01676   NSSCKFWObject *fwObject,
01677   CK_RV *pError
01678 );
01679 
01680 /*
01681  * nssCKFWObject_GetAttributeTypes
01682  *
01683  */
01684 NSS_EXTERN CK_RV
01685 nssCKFWObject_GetAttributeTypes
01686 (
01687   NSSCKFWObject *fwObject,
01688   CK_ATTRIBUTE_TYPE_PTR typeArray,
01689   CK_ULONG ulCount
01690 );
01691 
01692 /*
01693  * nssCKFWObject_GetAttributeSize
01694  *
01695  */
01696 NSS_EXTERN CK_ULONG
01697 nssCKFWObject_GetAttributeSize
01698 (
01699   NSSCKFWObject *fwObject,
01700   CK_ATTRIBUTE_TYPE attribute,
01701   CK_RV *pError
01702 );
01703 
01704 /*
01705  * nssCKFWObject_GetAttribute
01706  *
01707  * Usual NSS allocation rules:
01708  * If itemOpt is not NULL, it will be returned; otherwise an NSSItem
01709  * will be allocated.  If itemOpt is not NULL but itemOpt->data is,
01710  * the buffer will be allocated; otherwise, the buffer will be used.
01711  * Any allocations will come from the optional arena, if one is
01712  * specified.
01713  */
01714 NSS_EXTERN NSSItem *
01715 nssCKFWObject_GetAttribute
01716 (
01717   NSSCKFWObject *fwObject,
01718   CK_ATTRIBUTE_TYPE attribute,
01719   NSSItem *itemOpt,
01720   NSSArena *arenaOpt,
01721   CK_RV *pError
01722 );
01723 
01724 /*
01725  * nssCKFWObject_SetAttribute
01726  *
01727  */
01728 NSS_EXTERN CK_RV
01729 nssCKFWObject_SetAttribute
01730 (
01731   NSSCKFWObject *fwObject,
01732   CK_ATTRIBUTE_TYPE attribute,
01733   NSSItem *value
01734 );
01735 
01736 /*
01737  * nssCKFWObject_GetObjectSize
01738  *
01739  */
01740 NSS_EXTERN CK_ULONG
01741 nssCKFWObject_GetObjectSize
01742 (
01743   NSSCKFWObject *fwObject,
01744   CK_RV *pError
01745 );
01746 
01747 /*
01748  * NSSCKFWFindObjects
01749  *
01750  *  -- create/destroy --
01751  *  nssCKFWFindObjects_Create
01752  *  nssCKFWFindObjects_Destroy
01753  *
01754  *  -- implement public accessors --
01755  *  nssCKFWFindObjects_GetMDFindObjects
01756  *
01757  *  -- private accessors --
01758  *
01759  *  -- module fronts --
01760  *  nssCKFWFindObjects_Next
01761  */
01762 
01763 /*
01764  * nssCKFWFindObjects_Create
01765  *
01766  */
01767 NSS_EXTERN NSSCKFWFindObjects *
01768 nssCKFWFindObjects_Create
01769 (
01770   NSSCKFWSession *fwSession,
01771   NSSCKFWToken *fwToken,
01772   NSSCKFWInstance *fwInstance,
01773   NSSCKMDFindObjects *mdFindObjects1,
01774   NSSCKMDFindObjects *mdFindObjects2,
01775   CK_RV *pError
01776 );
01777 
01778 /*
01779  * nssCKFWFindObjects_Destroy
01780  *
01781  */
01782 NSS_EXTERN void
01783 nssCKFWFindObjects_Destroy
01784 (
01785   NSSCKFWFindObjects *fwFindObjects
01786 );
01787 
01788 /*
01789  * nssCKFWFindObjects_GetMDFindObjects
01790  *
01791  */
01792 NSS_EXTERN NSSCKMDFindObjects *
01793 nssCKFWFindObjects_GetMDFindObjects
01794 (
01795   NSSCKFWFindObjects *fwFindObjects
01796 );
01797 
01798 /*
01799  * nssCKFWFindObjects_Next
01800  *
01801  */
01802 NSS_EXTERN NSSCKFWObject *
01803 nssCKFWFindObjects_Next
01804 (
01805   NSSCKFWFindObjects *fwFindObjects,
01806   NSSArena *arenaOpt,
01807   CK_RV *pError
01808 );
01809 
01810 /*
01811  * NSSCKFWMutex
01812  *
01813  *  nssCKFWMutex_Create
01814  *  nssCKFWMutex_Destroy
01815  *  nssCKFWMutex_Lock
01816  *  nssCKFWMutex_Unlock
01817  *
01818  */
01819 
01820 /*
01821  * nssCKFWMutex_Create
01822  *
01823  */
01824 NSS_EXTERN NSSCKFWMutex *
01825 nssCKFWMutex_Create
01826 (
01827   CK_C_INITIALIZE_ARGS_PTR pInitArgs,
01828   CryptokiLockingState LockingState,
01829   NSSArena *arena,
01830   CK_RV *pError
01831 );
01832 
01833 /*
01834  * nssCKFWMutex_Destroy
01835  *
01836  */
01837 NSS_EXTERN CK_RV
01838 nssCKFWMutex_Destroy
01839 (
01840   NSSCKFWMutex *mutex
01841 );
01842 
01843 /*
01844  * nssCKFWMutex_Lock
01845  *
01846  */
01847 NSS_EXTERN CK_RV
01848 nssCKFWMutex_Lock
01849 (
01850   NSSCKFWMutex *mutex
01851 );
01852 
01853 /*
01854  * nssCKFWMutex_Unlock
01855  *
01856  */
01857 NSS_EXTERN CK_RV
01858 nssCKFWMutex_Unlock
01859 (
01860   NSSCKFWMutex *mutex
01861 );
01862 
01863 #endif /* CKFW_H */