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