1*7c478bd9Sstevel@tonic-gate /* pkcs11f.h include file for PKCS #11. */ 2*7c478bd9Sstevel@tonic-gate /* $Revision: 1.4 $ */ 3*7c478bd9Sstevel@tonic-gate 4*7c478bd9Sstevel@tonic-gate /* License to copy and use this software is granted provided that it is 5*7c478bd9Sstevel@tonic-gate * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface 6*7c478bd9Sstevel@tonic-gate * (Cryptoki)" in all material mentioning or referencing this software. 7*7c478bd9Sstevel@tonic-gate 8*7c478bd9Sstevel@tonic-gate * License is also granted to make and use derivative works provided that 9*7c478bd9Sstevel@tonic-gate * such works are identified as "derived from the RSA Security Inc. PKCS #11 10*7c478bd9Sstevel@tonic-gate * Cryptographic Token Interface (Cryptoki)" in all material mentioning or 11*7c478bd9Sstevel@tonic-gate * referencing the derived work. 12*7c478bd9Sstevel@tonic-gate 13*7c478bd9Sstevel@tonic-gate * RSA Security Inc. makes no representations concerning either the 14*7c478bd9Sstevel@tonic-gate * merchantability of this software or the suitability of this software for 15*7c478bd9Sstevel@tonic-gate * any particular purpose. It is provided "as is" without express or implied 16*7c478bd9Sstevel@tonic-gate * warranty of any kind. 17*7c478bd9Sstevel@tonic-gate */ 18*7c478bd9Sstevel@tonic-gate 19*7c478bd9Sstevel@tonic-gate /* This header file contains pretty much everything about all the */ 20*7c478bd9Sstevel@tonic-gate /* Cryptoki function prototypes. Because this information is */ 21*7c478bd9Sstevel@tonic-gate /* used for more than just declaring function prototypes, the */ 22*7c478bd9Sstevel@tonic-gate /* order of the functions appearing herein is important, and */ 23*7c478bd9Sstevel@tonic-gate /* should not be altered. */ 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate /* General-purpose */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate /* C_Initialize initializes the Cryptoki library. */ 28*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_Initialize) 29*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 30*7c478bd9Sstevel@tonic-gate ( 31*7c478bd9Sstevel@tonic-gate CK_VOID_PTR pInitArgs /* if this is not NULL_PTR, it gets 32*7c478bd9Sstevel@tonic-gate * cast to CK_C_INITIALIZE_ARGS_PTR 33*7c478bd9Sstevel@tonic-gate * and dereferenced */ 34*7c478bd9Sstevel@tonic-gate ); 35*7c478bd9Sstevel@tonic-gate #endif 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate /* C_Finalize indicates that an application is done with the 39*7c478bd9Sstevel@tonic-gate * Cryptoki library. */ 40*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_Finalize) 41*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 42*7c478bd9Sstevel@tonic-gate ( 43*7c478bd9Sstevel@tonic-gate CK_VOID_PTR pReserved /* reserved. Should be NULL_PTR */ 44*7c478bd9Sstevel@tonic-gate ); 45*7c478bd9Sstevel@tonic-gate #endif 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate 48*7c478bd9Sstevel@tonic-gate /* C_GetInfo returns general information about Cryptoki. */ 49*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetInfo) 50*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 51*7c478bd9Sstevel@tonic-gate ( 52*7c478bd9Sstevel@tonic-gate CK_INFO_PTR pInfo /* location that receives information */ 53*7c478bd9Sstevel@tonic-gate ); 54*7c478bd9Sstevel@tonic-gate #endif 55*7c478bd9Sstevel@tonic-gate 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate /* C_GetFunctionList returns the function list. */ 58*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetFunctionList) 59*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 60*7c478bd9Sstevel@tonic-gate ( 61*7c478bd9Sstevel@tonic-gate CK_FUNCTION_LIST_PTR_PTR ppFunctionList /* receives pointer to 62*7c478bd9Sstevel@tonic-gate * function list */ 63*7c478bd9Sstevel@tonic-gate ); 64*7c478bd9Sstevel@tonic-gate #endif 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gate 67*7c478bd9Sstevel@tonic-gate 68*7c478bd9Sstevel@tonic-gate /* Slot and token management */ 69*7c478bd9Sstevel@tonic-gate 70*7c478bd9Sstevel@tonic-gate /* C_GetSlotList obtains a list of slots in the system. */ 71*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetSlotList) 72*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 73*7c478bd9Sstevel@tonic-gate ( 74*7c478bd9Sstevel@tonic-gate CK_BBOOL tokenPresent, /* only slots with tokens? */ 75*7c478bd9Sstevel@tonic-gate CK_SLOT_ID_PTR pSlotList, /* receives array of slot IDs */ 76*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulCount /* receives number of slots */ 77*7c478bd9Sstevel@tonic-gate ); 78*7c478bd9Sstevel@tonic-gate #endif 79*7c478bd9Sstevel@tonic-gate 80*7c478bd9Sstevel@tonic-gate 81*7c478bd9Sstevel@tonic-gate /* C_GetSlotInfo obtains information about a particular slot in 82*7c478bd9Sstevel@tonic-gate * the system. */ 83*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetSlotInfo) 84*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 85*7c478bd9Sstevel@tonic-gate ( 86*7c478bd9Sstevel@tonic-gate CK_SLOT_ID slotID, /* the ID of the slot */ 87*7c478bd9Sstevel@tonic-gate CK_SLOT_INFO_PTR pInfo /* receives the slot information */ 88*7c478bd9Sstevel@tonic-gate ); 89*7c478bd9Sstevel@tonic-gate #endif 90*7c478bd9Sstevel@tonic-gate 91*7c478bd9Sstevel@tonic-gate 92*7c478bd9Sstevel@tonic-gate /* C_GetTokenInfo obtains information about a particular token 93*7c478bd9Sstevel@tonic-gate * in the system. */ 94*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetTokenInfo) 95*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 96*7c478bd9Sstevel@tonic-gate ( 97*7c478bd9Sstevel@tonic-gate CK_SLOT_ID slotID, /* ID of the token's slot */ 98*7c478bd9Sstevel@tonic-gate CK_TOKEN_INFO_PTR pInfo /* receives the token information */ 99*7c478bd9Sstevel@tonic-gate ); 100*7c478bd9Sstevel@tonic-gate #endif 101*7c478bd9Sstevel@tonic-gate 102*7c478bd9Sstevel@tonic-gate 103*7c478bd9Sstevel@tonic-gate /* C_GetMechanismList obtains a list of mechanism types 104*7c478bd9Sstevel@tonic-gate * supported by a token. */ 105*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetMechanismList) 106*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 107*7c478bd9Sstevel@tonic-gate ( 108*7c478bd9Sstevel@tonic-gate CK_SLOT_ID slotID, /* ID of token's slot */ 109*7c478bd9Sstevel@tonic-gate CK_MECHANISM_TYPE_PTR pMechanismList, /* gets mech. array */ 110*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulCount /* gets # of mechs. */ 111*7c478bd9Sstevel@tonic-gate ); 112*7c478bd9Sstevel@tonic-gate #endif 113*7c478bd9Sstevel@tonic-gate 114*7c478bd9Sstevel@tonic-gate 115*7c478bd9Sstevel@tonic-gate /* C_GetMechanismInfo obtains information about a particular 116*7c478bd9Sstevel@tonic-gate * mechanism possibly supported by a token. */ 117*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetMechanismInfo) 118*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 119*7c478bd9Sstevel@tonic-gate ( 120*7c478bd9Sstevel@tonic-gate CK_SLOT_ID slotID, /* ID of the token's slot */ 121*7c478bd9Sstevel@tonic-gate CK_MECHANISM_TYPE type, /* type of mechanism */ 122*7c478bd9Sstevel@tonic-gate CK_MECHANISM_INFO_PTR pInfo /* receives mechanism info */ 123*7c478bd9Sstevel@tonic-gate ); 124*7c478bd9Sstevel@tonic-gate #endif 125*7c478bd9Sstevel@tonic-gate 126*7c478bd9Sstevel@tonic-gate 127*7c478bd9Sstevel@tonic-gate /* C_InitToken initializes a token. */ 128*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_InitToken) 129*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 130*7c478bd9Sstevel@tonic-gate /* pLabel changed from CK_CHAR_PTR to CK_UTF8CHAR_PTR for v2.10 */ 131*7c478bd9Sstevel@tonic-gate ( 132*7c478bd9Sstevel@tonic-gate CK_SLOT_ID slotID, /* ID of the token's slot */ 133*7c478bd9Sstevel@tonic-gate CK_UTF8CHAR_PTR pPin, /* the SO's initial PIN */ 134*7c478bd9Sstevel@tonic-gate CK_ULONG ulPinLen, /* length in bytes of the PIN */ 135*7c478bd9Sstevel@tonic-gate CK_UTF8CHAR_PTR pLabel /* 32-byte token label (blank padded) */ 136*7c478bd9Sstevel@tonic-gate ); 137*7c478bd9Sstevel@tonic-gate #endif 138*7c478bd9Sstevel@tonic-gate 139*7c478bd9Sstevel@tonic-gate 140*7c478bd9Sstevel@tonic-gate /* C_InitPIN initializes the normal user's PIN. */ 141*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_InitPIN) 142*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 143*7c478bd9Sstevel@tonic-gate ( 144*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 145*7c478bd9Sstevel@tonic-gate CK_UTF8CHAR_PTR pPin, /* the normal user's PIN */ 146*7c478bd9Sstevel@tonic-gate CK_ULONG ulPinLen /* length in bytes of the PIN */ 147*7c478bd9Sstevel@tonic-gate ); 148*7c478bd9Sstevel@tonic-gate #endif 149*7c478bd9Sstevel@tonic-gate 150*7c478bd9Sstevel@tonic-gate 151*7c478bd9Sstevel@tonic-gate /* C_SetPIN modifies the PIN of the user who is logged in. */ 152*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SetPIN) 153*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 154*7c478bd9Sstevel@tonic-gate ( 155*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 156*7c478bd9Sstevel@tonic-gate CK_UTF8CHAR_PTR pOldPin, /* the old PIN */ 157*7c478bd9Sstevel@tonic-gate CK_ULONG ulOldLen, /* length of the old PIN */ 158*7c478bd9Sstevel@tonic-gate CK_UTF8CHAR_PTR pNewPin, /* the new PIN */ 159*7c478bd9Sstevel@tonic-gate CK_ULONG ulNewLen /* length of the new PIN */ 160*7c478bd9Sstevel@tonic-gate ); 161*7c478bd9Sstevel@tonic-gate #endif 162*7c478bd9Sstevel@tonic-gate 163*7c478bd9Sstevel@tonic-gate 164*7c478bd9Sstevel@tonic-gate 165*7c478bd9Sstevel@tonic-gate /* Session management */ 166*7c478bd9Sstevel@tonic-gate 167*7c478bd9Sstevel@tonic-gate /* C_OpenSession opens a session between an application and a 168*7c478bd9Sstevel@tonic-gate * token. */ 169*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_OpenSession) 170*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 171*7c478bd9Sstevel@tonic-gate ( 172*7c478bd9Sstevel@tonic-gate CK_SLOT_ID slotID, /* the slot's ID */ 173*7c478bd9Sstevel@tonic-gate CK_FLAGS flags, /* from CK_SESSION_INFO */ 174*7c478bd9Sstevel@tonic-gate CK_VOID_PTR pApplication, /* passed to callback */ 175*7c478bd9Sstevel@tonic-gate CK_NOTIFY Notify, /* callback function */ 176*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE_PTR phSession /* gets session handle */ 177*7c478bd9Sstevel@tonic-gate ); 178*7c478bd9Sstevel@tonic-gate #endif 179*7c478bd9Sstevel@tonic-gate 180*7c478bd9Sstevel@tonic-gate 181*7c478bd9Sstevel@tonic-gate /* C_CloseSession closes a session between an application and a 182*7c478bd9Sstevel@tonic-gate * token. */ 183*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_CloseSession) 184*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 185*7c478bd9Sstevel@tonic-gate ( 186*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession /* the session's handle */ 187*7c478bd9Sstevel@tonic-gate ); 188*7c478bd9Sstevel@tonic-gate #endif 189*7c478bd9Sstevel@tonic-gate 190*7c478bd9Sstevel@tonic-gate 191*7c478bd9Sstevel@tonic-gate /* C_CloseAllSessions closes all sessions with a token. */ 192*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_CloseAllSessions) 193*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 194*7c478bd9Sstevel@tonic-gate ( 195*7c478bd9Sstevel@tonic-gate CK_SLOT_ID slotID /* the token's slot */ 196*7c478bd9Sstevel@tonic-gate ); 197*7c478bd9Sstevel@tonic-gate #endif 198*7c478bd9Sstevel@tonic-gate 199*7c478bd9Sstevel@tonic-gate 200*7c478bd9Sstevel@tonic-gate /* C_GetSessionInfo obtains information about the session. */ 201*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetSessionInfo) 202*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 203*7c478bd9Sstevel@tonic-gate ( 204*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 205*7c478bd9Sstevel@tonic-gate CK_SESSION_INFO_PTR pInfo /* receives session info */ 206*7c478bd9Sstevel@tonic-gate ); 207*7c478bd9Sstevel@tonic-gate #endif 208*7c478bd9Sstevel@tonic-gate 209*7c478bd9Sstevel@tonic-gate 210*7c478bd9Sstevel@tonic-gate /* C_GetOperationState obtains the state of the cryptographic operation 211*7c478bd9Sstevel@tonic-gate * in a session. */ 212*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetOperationState) 213*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 214*7c478bd9Sstevel@tonic-gate ( 215*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 216*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pOperationState, /* gets state */ 217*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulOperationStateLen /* gets state length */ 218*7c478bd9Sstevel@tonic-gate ); 219*7c478bd9Sstevel@tonic-gate #endif 220*7c478bd9Sstevel@tonic-gate 221*7c478bd9Sstevel@tonic-gate 222*7c478bd9Sstevel@tonic-gate /* C_SetOperationState restores the state of the cryptographic 223*7c478bd9Sstevel@tonic-gate * operation in a session. */ 224*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SetOperationState) 225*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 226*7c478bd9Sstevel@tonic-gate ( 227*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 228*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pOperationState, /* holds state */ 229*7c478bd9Sstevel@tonic-gate CK_ULONG ulOperationStateLen, /* holds state length */ 230*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hEncryptionKey, /* en/decryption key */ 231*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hAuthenticationKey /* sign/verify key */ 232*7c478bd9Sstevel@tonic-gate ); 233*7c478bd9Sstevel@tonic-gate #endif 234*7c478bd9Sstevel@tonic-gate 235*7c478bd9Sstevel@tonic-gate 236*7c478bd9Sstevel@tonic-gate /* C_Login logs a user into a token. */ 237*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_Login) 238*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 239*7c478bd9Sstevel@tonic-gate ( 240*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 241*7c478bd9Sstevel@tonic-gate CK_USER_TYPE userType, /* the user type */ 242*7c478bd9Sstevel@tonic-gate CK_UTF8CHAR_PTR pPin, /* the user's PIN */ 243*7c478bd9Sstevel@tonic-gate CK_ULONG ulPinLen /* the length of the PIN */ 244*7c478bd9Sstevel@tonic-gate ); 245*7c478bd9Sstevel@tonic-gate #endif 246*7c478bd9Sstevel@tonic-gate 247*7c478bd9Sstevel@tonic-gate 248*7c478bd9Sstevel@tonic-gate /* C_Logout logs a user out from a token. */ 249*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_Logout) 250*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 251*7c478bd9Sstevel@tonic-gate ( 252*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession /* the session's handle */ 253*7c478bd9Sstevel@tonic-gate ); 254*7c478bd9Sstevel@tonic-gate #endif 255*7c478bd9Sstevel@tonic-gate 256*7c478bd9Sstevel@tonic-gate 257*7c478bd9Sstevel@tonic-gate 258*7c478bd9Sstevel@tonic-gate /* Object management */ 259*7c478bd9Sstevel@tonic-gate 260*7c478bd9Sstevel@tonic-gate /* C_CreateObject creates a new object. */ 261*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_CreateObject) 262*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 263*7c478bd9Sstevel@tonic-gate ( 264*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 265*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pTemplate, /* the object's template */ 266*7c478bd9Sstevel@tonic-gate CK_ULONG ulCount, /* attributes in template */ 267*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE_PTR phObject /* gets new object's handle. */ 268*7c478bd9Sstevel@tonic-gate ); 269*7c478bd9Sstevel@tonic-gate #endif 270*7c478bd9Sstevel@tonic-gate 271*7c478bd9Sstevel@tonic-gate 272*7c478bd9Sstevel@tonic-gate /* C_CopyObject copies an object, creating a new object for the 273*7c478bd9Sstevel@tonic-gate * copy. */ 274*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_CopyObject) 275*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 276*7c478bd9Sstevel@tonic-gate ( 277*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 278*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hObject, /* the object's handle */ 279*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pTemplate, /* template for new object */ 280*7c478bd9Sstevel@tonic-gate CK_ULONG ulCount, /* attributes in template */ 281*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE_PTR phNewObject /* receives handle of copy */ 282*7c478bd9Sstevel@tonic-gate ); 283*7c478bd9Sstevel@tonic-gate #endif 284*7c478bd9Sstevel@tonic-gate 285*7c478bd9Sstevel@tonic-gate 286*7c478bd9Sstevel@tonic-gate /* C_DestroyObject destroys an object. */ 287*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DestroyObject) 288*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 289*7c478bd9Sstevel@tonic-gate ( 290*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 291*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hObject /* the object's handle */ 292*7c478bd9Sstevel@tonic-gate ); 293*7c478bd9Sstevel@tonic-gate #endif 294*7c478bd9Sstevel@tonic-gate 295*7c478bd9Sstevel@tonic-gate 296*7c478bd9Sstevel@tonic-gate /* C_GetObjectSize gets the size of an object in bytes. */ 297*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetObjectSize) 298*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 299*7c478bd9Sstevel@tonic-gate ( 300*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 301*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hObject, /* the object's handle */ 302*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulSize /* receives size of object */ 303*7c478bd9Sstevel@tonic-gate ); 304*7c478bd9Sstevel@tonic-gate #endif 305*7c478bd9Sstevel@tonic-gate 306*7c478bd9Sstevel@tonic-gate 307*7c478bd9Sstevel@tonic-gate /* C_GetAttributeValue obtains the value of one or more object 308*7c478bd9Sstevel@tonic-gate * attributes. */ 309*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetAttributeValue) 310*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 311*7c478bd9Sstevel@tonic-gate ( 312*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 313*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hObject, /* the object's handle */ 314*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pTemplate, /* specifies attrs; gets vals */ 315*7c478bd9Sstevel@tonic-gate CK_ULONG ulCount /* attributes in template */ 316*7c478bd9Sstevel@tonic-gate ); 317*7c478bd9Sstevel@tonic-gate #endif 318*7c478bd9Sstevel@tonic-gate 319*7c478bd9Sstevel@tonic-gate 320*7c478bd9Sstevel@tonic-gate /* C_SetAttributeValue modifies the value of one or more object 321*7c478bd9Sstevel@tonic-gate * attributes */ 322*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SetAttributeValue) 323*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 324*7c478bd9Sstevel@tonic-gate ( 325*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 326*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hObject, /* the object's handle */ 327*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pTemplate, /* specifies attrs and values */ 328*7c478bd9Sstevel@tonic-gate CK_ULONG ulCount /* attributes in template */ 329*7c478bd9Sstevel@tonic-gate ); 330*7c478bd9Sstevel@tonic-gate #endif 331*7c478bd9Sstevel@tonic-gate 332*7c478bd9Sstevel@tonic-gate 333*7c478bd9Sstevel@tonic-gate /* C_FindObjectsInit initializes a search for token and session 334*7c478bd9Sstevel@tonic-gate * objects that match a template. */ 335*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_FindObjectsInit) 336*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 337*7c478bd9Sstevel@tonic-gate ( 338*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 339*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pTemplate, /* attribute values to match */ 340*7c478bd9Sstevel@tonic-gate CK_ULONG ulCount /* attrs in search template */ 341*7c478bd9Sstevel@tonic-gate ); 342*7c478bd9Sstevel@tonic-gate #endif 343*7c478bd9Sstevel@tonic-gate 344*7c478bd9Sstevel@tonic-gate 345*7c478bd9Sstevel@tonic-gate /* C_FindObjects continues a search for token and session 346*7c478bd9Sstevel@tonic-gate * objects that match a template, obtaining additional object 347*7c478bd9Sstevel@tonic-gate * handles. */ 348*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_FindObjects) 349*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 350*7c478bd9Sstevel@tonic-gate ( 351*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 352*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE_PTR phObject, /* gets obj. handles */ 353*7c478bd9Sstevel@tonic-gate CK_ULONG ulMaxObjectCount, /* max handles to get */ 354*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulObjectCount /* actual # returned */ 355*7c478bd9Sstevel@tonic-gate ); 356*7c478bd9Sstevel@tonic-gate #endif 357*7c478bd9Sstevel@tonic-gate 358*7c478bd9Sstevel@tonic-gate 359*7c478bd9Sstevel@tonic-gate /* C_FindObjectsFinal finishes a search for token and session 360*7c478bd9Sstevel@tonic-gate * objects. */ 361*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_FindObjectsFinal) 362*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 363*7c478bd9Sstevel@tonic-gate ( 364*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession /* the session's handle */ 365*7c478bd9Sstevel@tonic-gate ); 366*7c478bd9Sstevel@tonic-gate #endif 367*7c478bd9Sstevel@tonic-gate 368*7c478bd9Sstevel@tonic-gate 369*7c478bd9Sstevel@tonic-gate 370*7c478bd9Sstevel@tonic-gate /* Encryption and decryption */ 371*7c478bd9Sstevel@tonic-gate 372*7c478bd9Sstevel@tonic-gate /* C_EncryptInit initializes an encryption operation. */ 373*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_EncryptInit) 374*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 375*7c478bd9Sstevel@tonic-gate ( 376*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 377*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* the encryption mechanism */ 378*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hKey /* handle of encryption key */ 379*7c478bd9Sstevel@tonic-gate ); 380*7c478bd9Sstevel@tonic-gate #endif 381*7c478bd9Sstevel@tonic-gate 382*7c478bd9Sstevel@tonic-gate 383*7c478bd9Sstevel@tonic-gate /* C_Encrypt encrypts single-part data. */ 384*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_Encrypt) 385*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 386*7c478bd9Sstevel@tonic-gate ( 387*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 388*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pData, /* the plaintext data */ 389*7c478bd9Sstevel@tonic-gate CK_ULONG ulDataLen, /* bytes of plaintext */ 390*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pEncryptedData, /* gets ciphertext */ 391*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulEncryptedDataLen /* gets c-text size */ 392*7c478bd9Sstevel@tonic-gate ); 393*7c478bd9Sstevel@tonic-gate #endif 394*7c478bd9Sstevel@tonic-gate 395*7c478bd9Sstevel@tonic-gate 396*7c478bd9Sstevel@tonic-gate /* C_EncryptUpdate continues a multiple-part encryption 397*7c478bd9Sstevel@tonic-gate * operation. */ 398*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_EncryptUpdate) 399*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 400*7c478bd9Sstevel@tonic-gate ( 401*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 402*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pPart, /* the plaintext data */ 403*7c478bd9Sstevel@tonic-gate CK_ULONG ulPartLen, /* plaintext data len */ 404*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */ 405*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulEncryptedPartLen /* gets c-text size */ 406*7c478bd9Sstevel@tonic-gate ); 407*7c478bd9Sstevel@tonic-gate #endif 408*7c478bd9Sstevel@tonic-gate 409*7c478bd9Sstevel@tonic-gate 410*7c478bd9Sstevel@tonic-gate /* C_EncryptFinal finishes a multiple-part encryption 411*7c478bd9Sstevel@tonic-gate * operation. */ 412*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_EncryptFinal) 413*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 414*7c478bd9Sstevel@tonic-gate ( 415*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session handle */ 416*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pLastEncryptedPart, /* last c-text */ 417*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulLastEncryptedPartLen /* gets last size */ 418*7c478bd9Sstevel@tonic-gate ); 419*7c478bd9Sstevel@tonic-gate #endif 420*7c478bd9Sstevel@tonic-gate 421*7c478bd9Sstevel@tonic-gate 422*7c478bd9Sstevel@tonic-gate /* C_DecryptInit initializes a decryption operation. */ 423*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DecryptInit) 424*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 425*7c478bd9Sstevel@tonic-gate ( 426*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 427*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* the decryption mechanism */ 428*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hKey /* handle of decryption key */ 429*7c478bd9Sstevel@tonic-gate ); 430*7c478bd9Sstevel@tonic-gate #endif 431*7c478bd9Sstevel@tonic-gate 432*7c478bd9Sstevel@tonic-gate 433*7c478bd9Sstevel@tonic-gate /* C_Decrypt decrypts encrypted data in a single part. */ 434*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_Decrypt) 435*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 436*7c478bd9Sstevel@tonic-gate ( 437*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 438*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pEncryptedData, /* ciphertext */ 439*7c478bd9Sstevel@tonic-gate CK_ULONG ulEncryptedDataLen, /* ciphertext length */ 440*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pData, /* gets plaintext */ 441*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulDataLen /* gets p-text size */ 442*7c478bd9Sstevel@tonic-gate ); 443*7c478bd9Sstevel@tonic-gate #endif 444*7c478bd9Sstevel@tonic-gate 445*7c478bd9Sstevel@tonic-gate 446*7c478bd9Sstevel@tonic-gate /* C_DecryptUpdate continues a multiple-part decryption 447*7c478bd9Sstevel@tonic-gate * operation. */ 448*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DecryptUpdate) 449*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 450*7c478bd9Sstevel@tonic-gate ( 451*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 452*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pEncryptedPart, /* encrypted data */ 453*7c478bd9Sstevel@tonic-gate CK_ULONG ulEncryptedPartLen, /* input length */ 454*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pPart, /* gets plaintext */ 455*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulPartLen /* p-text size */ 456*7c478bd9Sstevel@tonic-gate ); 457*7c478bd9Sstevel@tonic-gate #endif 458*7c478bd9Sstevel@tonic-gate 459*7c478bd9Sstevel@tonic-gate 460*7c478bd9Sstevel@tonic-gate /* C_DecryptFinal finishes a multiple-part decryption 461*7c478bd9Sstevel@tonic-gate * operation. */ 462*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DecryptFinal) 463*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 464*7c478bd9Sstevel@tonic-gate ( 465*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 466*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pLastPart, /* gets plaintext */ 467*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulLastPartLen /* p-text size */ 468*7c478bd9Sstevel@tonic-gate ); 469*7c478bd9Sstevel@tonic-gate #endif 470*7c478bd9Sstevel@tonic-gate 471*7c478bd9Sstevel@tonic-gate 472*7c478bd9Sstevel@tonic-gate 473*7c478bd9Sstevel@tonic-gate /* Message digesting */ 474*7c478bd9Sstevel@tonic-gate 475*7c478bd9Sstevel@tonic-gate /* C_DigestInit initializes a message-digesting operation. */ 476*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DigestInit) 477*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 478*7c478bd9Sstevel@tonic-gate ( 479*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 480*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism /* the digesting mechanism */ 481*7c478bd9Sstevel@tonic-gate ); 482*7c478bd9Sstevel@tonic-gate #endif 483*7c478bd9Sstevel@tonic-gate 484*7c478bd9Sstevel@tonic-gate 485*7c478bd9Sstevel@tonic-gate /* C_Digest digests data in a single part. */ 486*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_Digest) 487*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 488*7c478bd9Sstevel@tonic-gate ( 489*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 490*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pData, /* data to be digested */ 491*7c478bd9Sstevel@tonic-gate CK_ULONG ulDataLen, /* bytes of data to digest */ 492*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pDigest, /* gets the message digest */ 493*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulDigestLen /* gets digest length */ 494*7c478bd9Sstevel@tonic-gate ); 495*7c478bd9Sstevel@tonic-gate #endif 496*7c478bd9Sstevel@tonic-gate 497*7c478bd9Sstevel@tonic-gate 498*7c478bd9Sstevel@tonic-gate /* C_DigestUpdate continues a multiple-part message-digesting 499*7c478bd9Sstevel@tonic-gate * operation. */ 500*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DigestUpdate) 501*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 502*7c478bd9Sstevel@tonic-gate ( 503*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 504*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pPart, /* data to be digested */ 505*7c478bd9Sstevel@tonic-gate CK_ULONG ulPartLen /* bytes of data to be digested */ 506*7c478bd9Sstevel@tonic-gate ); 507*7c478bd9Sstevel@tonic-gate #endif 508*7c478bd9Sstevel@tonic-gate 509*7c478bd9Sstevel@tonic-gate 510*7c478bd9Sstevel@tonic-gate /* C_DigestKey continues a multi-part message-digesting 511*7c478bd9Sstevel@tonic-gate * operation, by digesting the value of a secret key as part of 512*7c478bd9Sstevel@tonic-gate * the data already digested. */ 513*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DigestKey) 514*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 515*7c478bd9Sstevel@tonic-gate ( 516*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 517*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hKey /* secret key to digest */ 518*7c478bd9Sstevel@tonic-gate ); 519*7c478bd9Sstevel@tonic-gate #endif 520*7c478bd9Sstevel@tonic-gate 521*7c478bd9Sstevel@tonic-gate 522*7c478bd9Sstevel@tonic-gate /* C_DigestFinal finishes a multiple-part message-digesting 523*7c478bd9Sstevel@tonic-gate * operation. */ 524*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DigestFinal) 525*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 526*7c478bd9Sstevel@tonic-gate ( 527*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 528*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pDigest, /* gets the message digest */ 529*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulDigestLen /* gets byte count of digest */ 530*7c478bd9Sstevel@tonic-gate ); 531*7c478bd9Sstevel@tonic-gate #endif 532*7c478bd9Sstevel@tonic-gate 533*7c478bd9Sstevel@tonic-gate 534*7c478bd9Sstevel@tonic-gate 535*7c478bd9Sstevel@tonic-gate /* Signing and MACing */ 536*7c478bd9Sstevel@tonic-gate 537*7c478bd9Sstevel@tonic-gate /* C_SignInit initializes a signature (private key encryption) 538*7c478bd9Sstevel@tonic-gate * operation, where the signature is (will be) an appendix to 539*7c478bd9Sstevel@tonic-gate * the data, and plaintext cannot be recovered from the 540*7c478bd9Sstevel@tonic-gate *signature. */ 541*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SignInit) 542*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 543*7c478bd9Sstevel@tonic-gate ( 544*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 545*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* the signature mechanism */ 546*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hKey /* handle of signature key */ 547*7c478bd9Sstevel@tonic-gate ); 548*7c478bd9Sstevel@tonic-gate #endif 549*7c478bd9Sstevel@tonic-gate 550*7c478bd9Sstevel@tonic-gate 551*7c478bd9Sstevel@tonic-gate /* C_Sign signs (encrypts with private key) data in a single 552*7c478bd9Sstevel@tonic-gate * part, where the signature is (will be) an appendix to the 553*7c478bd9Sstevel@tonic-gate * data, and plaintext cannot be recovered from the signature. */ 554*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_Sign) 555*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 556*7c478bd9Sstevel@tonic-gate ( 557*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 558*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pData, /* the data to sign */ 559*7c478bd9Sstevel@tonic-gate CK_ULONG ulDataLen, /* count of bytes to sign */ 560*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pSignature, /* gets the signature */ 561*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulSignatureLen /* gets signature length */ 562*7c478bd9Sstevel@tonic-gate ); 563*7c478bd9Sstevel@tonic-gate #endif 564*7c478bd9Sstevel@tonic-gate 565*7c478bd9Sstevel@tonic-gate 566*7c478bd9Sstevel@tonic-gate /* C_SignUpdate continues a multiple-part signature operation, 567*7c478bd9Sstevel@tonic-gate * where the signature is (will be) an appendix to the data, 568*7c478bd9Sstevel@tonic-gate * and plaintext cannot be recovered from the signature. */ 569*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SignUpdate) 570*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 571*7c478bd9Sstevel@tonic-gate ( 572*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 573*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pPart, /* the data to sign */ 574*7c478bd9Sstevel@tonic-gate CK_ULONG ulPartLen /* count of bytes to sign */ 575*7c478bd9Sstevel@tonic-gate ); 576*7c478bd9Sstevel@tonic-gate #endif 577*7c478bd9Sstevel@tonic-gate 578*7c478bd9Sstevel@tonic-gate 579*7c478bd9Sstevel@tonic-gate /* C_SignFinal finishes a multiple-part signature operation, 580*7c478bd9Sstevel@tonic-gate * returning the signature. */ 581*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SignFinal) 582*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 583*7c478bd9Sstevel@tonic-gate ( 584*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 585*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pSignature, /* gets the signature */ 586*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulSignatureLen /* gets signature length */ 587*7c478bd9Sstevel@tonic-gate ); 588*7c478bd9Sstevel@tonic-gate #endif 589*7c478bd9Sstevel@tonic-gate 590*7c478bd9Sstevel@tonic-gate 591*7c478bd9Sstevel@tonic-gate /* C_SignRecoverInit initializes a signature operation, where 592*7c478bd9Sstevel@tonic-gate * the data can be recovered from the signature. */ 593*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SignRecoverInit) 594*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 595*7c478bd9Sstevel@tonic-gate ( 596*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 597*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* the signature mechanism */ 598*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hKey /* handle of the signature key */ 599*7c478bd9Sstevel@tonic-gate ); 600*7c478bd9Sstevel@tonic-gate #endif 601*7c478bd9Sstevel@tonic-gate 602*7c478bd9Sstevel@tonic-gate 603*7c478bd9Sstevel@tonic-gate /* C_SignRecover signs data in a single operation, where the 604*7c478bd9Sstevel@tonic-gate * data can be recovered from the signature. */ 605*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SignRecover) 606*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 607*7c478bd9Sstevel@tonic-gate ( 608*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 609*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pData, /* the data to sign */ 610*7c478bd9Sstevel@tonic-gate CK_ULONG ulDataLen, /* count of bytes to sign */ 611*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pSignature, /* gets the signature */ 612*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulSignatureLen /* gets signature length */ 613*7c478bd9Sstevel@tonic-gate ); 614*7c478bd9Sstevel@tonic-gate #endif 615*7c478bd9Sstevel@tonic-gate 616*7c478bd9Sstevel@tonic-gate 617*7c478bd9Sstevel@tonic-gate 618*7c478bd9Sstevel@tonic-gate /* Verifying signatures and MACs */ 619*7c478bd9Sstevel@tonic-gate 620*7c478bd9Sstevel@tonic-gate /* C_VerifyInit initializes a verification operation, where the 621*7c478bd9Sstevel@tonic-gate * signature is an appendix to the data, and plaintext cannot 622*7c478bd9Sstevel@tonic-gate * cannot be recovered from the signature (e.g. DSA). */ 623*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_VerifyInit) 624*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 625*7c478bd9Sstevel@tonic-gate ( 626*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 627*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* the verification mechanism */ 628*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hKey /* verification key */ 629*7c478bd9Sstevel@tonic-gate ); 630*7c478bd9Sstevel@tonic-gate #endif 631*7c478bd9Sstevel@tonic-gate 632*7c478bd9Sstevel@tonic-gate 633*7c478bd9Sstevel@tonic-gate /* C_Verify verifies a signature in a single-part operation, 634*7c478bd9Sstevel@tonic-gate * where the signature is an appendix to the data, and plaintext 635*7c478bd9Sstevel@tonic-gate * cannot be recovered from the signature. */ 636*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_Verify) 637*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 638*7c478bd9Sstevel@tonic-gate ( 639*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 640*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pData, /* signed data */ 641*7c478bd9Sstevel@tonic-gate CK_ULONG ulDataLen, /* length of signed data */ 642*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pSignature, /* signature */ 643*7c478bd9Sstevel@tonic-gate CK_ULONG ulSignatureLen /* signature length*/ 644*7c478bd9Sstevel@tonic-gate ); 645*7c478bd9Sstevel@tonic-gate #endif 646*7c478bd9Sstevel@tonic-gate 647*7c478bd9Sstevel@tonic-gate 648*7c478bd9Sstevel@tonic-gate /* C_VerifyUpdate continues a multiple-part verification 649*7c478bd9Sstevel@tonic-gate * operation, where the signature is an appendix to the data, 650*7c478bd9Sstevel@tonic-gate * and plaintext cannot be recovered from the signature. */ 651*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_VerifyUpdate) 652*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 653*7c478bd9Sstevel@tonic-gate ( 654*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 655*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pPart, /* signed data */ 656*7c478bd9Sstevel@tonic-gate CK_ULONG ulPartLen /* length of signed data */ 657*7c478bd9Sstevel@tonic-gate ); 658*7c478bd9Sstevel@tonic-gate #endif 659*7c478bd9Sstevel@tonic-gate 660*7c478bd9Sstevel@tonic-gate 661*7c478bd9Sstevel@tonic-gate /* C_VerifyFinal finishes a multiple-part verification 662*7c478bd9Sstevel@tonic-gate * operation, checking the signature. */ 663*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_VerifyFinal) 664*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 665*7c478bd9Sstevel@tonic-gate ( 666*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 667*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pSignature, /* signature to verify */ 668*7c478bd9Sstevel@tonic-gate CK_ULONG ulSignatureLen /* signature length */ 669*7c478bd9Sstevel@tonic-gate ); 670*7c478bd9Sstevel@tonic-gate #endif 671*7c478bd9Sstevel@tonic-gate 672*7c478bd9Sstevel@tonic-gate 673*7c478bd9Sstevel@tonic-gate /* C_VerifyRecoverInit initializes a signature verification 674*7c478bd9Sstevel@tonic-gate * operation, where the data is recovered from the signature. */ 675*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_VerifyRecoverInit) 676*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 677*7c478bd9Sstevel@tonic-gate ( 678*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 679*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* the verification mechanism */ 680*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hKey /* verification key */ 681*7c478bd9Sstevel@tonic-gate ); 682*7c478bd9Sstevel@tonic-gate #endif 683*7c478bd9Sstevel@tonic-gate 684*7c478bd9Sstevel@tonic-gate 685*7c478bd9Sstevel@tonic-gate /* C_VerifyRecover verifies a signature in a single-part 686*7c478bd9Sstevel@tonic-gate * operation, where the data is recovered from the signature. */ 687*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_VerifyRecover) 688*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 689*7c478bd9Sstevel@tonic-gate ( 690*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 691*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pSignature, /* signature to verify */ 692*7c478bd9Sstevel@tonic-gate CK_ULONG ulSignatureLen, /* signature length */ 693*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pData, /* gets signed data */ 694*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulDataLen /* gets signed data len */ 695*7c478bd9Sstevel@tonic-gate ); 696*7c478bd9Sstevel@tonic-gate #endif 697*7c478bd9Sstevel@tonic-gate 698*7c478bd9Sstevel@tonic-gate 699*7c478bd9Sstevel@tonic-gate 700*7c478bd9Sstevel@tonic-gate /* Dual-function cryptographic operations */ 701*7c478bd9Sstevel@tonic-gate 702*7c478bd9Sstevel@tonic-gate /* C_DigestEncryptUpdate continues a multiple-part digesting 703*7c478bd9Sstevel@tonic-gate * and encryption operation. */ 704*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DigestEncryptUpdate) 705*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 706*7c478bd9Sstevel@tonic-gate ( 707*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 708*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pPart, /* the plaintext data */ 709*7c478bd9Sstevel@tonic-gate CK_ULONG ulPartLen, /* plaintext length */ 710*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */ 711*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */ 712*7c478bd9Sstevel@tonic-gate ); 713*7c478bd9Sstevel@tonic-gate #endif 714*7c478bd9Sstevel@tonic-gate 715*7c478bd9Sstevel@tonic-gate 716*7c478bd9Sstevel@tonic-gate /* C_DecryptDigestUpdate continues a multiple-part decryption and 717*7c478bd9Sstevel@tonic-gate * digesting operation. */ 718*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DecryptDigestUpdate) 719*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 720*7c478bd9Sstevel@tonic-gate ( 721*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 722*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pEncryptedPart, /* ciphertext */ 723*7c478bd9Sstevel@tonic-gate CK_ULONG ulEncryptedPartLen, /* ciphertext length */ 724*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pPart, /* gets plaintext */ 725*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulPartLen /* gets plaintext len */ 726*7c478bd9Sstevel@tonic-gate ); 727*7c478bd9Sstevel@tonic-gate #endif 728*7c478bd9Sstevel@tonic-gate 729*7c478bd9Sstevel@tonic-gate 730*7c478bd9Sstevel@tonic-gate /* C_SignEncryptUpdate continues a multiple-part signing and 731*7c478bd9Sstevel@tonic-gate * encryption operation. */ 732*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SignEncryptUpdate) 733*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 734*7c478bd9Sstevel@tonic-gate ( 735*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 736*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pPart, /* the plaintext data */ 737*7c478bd9Sstevel@tonic-gate CK_ULONG ulPartLen, /* plaintext length */ 738*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */ 739*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */ 740*7c478bd9Sstevel@tonic-gate ); 741*7c478bd9Sstevel@tonic-gate #endif 742*7c478bd9Sstevel@tonic-gate 743*7c478bd9Sstevel@tonic-gate 744*7c478bd9Sstevel@tonic-gate /* C_DecryptVerifyUpdate continues a multiple-part decryption and 745*7c478bd9Sstevel@tonic-gate * verify operation. */ 746*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DecryptVerifyUpdate) 747*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 748*7c478bd9Sstevel@tonic-gate ( 749*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 750*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pEncryptedPart, /* ciphertext */ 751*7c478bd9Sstevel@tonic-gate CK_ULONG ulEncryptedPartLen, /* ciphertext length */ 752*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pPart, /* gets plaintext */ 753*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulPartLen /* gets p-text length */ 754*7c478bd9Sstevel@tonic-gate ); 755*7c478bd9Sstevel@tonic-gate #endif 756*7c478bd9Sstevel@tonic-gate 757*7c478bd9Sstevel@tonic-gate 758*7c478bd9Sstevel@tonic-gate 759*7c478bd9Sstevel@tonic-gate /* Key management */ 760*7c478bd9Sstevel@tonic-gate 761*7c478bd9Sstevel@tonic-gate /* C_GenerateKey generates a secret key, creating a new key 762*7c478bd9Sstevel@tonic-gate * object. */ 763*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GenerateKey) 764*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 765*7c478bd9Sstevel@tonic-gate ( 766*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 767*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* key generation mech. */ 768*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pTemplate, /* template for new key */ 769*7c478bd9Sstevel@tonic-gate CK_ULONG ulCount, /* # of attrs in template */ 770*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE_PTR phKey /* gets handle of new key */ 771*7c478bd9Sstevel@tonic-gate ); 772*7c478bd9Sstevel@tonic-gate #endif 773*7c478bd9Sstevel@tonic-gate 774*7c478bd9Sstevel@tonic-gate 775*7c478bd9Sstevel@tonic-gate /* C_GenerateKeyPair generates a public-key/private-key pair, 776*7c478bd9Sstevel@tonic-gate * creating new key objects. */ 777*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GenerateKeyPair) 778*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 779*7c478bd9Sstevel@tonic-gate ( 780*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session 781*7c478bd9Sstevel@tonic-gate * handle */ 782*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* key-gen 783*7c478bd9Sstevel@tonic-gate * mech. */ 784*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pPublicKeyTemplate, /* template 785*7c478bd9Sstevel@tonic-gate * for pub. 786*7c478bd9Sstevel@tonic-gate * key */ 787*7c478bd9Sstevel@tonic-gate CK_ULONG ulPublicKeyAttributeCount, /* # pub. 788*7c478bd9Sstevel@tonic-gate * attrs. */ 789*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pPrivateKeyTemplate, /* template 790*7c478bd9Sstevel@tonic-gate * for priv. 791*7c478bd9Sstevel@tonic-gate * key */ 792*7c478bd9Sstevel@tonic-gate CK_ULONG ulPrivateKeyAttributeCount, /* # priv. 793*7c478bd9Sstevel@tonic-gate * attrs. */ 794*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE_PTR phPublicKey, /* gets pub. 795*7c478bd9Sstevel@tonic-gate * key 796*7c478bd9Sstevel@tonic-gate * handle */ 797*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE_PTR phPrivateKey /* gets 798*7c478bd9Sstevel@tonic-gate * priv. key 799*7c478bd9Sstevel@tonic-gate * handle */ 800*7c478bd9Sstevel@tonic-gate ); 801*7c478bd9Sstevel@tonic-gate #endif 802*7c478bd9Sstevel@tonic-gate 803*7c478bd9Sstevel@tonic-gate 804*7c478bd9Sstevel@tonic-gate /* C_WrapKey wraps (i.e., encrypts) a key. */ 805*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_WrapKey) 806*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 807*7c478bd9Sstevel@tonic-gate ( 808*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 809*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* the wrapping mechanism */ 810*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hWrappingKey, /* wrapping key */ 811*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hKey, /* key to be wrapped */ 812*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pWrappedKey, /* gets wrapped key */ 813*7c478bd9Sstevel@tonic-gate CK_ULONG_PTR pulWrappedKeyLen /* gets wrapped key size */ 814*7c478bd9Sstevel@tonic-gate ); 815*7c478bd9Sstevel@tonic-gate #endif 816*7c478bd9Sstevel@tonic-gate 817*7c478bd9Sstevel@tonic-gate 818*7c478bd9Sstevel@tonic-gate /* C_UnwrapKey unwraps (decrypts) a wrapped key, creating a new 819*7c478bd9Sstevel@tonic-gate * key object. */ 820*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_UnwrapKey) 821*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 822*7c478bd9Sstevel@tonic-gate ( 823*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 824*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* unwrapping mech. */ 825*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hUnwrappingKey, /* unwrapping key */ 826*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pWrappedKey, /* the wrapped key */ 827*7c478bd9Sstevel@tonic-gate CK_ULONG ulWrappedKeyLen, /* wrapped key len */ 828*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pTemplate, /* new key template */ 829*7c478bd9Sstevel@tonic-gate CK_ULONG ulAttributeCount, /* template length */ 830*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE_PTR phKey /* gets new handle */ 831*7c478bd9Sstevel@tonic-gate ); 832*7c478bd9Sstevel@tonic-gate #endif 833*7c478bd9Sstevel@tonic-gate 834*7c478bd9Sstevel@tonic-gate 835*7c478bd9Sstevel@tonic-gate /* C_DeriveKey derives a key from a base key, creating a new key 836*7c478bd9Sstevel@tonic-gate * object. */ 837*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_DeriveKey) 838*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 839*7c478bd9Sstevel@tonic-gate ( 840*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* session's handle */ 841*7c478bd9Sstevel@tonic-gate CK_MECHANISM_PTR pMechanism, /* key deriv. mech. */ 842*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE hBaseKey, /* base key */ 843*7c478bd9Sstevel@tonic-gate CK_ATTRIBUTE_PTR pTemplate, /* new key template */ 844*7c478bd9Sstevel@tonic-gate CK_ULONG ulAttributeCount, /* template length */ 845*7c478bd9Sstevel@tonic-gate CK_OBJECT_HANDLE_PTR phKey /* gets new handle */ 846*7c478bd9Sstevel@tonic-gate ); 847*7c478bd9Sstevel@tonic-gate #endif 848*7c478bd9Sstevel@tonic-gate 849*7c478bd9Sstevel@tonic-gate 850*7c478bd9Sstevel@tonic-gate 851*7c478bd9Sstevel@tonic-gate /* Random number generation */ 852*7c478bd9Sstevel@tonic-gate 853*7c478bd9Sstevel@tonic-gate /* C_SeedRandom mixes additional seed material into the token's 854*7c478bd9Sstevel@tonic-gate * random number generator. */ 855*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_SeedRandom) 856*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 857*7c478bd9Sstevel@tonic-gate ( 858*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 859*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR pSeed, /* the seed material */ 860*7c478bd9Sstevel@tonic-gate CK_ULONG ulSeedLen /* length of seed material */ 861*7c478bd9Sstevel@tonic-gate ); 862*7c478bd9Sstevel@tonic-gate #endif 863*7c478bd9Sstevel@tonic-gate 864*7c478bd9Sstevel@tonic-gate 865*7c478bd9Sstevel@tonic-gate /* C_GenerateRandom generates random data. */ 866*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GenerateRandom) 867*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 868*7c478bd9Sstevel@tonic-gate ( 869*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession, /* the session's handle */ 870*7c478bd9Sstevel@tonic-gate CK_BYTE_PTR RandomData, /* receives the random data */ 871*7c478bd9Sstevel@tonic-gate CK_ULONG ulRandomLen /* # of bytes to generate */ 872*7c478bd9Sstevel@tonic-gate ); 873*7c478bd9Sstevel@tonic-gate #endif 874*7c478bd9Sstevel@tonic-gate 875*7c478bd9Sstevel@tonic-gate 876*7c478bd9Sstevel@tonic-gate 877*7c478bd9Sstevel@tonic-gate /* Parallel function management */ 878*7c478bd9Sstevel@tonic-gate 879*7c478bd9Sstevel@tonic-gate /* C_GetFunctionStatus is a legacy function; it obtains an 880*7c478bd9Sstevel@tonic-gate * updated status of a function running in parallel with an 881*7c478bd9Sstevel@tonic-gate * application. */ 882*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_GetFunctionStatus) 883*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 884*7c478bd9Sstevel@tonic-gate ( 885*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession /* the session's handle */ 886*7c478bd9Sstevel@tonic-gate ); 887*7c478bd9Sstevel@tonic-gate #endif 888*7c478bd9Sstevel@tonic-gate 889*7c478bd9Sstevel@tonic-gate 890*7c478bd9Sstevel@tonic-gate /* C_CancelFunction is a legacy function; it cancels a function 891*7c478bd9Sstevel@tonic-gate * running in parallel. */ 892*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_CancelFunction) 893*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 894*7c478bd9Sstevel@tonic-gate ( 895*7c478bd9Sstevel@tonic-gate CK_SESSION_HANDLE hSession /* the session's handle */ 896*7c478bd9Sstevel@tonic-gate ); 897*7c478bd9Sstevel@tonic-gate #endif 898*7c478bd9Sstevel@tonic-gate 899*7c478bd9Sstevel@tonic-gate 900*7c478bd9Sstevel@tonic-gate 901*7c478bd9Sstevel@tonic-gate /* Functions added in for Cryptoki Version 2.01 or later */ 902*7c478bd9Sstevel@tonic-gate 903*7c478bd9Sstevel@tonic-gate /* C_WaitForSlotEvent waits for a slot event (token insertion, 904*7c478bd9Sstevel@tonic-gate * removal, etc.) to occur. */ 905*7c478bd9Sstevel@tonic-gate CK_PKCS11_FUNCTION_INFO(C_WaitForSlotEvent) 906*7c478bd9Sstevel@tonic-gate #ifdef CK_NEED_ARG_LIST 907*7c478bd9Sstevel@tonic-gate ( 908*7c478bd9Sstevel@tonic-gate CK_FLAGS flags, /* blocking/nonblocking flag */ 909*7c478bd9Sstevel@tonic-gate CK_SLOT_ID_PTR pSlot, /* location that receives the slot ID */ 910*7c478bd9Sstevel@tonic-gate CK_VOID_PTR pRserved /* reserved. Should be NULL_PTR */ 911*7c478bd9Sstevel@tonic-gate ); 912*7c478bd9Sstevel@tonic-gate #endif 913