michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef NSSCKFWT_H michael@0: #define NSSCKFWT_H michael@0: michael@0: /* michael@0: * nssckfwt.h michael@0: * michael@0: * This file declares the public types used by the NSS Cryptoki Framework. michael@0: */ michael@0: michael@0: /* michael@0: * NSSCKFWInstance michael@0: * michael@0: */ michael@0: michael@0: struct NSSCKFWInstanceStr; michael@0: typedef struct NSSCKFWInstanceStr NSSCKFWInstance; michael@0: michael@0: /* michael@0: * NSSCKFWSlot michael@0: * michael@0: */ michael@0: michael@0: struct NSSCKFWSlotStr; michael@0: typedef struct NSSCKFWSlotStr NSSCKFWSlot; michael@0: michael@0: /* michael@0: * NSSCKFWToken michael@0: * michael@0: */ michael@0: michael@0: struct NSSCKFWTokenStr; michael@0: typedef struct NSSCKFWTokenStr NSSCKFWToken; michael@0: michael@0: /* michael@0: * NSSCKFWMechanism michael@0: * michael@0: */ michael@0: michael@0: struct NSSCKFWMechanismStr; michael@0: typedef struct NSSCKFWMechanismStr NSSCKFWMechanism; michael@0: michael@0: /* michael@0: * NSSCKFWCryptoOperation michael@0: * michael@0: */ michael@0: michael@0: struct NSSCKFWCryptoOperationStr; michael@0: typedef struct NSSCKFWCryptoOperationStr NSSCKFWCryptoOperation; michael@0: michael@0: michael@0: /* michael@0: * NSSCKFWSession michael@0: * michael@0: */ michael@0: michael@0: struct NSSCKFWSessionStr; michael@0: typedef struct NSSCKFWSessionStr NSSCKFWSession; michael@0: michael@0: /* michael@0: * NSSCKFWObject michael@0: * michael@0: */ michael@0: michael@0: struct NSSCKFWObjectStr; michael@0: typedef struct NSSCKFWObjectStr NSSCKFWObject; michael@0: michael@0: /* michael@0: * NSSCKFWFindObjects michael@0: * michael@0: */ michael@0: michael@0: struct NSSCKFWFindObjectsStr; michael@0: typedef struct NSSCKFWFindObjectsStr NSSCKFWFindObjects; michael@0: michael@0: /* michael@0: * NSSCKFWMutex michael@0: * michael@0: */ michael@0: michael@0: struct NSSCKFWMutexStr; michael@0: typedef struct NSSCKFWMutexStr NSSCKFWMutex; michael@0: michael@0: typedef enum { michael@0: SingleThreaded, michael@0: MultiThreaded michael@0: } CryptokiLockingState ; michael@0: michael@0: /* used as an index into an array, make sure it starts at '0' */ michael@0: typedef enum { michael@0: NSSCKFWCryptoOperationState_EncryptDecrypt = 0, michael@0: NSSCKFWCryptoOperationState_SignVerify, michael@0: NSSCKFWCryptoOperationState_Digest, michael@0: NSSCKFWCryptoOperationState_Max michael@0: } NSSCKFWCryptoOperationState; michael@0: michael@0: typedef enum { michael@0: NSSCKFWCryptoOperationType_Encrypt, michael@0: NSSCKFWCryptoOperationType_Decrypt, michael@0: NSSCKFWCryptoOperationType_Digest, michael@0: NSSCKFWCryptoOperationType_Sign, michael@0: NSSCKFWCryptoOperationType_Verify, michael@0: NSSCKFWCryptoOperationType_SignRecover, michael@0: NSSCKFWCryptoOperationType_VerifyRecover michael@0: } NSSCKFWCryptoOperationType; michael@0: michael@0: #endif /* NSSCKFWT_H */