security/nss/lib/ckfw/nssckfw.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #ifndef NSSCKFW_H
michael@0 6 #define NSSCKFW_H
michael@0 7
michael@0 8 /*
michael@0 9 * nssckfw.h
michael@0 10 *
michael@0 11 * This file prototypes the publicly available calls of the
michael@0 12 * NSS Cryptoki Framework.
michael@0 13 */
michael@0 14
michael@0 15 #ifndef NSSBASET_H
michael@0 16 #include "nssbaset.h"
michael@0 17 #endif /* NSSBASET_H */
michael@0 18
michael@0 19 #ifndef NSSCKT_H
michael@0 20 #include "nssckt.h"
michael@0 21 #endif /* NSSCKT_H */
michael@0 22
michael@0 23 #ifndef NSSCKFWT_H
michael@0 24 #include "nssckfwt.h"
michael@0 25 #endif /* NSSCKFWT_H */
michael@0 26
michael@0 27 /*
michael@0 28 * NSSCKFWInstance
michael@0 29 *
michael@0 30 * NSSCKFWInstance_GetMDInstance
michael@0 31 * NSSCKFWInstance_GetArena
michael@0 32 * NSSCKFWInstance_MayCreatePthreads
michael@0 33 * NSSCKFWInstance_CreateMutex
michael@0 34 * NSSCKFWInstance_GetConfigurationData
michael@0 35 */
michael@0 36
michael@0 37 /*
michael@0 38 * NSSCKFWInstance_GetMDInstance
michael@0 39 *
michael@0 40 */
michael@0 41
michael@0 42 NSS_EXTERN NSSCKMDInstance *
michael@0 43 NSSCKFWInstance_GetMDInstance
michael@0 44 (
michael@0 45 NSSCKFWInstance *fwInstance
michael@0 46 );
michael@0 47
michael@0 48 /*
michael@0 49 * NSSCKFWInstance_GetArena
michael@0 50 *
michael@0 51 */
michael@0 52
michael@0 53 NSS_EXTERN NSSArena *
michael@0 54 NSSCKFWInstance_GetArena
michael@0 55 (
michael@0 56 NSSCKFWInstance *fwInstance,
michael@0 57 CK_RV *pError
michael@0 58 );
michael@0 59
michael@0 60 /*
michael@0 61 * NSSCKFWInstance_MayCreatePthreads
michael@0 62 *
michael@0 63 */
michael@0 64
michael@0 65 NSS_EXTERN CK_BBOOL
michael@0 66 NSSCKFWInstance_MayCreatePthreads
michael@0 67 (
michael@0 68 NSSCKFWInstance *fwInstance
michael@0 69 );
michael@0 70
michael@0 71 /*
michael@0 72 * NSSCKFWInstance_CreateMutex
michael@0 73 *
michael@0 74 */
michael@0 75
michael@0 76 NSS_EXTERN NSSCKFWMutex *
michael@0 77 NSSCKFWInstance_CreateMutex
michael@0 78 (
michael@0 79 NSSCKFWInstance *fwInstance,
michael@0 80 NSSArena *arena,
michael@0 81 CK_RV *pError
michael@0 82 );
michael@0 83
michael@0 84 /*
michael@0 85 * NSSCKFWInstance_GetConfigurationData
michael@0 86 *
michael@0 87 */
michael@0 88
michael@0 89 NSS_EXTERN NSSUTF8 *
michael@0 90 NSSCKFWInstance_GetConfigurationData
michael@0 91 (
michael@0 92 NSSCKFWInstance *fwInstance
michael@0 93 );
michael@0 94
michael@0 95 /*
michael@0 96 * NSSCKFWInstance_GetInitArgs
michael@0 97 *
michael@0 98 */
michael@0 99
michael@0 100 NSS_EXTERN CK_C_INITIALIZE_ARGS_PTR
michael@0 101 NSSCKFWInstance_GetInitArgs
michael@0 102 (
michael@0 103 NSSCKFWInstance *fwInstance
michael@0 104 );
michael@0 105
michael@0 106 /*
michael@0 107 * NSSCKFWSlot
michael@0 108 *
michael@0 109 * NSSCKFWSlot_GetMDSlot
michael@0 110 * NSSCKFWSlot_GetFWInstance
michael@0 111 * NSSCKFWSlot_GetMDInstance
michael@0 112 *
michael@0 113 */
michael@0 114
michael@0 115 /*
michael@0 116 * NSSCKFWSlot_GetMDSlot
michael@0 117 *
michael@0 118 */
michael@0 119
michael@0 120 NSS_EXTERN NSSCKMDSlot *
michael@0 121 NSSCKFWSlot_GetMDSlot
michael@0 122 (
michael@0 123 NSSCKFWSlot *fwSlot
michael@0 124 );
michael@0 125
michael@0 126 /*
michael@0 127 * NSSCKFWSlot_GetFWInstance
michael@0 128 *
michael@0 129 */
michael@0 130
michael@0 131 NSS_EXTERN NSSCKFWInstance *
michael@0 132 NSSCKFWSlot_GetFWInstance
michael@0 133 (
michael@0 134 NSSCKFWSlot *fwSlot
michael@0 135 );
michael@0 136
michael@0 137 /*
michael@0 138 * NSSCKFWSlot_GetMDInstance
michael@0 139 *
michael@0 140 */
michael@0 141
michael@0 142 NSS_EXTERN NSSCKMDInstance *
michael@0 143 NSSCKFWSlot_GetMDInstance
michael@0 144 (
michael@0 145 NSSCKFWSlot *fwSlot
michael@0 146 );
michael@0 147
michael@0 148 /*
michael@0 149 * NSSCKFWToken
michael@0 150 *
michael@0 151 * NSSCKFWToken_GetMDToken
michael@0 152 * NSSCKFWToken_GetFWSlot
michael@0 153 * NSSCKFWToken_GetMDSlot
michael@0 154 * NSSCKFWToken_GetSessionState
michael@0 155 *
michael@0 156 */
michael@0 157
michael@0 158 /*
michael@0 159 * NSSCKFWToken_GetMDToken
michael@0 160 *
michael@0 161 */
michael@0 162
michael@0 163 NSS_EXTERN NSSCKMDToken *
michael@0 164 NSSCKFWToken_GetMDToken
michael@0 165 (
michael@0 166 NSSCKFWToken *fwToken
michael@0 167 );
michael@0 168
michael@0 169 /*
michael@0 170 * NSSCKFWToken_GetArena
michael@0 171 *
michael@0 172 */
michael@0 173
michael@0 174 NSS_EXTERN NSSArena *
michael@0 175 NSSCKFWToken_GetArena
michael@0 176 (
michael@0 177 NSSCKFWToken *fwToken,
michael@0 178 CK_RV *pError
michael@0 179 );
michael@0 180
michael@0 181 /*
michael@0 182 * NSSCKFWToken_GetFWSlot
michael@0 183 *
michael@0 184 */
michael@0 185
michael@0 186 NSS_EXTERN NSSCKFWSlot *
michael@0 187 NSSCKFWToken_GetFWSlot
michael@0 188 (
michael@0 189 NSSCKFWToken *fwToken
michael@0 190 );
michael@0 191
michael@0 192 /*
michael@0 193 * NSSCKFWToken_GetMDSlot
michael@0 194 *
michael@0 195 */
michael@0 196
michael@0 197 NSS_EXTERN NSSCKMDSlot *
michael@0 198 NSSCKFWToken_GetMDSlot
michael@0 199 (
michael@0 200 NSSCKFWToken *fwToken
michael@0 201 );
michael@0 202
michael@0 203 /*
michael@0 204 * NSSCKFWToken_GetSessionState
michael@0 205 *
michael@0 206 */
michael@0 207
michael@0 208 NSS_EXTERN CK_STATE
michael@0 209 NSSCKFWToken_GetSessionState
michael@0 210 (
michael@0 211 NSSCKFWToken *fwToken
michael@0 212 );
michael@0 213
michael@0 214 /*
michael@0 215 * NSSCKFWMechanism
michael@0 216 *
michael@0 217 * NSSKCFWMechanism_GetMDMechanism
michael@0 218 * NSSCKFWMechanism_GetParameter
michael@0 219 *
michael@0 220 */
michael@0 221
michael@0 222 /*
michael@0 223 * NSSKCFWMechanism_GetMDMechanism
michael@0 224 *
michael@0 225 */
michael@0 226
michael@0 227 NSS_EXTERN NSSCKMDMechanism *
michael@0 228 NSSCKFWMechanism_GetMDMechanism
michael@0 229 (
michael@0 230 NSSCKFWMechanism *fwMechanism
michael@0 231 );
michael@0 232
michael@0 233 /*
michael@0 234 * NSSCKFWMechanism_GetParameter
michael@0 235 *
michael@0 236 */
michael@0 237
michael@0 238 NSS_EXTERN NSSItem *
michael@0 239 NSSCKFWMechanism_GetParameter
michael@0 240 (
michael@0 241 NSSCKFWMechanism *fwMechanism
michael@0 242 );
michael@0 243
michael@0 244 /*
michael@0 245 * NSSCKFWSession
michael@0 246 *
michael@0 247 * NSSCKFWSession_GetMDSession
michael@0 248 * NSSCKFWSession_GetArena
michael@0 249 * NSSCKFWSession_CallNotification
michael@0 250 * NSSCKFWSession_IsRWSession
michael@0 251 * NSSCKFWSession_IsSO
michael@0 252 * NSSCKFWSession_GetCurrentCryptoOperation
michael@0 253 *
michael@0 254 */
michael@0 255
michael@0 256 /*
michael@0 257 * NSSCKFWSession_GetMDSession
michael@0 258 *
michael@0 259 */
michael@0 260
michael@0 261 NSS_EXTERN NSSCKMDSession *
michael@0 262 NSSCKFWSession_GetMDSession
michael@0 263 (
michael@0 264 NSSCKFWSession *fwSession
michael@0 265 );
michael@0 266
michael@0 267 /*
michael@0 268 * NSSCKFWSession_GetArena
michael@0 269 *
michael@0 270 */
michael@0 271
michael@0 272 NSS_EXTERN NSSArena *
michael@0 273 NSSCKFWSession_GetArena
michael@0 274 (
michael@0 275 NSSCKFWSession *fwSession,
michael@0 276 CK_RV *pError
michael@0 277 );
michael@0 278
michael@0 279 /*
michael@0 280 * NSSCKFWSession_CallNotification
michael@0 281 *
michael@0 282 */
michael@0 283
michael@0 284 NSS_EXTERN CK_RV
michael@0 285 NSSCKFWSession_CallNotification
michael@0 286 (
michael@0 287 NSSCKFWSession *fwSession,
michael@0 288 CK_NOTIFICATION event
michael@0 289 );
michael@0 290
michael@0 291 /*
michael@0 292 * NSSCKFWSession_IsRWSession
michael@0 293 *
michael@0 294 */
michael@0 295
michael@0 296 NSS_EXTERN CK_BBOOL
michael@0 297 NSSCKFWSession_IsRWSession
michael@0 298 (
michael@0 299 NSSCKFWSession *fwSession
michael@0 300 );
michael@0 301
michael@0 302 /*
michael@0 303 * NSSCKFWSession_IsSO
michael@0 304 *
michael@0 305 */
michael@0 306
michael@0 307 NSS_EXTERN CK_BBOOL
michael@0 308 NSSCKFWSession_IsSO
michael@0 309 (
michael@0 310 NSSCKFWSession *fwSession
michael@0 311 );
michael@0 312
michael@0 313 /*
michael@0 314 * NSSCKFWSession_GetCurrentCryptoOperation
michael@0 315 *
michael@0 316 */
michael@0 317
michael@0 318 NSS_EXTERN NSSCKFWCryptoOperation *
michael@0 319 NSSCKFWSession_GetCurrentCryptoOperation
michael@0 320 (
michael@0 321 NSSCKFWSession *fwSession,
michael@0 322 NSSCKFWCryptoOperationState state
michael@0 323 );
michael@0 324
michael@0 325 /*
michael@0 326 * NSSCKFWObject
michael@0 327 *
michael@0 328 * NSSCKFWObject_GetMDObject
michael@0 329 * NSSCKFWObject_GetArena
michael@0 330 * NSSCKFWObject_IsTokenObject
michael@0 331 * NSSCKFWObject_GetAttributeCount
michael@0 332 * NSSCKFWObject_GetAttributeTypes
michael@0 333 * NSSCKFWObject_GetAttributeSize
michael@0 334 * NSSCKFWObject_GetAttribute
michael@0 335 * NSSCKFWObject_GetObjectSize
michael@0 336 */
michael@0 337
michael@0 338 /*
michael@0 339 * NSSCKFWObject_GetMDObject
michael@0 340 *
michael@0 341 */
michael@0 342 NSS_EXTERN NSSCKMDObject *
michael@0 343 NSSCKFWObject_GetMDObject
michael@0 344 (
michael@0 345 NSSCKFWObject *fwObject
michael@0 346 );
michael@0 347
michael@0 348 /*
michael@0 349 * NSSCKFWObject_GetArena
michael@0 350 *
michael@0 351 */
michael@0 352 NSS_EXTERN NSSArena *
michael@0 353 NSSCKFWObject_GetArena
michael@0 354 (
michael@0 355 NSSCKFWObject *fwObject,
michael@0 356 CK_RV *pError
michael@0 357 );
michael@0 358
michael@0 359 /*
michael@0 360 * NSSCKFWObject_IsTokenObject
michael@0 361 *
michael@0 362 */
michael@0 363 NSS_EXTERN CK_BBOOL
michael@0 364 NSSCKFWObject_IsTokenObject
michael@0 365 (
michael@0 366 NSSCKFWObject *fwObject
michael@0 367 );
michael@0 368
michael@0 369 /*
michael@0 370 * NSSCKFWObject_GetAttributeCount
michael@0 371 *
michael@0 372 */
michael@0 373 NSS_EXTERN CK_ULONG
michael@0 374 NSSCKFWObject_GetAttributeCount
michael@0 375 (
michael@0 376 NSSCKFWObject *fwObject,
michael@0 377 CK_RV *pError
michael@0 378 );
michael@0 379
michael@0 380 /*
michael@0 381 * NSSCKFWObject_GetAttributeTypes
michael@0 382 *
michael@0 383 */
michael@0 384 NSS_EXTERN CK_RV
michael@0 385 NSSCKFWObject_GetAttributeTypes
michael@0 386 (
michael@0 387 NSSCKFWObject *fwObject,
michael@0 388 CK_ATTRIBUTE_TYPE_PTR typeArray,
michael@0 389 CK_ULONG ulCount
michael@0 390 );
michael@0 391
michael@0 392 /*
michael@0 393 * NSSCKFWObject_GetAttributeSize
michael@0 394 *
michael@0 395 */
michael@0 396 NSS_EXTERN CK_ULONG
michael@0 397 NSSCKFWObject_GetAttributeSize
michael@0 398 (
michael@0 399 NSSCKFWObject *fwObject,
michael@0 400 CK_ATTRIBUTE_TYPE attribute,
michael@0 401 CK_RV *pError
michael@0 402 );
michael@0 403
michael@0 404 /*
michael@0 405 * NSSCKFWObject_GetAttribute
michael@0 406 *
michael@0 407 */
michael@0 408 NSS_EXTERN NSSItem *
michael@0 409 NSSCKFWObject_GetAttribute
michael@0 410 (
michael@0 411 NSSCKFWObject *fwObject,
michael@0 412 CK_ATTRIBUTE_TYPE attribute,
michael@0 413 NSSItem *itemOpt,
michael@0 414 NSSArena *arenaOpt,
michael@0 415 CK_RV *pError
michael@0 416 );
michael@0 417
michael@0 418 /*
michael@0 419 * NSSCKFWObject_GetObjectSize
michael@0 420 *
michael@0 421 */
michael@0 422 NSS_EXTERN CK_ULONG
michael@0 423 NSSCKFWObject_GetObjectSize
michael@0 424 (
michael@0 425 NSSCKFWObject *fwObject,
michael@0 426 CK_RV *pError
michael@0 427 );
michael@0 428
michael@0 429 /*
michael@0 430 * NSSCKFWFindObjects
michael@0 431 *
michael@0 432 * NSSCKFWFindObjects_GetMDFindObjects
michael@0 433 *
michael@0 434 */
michael@0 435
michael@0 436 /*
michael@0 437 * NSSCKFWFindObjects_GetMDFindObjects
michael@0 438 *
michael@0 439 */
michael@0 440
michael@0 441 NSS_EXTERN NSSCKMDFindObjects *
michael@0 442 NSSCKFWFindObjects_GetMDFindObjects
michael@0 443 (
michael@0 444 NSSCKFWFindObjects *
michael@0 445 );
michael@0 446
michael@0 447 /*
michael@0 448 * NSSCKFWMutex
michael@0 449 *
michael@0 450 * NSSCKFWMutex_Destroy
michael@0 451 * NSSCKFWMutex_Lock
michael@0 452 * NSSCKFWMutex_Unlock
michael@0 453 *
michael@0 454 */
michael@0 455
michael@0 456 /*
michael@0 457 * NSSCKFWMutex_Destroy
michael@0 458 *
michael@0 459 */
michael@0 460
michael@0 461 NSS_EXTERN CK_RV
michael@0 462 NSSCKFWMutex_Destroy
michael@0 463 (
michael@0 464 NSSCKFWMutex *mutex
michael@0 465 );
michael@0 466
michael@0 467 /*
michael@0 468 * NSSCKFWMutex_Lock
michael@0 469 *
michael@0 470 */
michael@0 471
michael@0 472 NSS_EXTERN CK_RV
michael@0 473 NSSCKFWMutex_Lock
michael@0 474 (
michael@0 475 NSSCKFWMutex *mutex
michael@0 476 );
michael@0 477
michael@0 478 /*
michael@0 479 * NSSCKFWMutex_Unlock
michael@0 480 *
michael@0 481 */
michael@0 482
michael@0 483 NSS_EXTERN CK_RV
michael@0 484 NSSCKFWMutex_Unlock
michael@0 485 (
michael@0 486 NSSCKFWMutex *mutex
michael@0 487 );
michael@0 488
michael@0 489 #endif /* NSSCKFW_H */
michael@0 490

mercurial