Back to index

lightning-sunbird  0.9+nobinonly
nssckfw.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 NSSCKFW_H
00038 #define NSSCKFW_H
00039 
00040 #ifdef DEBUG
00041 static const char NSSCKFW_CVS_ID[] = "@(#) $RCSfile: nssckfw.h,v $ $Revision: 1.4 $ $Date: 2005/01/20 02:25:45 $";
00042 #endif /* DEBUG */
00043 
00044 /*
00045  * nssckfw.h
00046  *
00047  * This file prototypes the publicly available calls of the 
00048  * NSS Cryptoki Framework.
00049  */
00050 
00051 #ifndef NSSBASET_H
00052 #include "nssbaset.h"
00053 #endif /* NSSBASET_H */
00054 
00055 #ifndef NSSCKT_H
00056 #include "nssckt.h"
00057 #endif /* NSSCKT_H */
00058 
00059 #ifndef NSSCKFWT_H
00060 #include "nssckfwt.h"
00061 #endif /* NSSCKFWT_H */
00062 
00063 /*
00064  * NSSCKFWInstance
00065  *
00066  *  NSSCKFWInstance_GetMDInstance
00067  *  NSSCKFWInstance_GetArena
00068  *  NSSCKFWInstance_MayCreatePthreads
00069  *  NSSCKFWInstance_CreateMutex
00070  *  NSSCKFWInstance_GetConfigurationData
00071  */
00072 
00073 /*
00074  * NSSCKFWInstance_GetMDInstance
00075  *
00076  */
00077 
00078 NSS_EXTERN NSSCKMDInstance *
00079 NSSCKFWInstance_GetMDInstance
00080 (
00081   NSSCKFWInstance *fwInstance
00082 );
00083 
00084 /*
00085  * NSSCKFWInstance_GetArena
00086  *
00087  */
00088 
00089 NSS_EXTERN NSSArena *
00090 NSSCKFWInstance_GetArena
00091 (
00092   NSSCKFWInstance *fwInstance,
00093   CK_RV *pError
00094 );
00095 
00096 /*
00097  * NSSCKFWInstance_MayCreatePthreads
00098  *
00099  */
00100 
00101 NSS_EXTERN CK_BBOOL
00102 NSSCKFWInstance_MayCreatePthreads
00103 (
00104   NSSCKFWInstance *fwInstance
00105 );
00106 
00107 /*
00108  * NSSCKFWInstance_CreateMutex
00109  *
00110  */
00111 
00112 NSS_EXTERN NSSCKFWMutex *
00113 NSSCKFWInstance_CreateMutex
00114 (
00115   NSSCKFWInstance *fwInstance,
00116   NSSArena *arena,
00117   CK_RV *pError
00118 );
00119 
00120 /*
00121  * NSSCKFWInstance_GetConfigurationData
00122  *
00123  */
00124 
00125 NSS_EXTERN NSSUTF8 *
00126 NSSCKFWInstance_GetConfigurationData
00127 (
00128   NSSCKFWInstance *fwInstance
00129 );
00130 
00131 /*
00132  * NSSCKFWInstance_GetInitArgs
00133  *
00134  */
00135 
00136 NSS_EXTERN CK_C_INITIALIZE_ARGS_PTR
00137 NSSCKFWInstance_GetInitArgs
00138 (
00139   NSSCKFWInstance *fwInstance
00140 );
00141 
00142 /*
00143  * NSSCKFWSlot
00144  *
00145  *  NSSCKFWSlot_GetMDSlot
00146  *  NSSCKFWSlot_GetFWInstance
00147  *  NSSCKFWSlot_GetMDInstance
00148  *
00149  */
00150 
00151 /*
00152  * NSSCKFWSlot_GetMDSlot
00153  *
00154  */
00155 
00156 NSS_EXTERN NSSCKMDSlot *
00157 NSSCKFWSlot_GetMDSlot
00158 (
00159   NSSCKFWSlot *fwSlot
00160 );
00161 
00162 /*
00163  * NSSCKFWSlot_GetFWInstance
00164  *
00165  */
00166 
00167 NSS_EXTERN NSSCKFWInstance *
00168 NSSCKFWSlot_GetFWInstance
00169 (
00170   NSSCKFWSlot *fwSlot
00171 );
00172 
00173 /*
00174  * NSSCKFWSlot_GetMDInstance
00175  *
00176  */
00177 
00178 NSS_EXTERN NSSCKMDInstance *
00179 NSSCKFWSlot_GetMDInstance
00180 (
00181   NSSCKFWSlot *fwSlot
00182 );
00183 
00184 /*
00185  * NSSCKFWToken
00186  *
00187  *  NSSCKFWToken_GetMDToken
00188  *  NSSCKFWToken_GetFWSlot
00189  *  NSSCKFWToken_GetMDSlot
00190  *  NSSCKFWToken_GetSessionState
00191  *
00192  */
00193 
00194 /*
00195  * NSSCKFWToken_GetMDToken
00196  *
00197  */
00198 
00199 NSS_EXTERN NSSCKMDToken *
00200 NSSCKFWToken_GetMDToken
00201 (
00202   NSSCKFWToken *fwToken
00203 );
00204 
00205 /*
00206  * NSSCKFWToken_GetArena
00207  *
00208  */
00209 
00210 NSS_EXTERN NSSArena *
00211 NSSCKFWToken_GetArena
00212 (
00213   NSSCKFWToken *fwToken,
00214   CK_RV *pError
00215 );
00216 
00217 /*
00218  * NSSCKFWToken_GetFWSlot
00219  *
00220  */
00221 
00222 NSS_EXTERN NSSCKFWSlot *
00223 NSSCKFWToken_GetFWSlot
00224 (
00225   NSSCKFWToken *fwToken
00226 );
00227 
00228 /*
00229  * NSSCKFWToken_GetMDSlot
00230  *
00231  */
00232 
00233 NSS_EXTERN NSSCKMDSlot *
00234 NSSCKFWToken_GetMDSlot
00235 (
00236   NSSCKFWToken *fwToken
00237 );
00238 
00239 /*
00240  * NSSCKFWToken_GetSessionState
00241  *
00242  */
00243 
00244 NSS_EXTERN CK_STATE
00245 NSSCKFWSession_GetSessionState
00246 (
00247   NSSCKFWToken *fwToken
00248 );
00249 
00250 /*
00251  * NSSCKFWMechanism
00252  *
00253  *  NSSKCFWMechanism_GetMDMechanism
00254  *  NSSCKFWMechanism_GetParameter
00255  *
00256  */
00257 
00258 /*
00259  * NSSKCFWMechanism_GetMDMechanism
00260  *
00261  */
00262 
00263 NSS_EXTERN NSSCKMDMechanism *
00264 NSSCKFWMechanism_GetMDMechanism
00265 (
00266   NSSCKFWMechanism *fwMechanism
00267 );
00268 
00269 /*
00270  * NSSCKFWMechanism_GetParameter
00271  *
00272  */
00273 
00274 NSS_EXTERN NSSItem *
00275 NSSCKFWMechanism_GetParameter
00276 (
00277   NSSCKFWMechanism *fwMechanism
00278 );
00279 
00280 /*
00281  * NSSCKFWSession
00282  *
00283  *  NSSCKFWSession_GetMDSession
00284  *  NSSCKFWSession_GetArena
00285  *  NSSCKFWSession_CallNotification
00286  *  NSSCKFWSession_IsRWSession
00287  *  NSSCKFWSession_IsSO
00288  *
00289  */
00290 
00291 /*
00292  * NSSCKFWSession_GetMDSession
00293  *
00294  */
00295 
00296 NSS_EXTERN NSSCKMDSession *
00297 NSSCKFWSession_GetMDSession
00298 (
00299   NSSCKFWSession *fwSession
00300 );
00301 
00302 /*
00303  * NSSCKFWSession_GetArena
00304  *
00305  */
00306 
00307 NSS_EXTERN NSSArena *
00308 NSSCKFWSession_GetArena
00309 (
00310   NSSCKFWSession *fwSession,
00311   CK_RV *pError
00312 );
00313 
00314 /*
00315  * NSSCKFWSession_CallNotification
00316  *
00317  */
00318 
00319 NSS_EXTERN CK_RV
00320 NSSCKFWSession_CallNotification
00321 (
00322   NSSCKFWSession *fwSession,
00323   CK_NOTIFICATION event
00324 );
00325 
00326 /*
00327  * NSSCKFWSession_IsRWSession
00328  *
00329  */
00330 
00331 NSS_EXTERN CK_BBOOL
00332 NSSCKFWSession_IsRWSession
00333 (
00334   NSSCKFWSession *fwSession
00335 );
00336 
00337 /*
00338  * NSSCKFWSession_IsSO
00339  *
00340  */
00341 
00342 NSS_EXTERN CK_BBOOL
00343 NSSCKFWSession_IsSO
00344 (
00345   NSSCKFWSession *fwSession
00346 );
00347 
00348 /*
00349  * NSSCKFWObject
00350  *
00351  *  NSSCKFWObject_GetMDObject
00352  *  NSSCKFWObject_GetArena
00353  *  NSSCKFWObject_IsTokenObject
00354  *  NSSCKFWObject_GetAttributeCount
00355  *  NSSCKFWObject_GetAttributeTypes
00356  *  NSSCKFWObject_GetAttributeSize
00357  *  NSSCKFWObject_GetAttribute
00358  *  NSSCKFWObject_GetObjectSize
00359  */
00360 
00361 /*
00362  * NSSCKFWObject_GetMDObject
00363  *
00364  */
00365 NSS_EXTERN NSSCKMDObject *
00366 NSSCKFWObject_GetMDObject
00367 (
00368   NSSCKFWObject *fwObject
00369 );
00370 
00371 /*
00372  * NSSCKFWObject_GetArena
00373  *
00374  */
00375 NSS_EXTERN NSSArena *
00376 NSSCKFWObject_GetArena
00377 (
00378   NSSCKFWObject *fwObject,
00379   CK_RV *pError
00380 );
00381 
00382 /*
00383  * NSSCKFWObject_IsTokenObject
00384  *
00385  */
00386 NSS_EXTERN CK_BBOOL
00387 NSSCKFWObject_IsTokenObject
00388 (
00389   NSSCKFWObject *fwObject
00390 );
00391 
00392 /*
00393  * NSSCKFWObject_GetAttributeCount
00394  *
00395  */
00396 NSS_EXTERN CK_ULONG
00397 NSSCKFWObject_GetAttributeCount
00398 (
00399   NSSCKFWObject *fwObject,
00400   CK_RV *pError
00401 );
00402 
00403 /*
00404  * NSSCKFWObject_GetAttributeTypes
00405  *
00406  */
00407 NSS_EXTERN CK_RV
00408 NSSCKFWObject_GetAttributeTypes
00409 (
00410   NSSCKFWObject *fwObject,
00411   CK_ATTRIBUTE_TYPE_PTR typeArray,
00412   CK_ULONG ulCount
00413 );
00414 
00415 /*
00416  * NSSCKFWObject_GetAttributeSize
00417  *
00418  */
00419 NSS_EXTERN CK_ULONG
00420 NSSCKFWObject_GetAttributeSize
00421 (
00422   NSSCKFWObject *fwObject,
00423   CK_ATTRIBUTE_TYPE attribute,
00424   CK_RV *pError
00425 );
00426 
00427 /*
00428  * NSSCKFWObject_GetAttribute
00429  *
00430  */
00431 NSS_EXTERN NSSItem *
00432 NSSCKFWObject_GetAttribute
00433 (
00434   NSSCKFWObject *fwObject,
00435   CK_ATTRIBUTE_TYPE attribute,
00436   NSSItem *itemOpt,
00437   NSSArena *arenaOpt,
00438   CK_RV *pError
00439 );
00440 
00441 /*
00442  * NSSCKFWObject_GetObjectSize
00443  *
00444  */
00445 NSS_EXTERN CK_ULONG
00446 NSSCKFWObject_GetObjectSize
00447 (
00448   NSSCKFWObject *fwObject,
00449   CK_RV *pError
00450 );
00451 
00452 /*
00453  * NSSCKFWFindObjects
00454  *
00455  *  NSSCKFWFindObjects_GetMDFindObjects
00456  *
00457  */
00458 
00459 /*
00460  * NSSCKFWFindObjects_GetMDFindObjects
00461  *
00462  */
00463 
00464 NSS_EXTERN NSSCKMDFindObjects *
00465 NSSCKFWFindObjects_GetMDFindObjects
00466 (
00467   NSSCKFWFindObjects *
00468 );
00469 
00470 /*
00471  * NSSCKFWMutex
00472  *
00473  *  NSSCKFWMutex_Destroy
00474  *  NSSCKFWMutex_Lock
00475  *  NSSCKFWMutex_Unlock
00476  *
00477  */
00478 
00479 /*
00480  * NSSCKFWMutex_Destroy
00481  *
00482  */
00483 
00484 NSS_EXTERN CK_RV
00485 NSSCKFWMutex_Destroy
00486 (
00487   NSSCKFWMutex *mutex
00488 );
00489 
00490 /*
00491  * NSSCKFWMutex_Lock
00492  *
00493  */
00494 
00495 NSS_EXTERN CK_RV
00496 NSSCKFWMutex_Lock
00497 (
00498   NSSCKFWMutex *mutex
00499 );
00500 
00501 /*
00502  * NSSCKFWMutex_Unlock
00503  *
00504  */
00505 
00506 NSS_EXTERN CK_RV
00507 NSSCKFWMutex_Unlock
00508 (
00509   NSSCKFWMutex *mutex
00510 );
00511 
00512 #endif /* NSSCKFW_H */
00513